Bug #6986 "show_check" fails on 64bit platforms
Submitted: 3 Dec 2004 12:46 Modified: 7 Dec 2004 22:35
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.8-pre OS:
Assigned to: Konstantin Osipov CPU Architecture:Any

[3 Dec 2004 12:46] Lenz Grimmer
Description:
Platforms affected: Tru64, Linux/AMD64, Linux/IA64, HP-UX (HPPA/IA64), Solaris
The test suite currently fails on almost all 64bit builds with the following diff:

-------------------------------------------------------
*** r/show_check.result Fri Dec  3 00:16:09 2004
--- r/show_check.reject Fri Dec  3 05:49:22 2004
***************
*** 314,321 ****
  insert into t3 values (1,1),(2,2);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   2       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   2       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   2       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (3),(4);
  insert into t2 values (3),(4);
--- 314,321 ----
  insert into t3 values (1,1),(2,2);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   2       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   2       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   2       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (3),(4);
  insert into t2 values (3),(4);
***************
*** 322,329 ****
  insert into t3 values (3,3),(4,4);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   4       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   4       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   4       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (5);
  insert into t2 values (5);
--- 322,329 ----
  insert into t3 values (3,3),(4,4);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   4       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   4       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   4       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (5);
  insert into t2 values (5);
***************
*** 330,337 ****
  insert into t3 values (5,5);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   5       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   5       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   5       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1 where a=3;
  delete from t2 where b=3;
--- 330,337 ----
  insert into t3 values (5,5);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   5       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   5       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   5       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1 where a=3;
  delete from t2 where b=3;
***************
*** 338,345 ****
  delete from t3 where a=3;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   4       5       #       #       #       5       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   4       5       #       #       #       5       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   4       9       #       #       #       9       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1;
  delete from t2;
--- 338,345 ----
  delete from t3 where a=3;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   4       8       #       #       #       8       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   4       8       #       #       #       8       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   4       9       #       #       #       9       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1;
  delete from t2;
***************
*** 346,353 ****
  delete from t3;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   0       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   0       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   0       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (5);
  insert into t2 values (5);
--- 346,353 ----
  delete from t3;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   0       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   0       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   0       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  insert into t1 values (5);
  insert into t2 values (5);
***************
*** 354,361 ****
  insert into t3 values (5,5);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   1       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   1       5       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   1       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1 where a=5;
  delete from t2 where b=5;
--- 354,361 ----
  insert into t3 values (5,5);
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   1       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   1       8       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   1       9       #       #       #       0       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  delete from t1 where a=5;
  delete from t2 where b=5;
***************
*** 362,369 ****
  delete from t3 where a=5;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   0       5       #       #       #       5       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   0       5       #       #       #       5       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   0       9       #       #       #       9       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  drop table t1, t2, t3;
  create database mysqltest;
--- 362,369 ----
  delete from t3 where a=5;
  show table status;
  Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length        Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation   Checksum        Create_options  Comment
! t1    HEAP    9       Fixed   0       8       #       #       #       8       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
! t2    HEAP    9       Fixed   0       8       #       #       #       8       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  t3    HEAP    9       Fixed   0       9       #       #       #       9       NULL    NULL    NULL
        NULL    latin1_swedish_ci       NULL
  drop table t1, t2, t3;
  create database mysqltest;
-------------------------------------------------------

How to repeat:
Run the show_check on any of these platforms and observe the diff above.
[7 Dec 2004 22:33] Konstantin Osipov
ChangeSet
  1.2143 04/12/08 01:31:00 konstantin@mysql.com +2 -0
  A followup to Bug#6878 "Crash with engine=memory", reported as Bug#6986
  ""show_check" fails on 64bit platforms": now minimal rec_length
  of a HEAP table >= sizeof(void*), hence it's platform-dependant.
[7 Dec 2004 22:35] Konstantin Osipov
Fixed in 4.1.8