← Back to team overview

maria-developers team mailing list archive

Re: Random test failure in main.show_check in mariadb 5.1 tree

 

Hi!

>>>>> "Kristian" == Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx> writes:

Kristian> There is another test failure visible in Buildbot:
Kristian>     https://askmonty.org/buildbot/builders/gentoo-x86-dbg/builds/13/steps/test/logs/stdio

Kristian> -----------------------------------------------------------------------
Kristian> main.show_check                          [ fail ]
Kristian>         Test ended at 2009-05-22 11:47:11

Kristian> CURRENT_TEST: main.show_check
Kristian> --- /home/buildbot/maria-slave/psergey-foxhole-x86/build/mysql-test/r/show_check.result	2009-05-22 09:56:56.000000000 +0300
Kristian> +++ /home/buildbot/maria-slave/psergey-foxhole-x86/build/mysql-test/r/show_check.reject	2009-05-22 10:47:11.000000000 +0300
Kristian> @@ -252,13 +252,13 @@
Kristian>  flush tables;
Kristian>  show open tables;
Kristian>  Database	Table	In_use	Name_locked
Kristian> -mysql	general_log	0	0
Kristian> +mysql	general_log	1	0
Kristian>  create table t1(n int);
Kristian>  insert into t1 values (1);
Kristian>  show open tables;
Kristian>  Database	Table	In_use	Name_locked
Kristian> -test	t1	0	0
Kristian>  mysql	general_log	0	0
Kristian> +test	t1	0	0
Kristian>  drop table t1;
Kristian>  create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
Kristian>  show create table t1;

<cut>

Kristian> As can be seen, it is a random failure.

Kristian> Would be really great if someone could take a look and fix this.

first problem:

Have no clue how the general_log could say its in use.
This comes from table->in_use, which should be 0 if the table
is not in use by another thread.

I spend some time looking at this, and in_use should be reset by
previous statement in close_thread_tables().

If this happens again, we should file a bug report to MySQL;  If they
are not fixing this, I will take a look.

Second problem:

Don't know if it's defined in which order the tables are in 'show open
table' so the second test is bogus. (In theory it should be a defined
order based on hash values, but apparently it isn't)

I think we should change the code to use:

show open tables from test

Which should fix it.

I noticed that in 5.1 they have 'fixed' this by removing a lot of
SHOW OPEN TABLES test, which I think is the wrong fix.  What they should have
instead done would be to add a --sort-result line to mysqltest.c

Regards,
Monty



References