Bug #14059 Test case 'show_check' might fail randomly depending on optimizer path
Submitted: 16 Oct 2005 20:07 Modified: 24 Nov 2006 12:15
Reporter: Kent Boortz Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.0.15 OS:
Assigned to: Andrey Hristov CPU Architecture:Any

[16 Oct 2005 20:07] Kent Boortz
Description:
On one platform, and by random it seems (I did rerun the test case),
the output seems to be in a different order than expected by the
"*.result" file. Question is, is this behavior expected?

If it is expected for the engine used, maybe a SORT BY or something
would make the test return the same result each time?

Diff included below. As I said, I can't reproduce it with the
same install as in the failure, so this is likely "random".

*** r/show_check.result Sat Oct 15 06:05:46 2005
--- r/show_check.reject Sat Oct 15 16:06:23 2005
***************
*** 520,539 ****
  1
  SHOW OPEN TABLES;
  Database      Table   In_use  Name_locked
! mysql db      0       0
  test  urkunde 0       0
  mysql time_zone       0       0
  mysql user    0       0
  test  txt1    0       0
! mysql proc    0       0
  test  tyt2    0       0
  mysql time_zone_name  0       0
  SHOW OPEN TABLES FROM mysql;
  Database      Table   In_use  Name_locked
! mysql db      0       0
  mysql time_zone       0       0
  mysql user    0       0
! mysql proc    0       0
  mysql time_zone_name  0       0
  SHOW OPEN TABLES FROM mysql LIKE 'u%';
  Database      Table   In_use  Name_locked
--- 520,539 ----
  1
  SHOW OPEN TABLES;
  Database      Table   In_use  Name_locked
! mysql proc    0       0
  test  urkunde 0       0
  mysql time_zone       0       0
  mysql user    0       0
  test  txt1    0       0
! mysql db      0       0
  test  tyt2    0       0
  mysql time_zone_name  0       0
  SHOW OPEN TABLES FROM mysql;
  Database      Table   In_use  Name_locked
! mysql proc    0       0
  mysql time_zone       0       0
  mysql user    0       0
! mysql db      0       0
  mysql time_zone_name  0       0
  SHOW OPEN TABLES FROM mysql LIKE 'u%';
  Database      Table   In_use  Name_locked
***************
*** 546,553 ****
  mysql time_zone_name  0       0
  SHOW OPEN TABLES LIKE '%o%';
  Database      Table   In_use  Name_locked
- mysql time_zone       0       0
  mysql proc    0       0
  mysql time_zone_name  0       0
  FLUSH TABLES;
  SHOW OPEN TABLES;
--- 546,553 ----
  mysql time_zone_name  0       0
  SHOW OPEN TABLES LIKE '%o%';
  Database      Table   In_use  Name_locked
  mysql proc    0       0
+ mysql time_zone       0       0
  mysql time_zone_name  0       0
  FLUSH TABLES;
  SHOW OPEN TABLES;

How to repeat:
Run the test suite lots of times :-)
[17 Oct 2005 8:46] Sergei Golubchik
the order of tables is

  ORDER BY hash(concat(db_name, '\0', table_name, '\0', pseudo_thread_id))

I cannot see how it can produce different results "occasionally".
[24 Nov 2006 12:15] Andrey Hristov
I don't see this happening any more. Closing