Bug #31171 test alter_table, fulltext2, ps, sp fail, "Table is already up to date" vs. "OK"
Submitted: 24 Sep 2007 9:26 Modified: 23 Jan 2008 16:32
Reporter: Daniel Fischer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.22-rc OS:MacOS (Server 10.5)
Assigned to: Georgi Kodinov CPU Architecture:Any

[24 Sep 2007 9:26] Daniel Fischer
Description:
main.alter_table               [ fail ]

-------------------------------------------------------
*** /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/alter_table.result	Thu Sep 20 18:34:03 2007
--- /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/alter_table.reject	Mon Sep 24 11:00:02 2007
***************
*** 84,90 ****
  UNLOCK TABLES;
  OPTIMIZE TABLE t1;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
  DROP TABLE t1;
  create table t1 (i int unsigned not null auto_increment primary key);
  insert into t1 values (null),(null),(null),(null);
--- 84,90 ----
  UNLOCK TABLES;
  OPTIMIZE TABLE t1;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
  DROP TABLE t1;
  create table t1 (i int unsigned not null auto_increment primary key);
  insert into t1 values (null),(null),(null),(null);
***************
*** 291,301 ****
  t1	1	b	1	b	A	100	NULL	NULL	YES	BTREE	
  analyze table t1;
  Table	Op	Msg_type	Msg_text
! test.t1	analyze	status	OK
  show keys from t1;
  Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
! t1	0	a	1	a	A	3	NULL	NULL	YES	BTREE	
! t1	0	a	2	b	A	300	NULL	NULL	YES	BTREE	
  t1	1	b	1	b	A	100	NULL	NULL	YES	BTREE	
  drop table t1;
  CREATE TABLE t1 (i int(10), index(i) );
--- 291,301 ----
  t1	1	b	1	b	A	100	NULL	NULL	YES	BTREE	
  analyze table t1;
  Table	Op	Msg_type	Msg_text
! test.t1	analyze	status	Table is already up to date
  show keys from t1;
  Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
! t1	0	a	1	a	A	NULL	NULL	NULL	YES	BTREE	
! t1	0	a	2	b	A	NULL	NULL	NULL	YES	BTREE	
  t1	1	b	1	b	A	100	NULL	NULL	YES	BTREE	
  drop table t1;
  CREATE TABLE t1 (i int(10), index(i) );
-------------------------------------------------------

main.fulltext2                 [ fail ]

-------------------------------------------------------
*** /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/fulltext2.result	Thu Sep 20 18:34:03 2007
--- /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/fulltext2.reject	Mon Sep 24 11:06:35 2007
***************
*** 12,18 ****
  test.t1	check	status	OK
  optimize table t1;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
  check table t1;
  Table	Op	Msg_type	Msg_text
  test.t1	check	status	OK
--- 12,18 ----
  test.t1	check	status	OK
  optimize table t1;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
  check table t1;
  Table	Op	Msg_type	Msg_text
  test.t1	check	status	OK
-------------------------------------------------------

main.ps                        [ fail ]

-------------------------------------------------------
*** /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/ps.result	Thu Sep 20 18:34:03 2007
--- /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/ps.reject	Mon Sep 24 11:25:19 2007
***************
*** 1338,1344 ****
  prepare stmt from "optimize table t1";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
  execute stmt;
  Table	Op	Msg_type	Msg_text
  test.t1	optimize	status	Table is already up to date
--- 1338,1344 ----
  prepare stmt from "optimize table t1";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
  execute stmt;
  Table	Op	Msg_type	Msg_text
  test.t1	optimize	status	Table is already up to date
***************
*** 1363,1371 ****
  prepare stmt from "optimize table t1, t2, t3";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
! test.t2	optimize	status	OK
! test.t3	optimize	status	OK
  execute stmt;
  Table	Op	Msg_type	Msg_text
  test.t1	optimize	status	Table is already up to date
--- 1363,1371 ----
  prepare stmt from "optimize table t1, t2, t3";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
! test.t2	optimize	status	Table is already up to date
! test.t3	optimize	status	Table is already up to date
  execute stmt;
  Table	Op	Msg_type	Msg_text
  test.t1	optimize	status	Table is already up to date
***************
*** 1398,1405 ****
  prepare stmt from "optimize table t1, t3, t4";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
! test.t3	optimize	status	OK
  test.t4	optimize	Error	Table 'test.t4' doesn't exist
  test.t4	optimize	error	Corrupt
  execute stmt;
--- 1398,1405 ----
  prepare stmt from "optimize table t1, t3, t4";
  execute stmt;
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
! test.t3	optimize	status	Table is already up to date
  test.t4	optimize	Error	Table 'test.t4' doesn't exist
  test.t4	optimize	error	Corrupt
  execute stmt;
-------------------------------------------------------

main.sp                        [ fail ]

-------------------------------------------------------
*** /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/sp.result	Thu Sep 20 18:34:03 2007
--- /Users/df/mysql/mysql-5.1.22-rc/mysql-test/r/sp.reject	Mon Sep 24 11:29:02 2007
***************
*** 4430,4438 ****
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
! test.t2	optimize	status	OK
! test.t3	optimize	status	OK
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
--- 4430,4438 ----
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
! test.t2	optimize	status	Table is already up to date
! test.t3	optimize	status	Table is already up to date
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
***************
*** 4449,4457 ****
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
! test.t2	optimize	status	OK
! test.t3	optimize	status	OK
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
--- 4449,4457 ----
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
! test.t2	optimize	status	Table is already up to date
! test.t3	optimize	status	Table is already up to date
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
***************
*** 4468,4476 ****
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	OK
! test.t2	optimize	status	OK
! test.t3	optimize	status	OK
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
--- 4468,4476 ----
  test.v1	repair	Error	'test.v1' is not BASE TABLE
  test.v1	repair	error	Corrupt
  Table	Op	Msg_type	Msg_text
! test.t1	optimize	status	Table is already up to date
! test.t2	optimize	status	Table is already up to date
! test.t3	optimize	status	Table is already up to date
  test.v1	optimize	Error	'test.v1' is not BASE TABLE
  test.v1	optimize	error	Corrupt
  Table	Op	Msg_type	Msg_text
-------------------------------------------------------

How to repeat:
Build 5.1.22-rc source on Mac OS X 10.5 and run the test suite.
[29 Oct 2007 20:38] Sveta Smirnova
Thank you for the report.

Verified as described.
[21 Nov 2007 16:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38215

ChangeSet@1.2635, 2007-11-21 18:10:06+02:00, gkodinov@macbook.gmz +1 -0
  Bug #31171: test alter_table, fulltext2, ps, sp fail, 
   "Table is already up to date" vs. "OK"
  
  On MacOSX 10.5 when you cast something to "bool"
  (the built in C type) it takes values 0 or 1 
  instead of 0-255 as it seems to be on older compilers.
  Fixed a typecast to use correct type (uint) when 
  reading a uint value.
  No test case needed : there are tests that test it.
[21 Nov 2007 16:41] Sergei Glukhov
ok to push
[21 Nov 2007 16:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38217

ChangeSet@1.2635, 2007-11-21 18:52:38+02:00, gkodinov@macbook.gmz +1 -0
  Bug #31171: test alter_table, fulltext2, ps, sp fail, 
   "Table is already up to date" vs. "OK"
  
  On MacOSX 10.5 when you cast something to "bool"
  (the built in C type) it takes values 0 or 1 
  instead of 0-255 as it seems to be on older compilers.
  Fixed by removing the typecast (not needed).
  No test case needed : there are tests that test it.
[14 Dec 2007 8:18] Bugs System
Pushed into 5.1.23-rc
[14 Dec 2007 8:21] Bugs System
Pushed into 6.0.5-alpha
[23 Jan 2008 16:32] Paul DuBois
Noted in 5.1.23, 6.0.5 changelogs.

Corrected a typecast involving bool on Mac OS X 10.5 (Leopard), which
evaluated differently from earlier Mac OS X versions.