mariadb/mysql-test/t/disabled.def
unknown 2e22de68f3 Fix for BUG#35441 "Cannot change PAGE_CHECKSUM table option".
A big test was written and is committed, which found 3 bugs in total:
- ALTER TABLE PAGE_CHECKSUM=0 sometimes had no effect
- ALTER TABLE ENGINE=MARIA sometimes changed page checksumming in
the table
- SHOW CREATE TABLE and 'maria_chk -dv' disagreed on the presence
of page checksumming.
They are all fixed here. Side-effect is that SHOW CREATE TABLE now
always prints a PAGE_CHECKSUM clause for Maria tables.


mysql-test/mysql-test-run.pl:
  allow calling maria_chk and maria_pack in tests
mysql-test/r/maria.result:
  PAGE_CHECKSUM=0 is now always printed
mysql-test/t/create.test:
  PAGE_CHECKSUM= is now always present in SHOW CREATE TABLE of Maria tables
mysql-test/t/disabled.def:
  better bug number
sql/sql_table.cc:
  If ALTER TABLE PAGE_CHECKSUM=#, it affects the engine's data (structure
  of data pages) so a full table rebuild is needed. We already did
  so for ROW_FORMAT=#, following same logic. This fixes disagreements
  between SHOW CREATE TABLE and 'maria_chk -dv' regarding the
  presence of page checksums after certain ALTER TABLE (as seen
  with the attached testcase).
storage/maria/ha_maria.cc:
  In ALTER TABLE PAGE_CHECKSUM=0, ha_maria::update_create_info() started
  with create_info->page_checksum=HA_CHOICE_NO and wrongly set it
  to the table's original setting, which is HA_CHOICE_YES if the table
  had page checksums, in which case the ALTER left page checksum
  in the table.
  The fix for this bug is: only if create_info->page_checksum is
  undefined (no clause in the ALTER TABLE, or we are in SHOW CREATE TABLE)
  we may set HA_CHOICE_YES.
  The second bug in this file was that the code left HA_CHOICE_UNDEF if
  the table didn't have page checksums originally, leading ALTER TABLE
  ENGINE=MARIA to change the table's page checksum to the value of
  maria_page_checksum.
  This is fixed by setting create_info->page_checksum to HA_CHOICE_NO
  if UNDEF and table does not have page checksum.
  The side-effect of this last fix, because ha_maria::update_create_info()
  is also called by SHOW CREATE TABLE, is that:
  SET GLOBAL maria_page_checksum=0;
  CREATE TABLE t(a INT) ENGINE=MARIA;
  SHOW CREATE TABLE t;
  which used to not show a PAGE_CHECKSUM= clause, now shows PAGE_CHECKSUM=0.
  I consider this side-effect good:
  - clearer for users: it eliminates the differences between the
  above and this:
  SET GLOBAL maria_page_checksum=0;
  CREATE TABLE t(a INT) ENGINE=MARIA PAGE_CHECKSUM=0;
  SHOW CREATE TABLE t;
  which already showed PAGE_CHECKSUM=0; difference which is not easy
  to explain.
  - if using mysqldump to copy from one server to another, it eliminates
  the dependency on the value of maria_page_checksum being the same on
  original server and new server.
mysql-test/r/maria-page-checksum.result:
  Result. If you undo the code fixes and run the test, the new result
  file will show bugs at:
  error lineno 56 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 73 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 110 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 164 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 181 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 218 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 253 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 307 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 361 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 415 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 488 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 505 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 542 : expected PAGE_CHECKSUM=1, got Page checksums are not used
  error lineno 577 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  error lineno 631 : expected PAGE_CHECKSUM=0, got ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
  (lineno is line number in the result file)
mysql-test/t/maria-page-checksum.test:
  Test for the 3 bugs
2008-03-20 16:05:23 +01:00

27 lines
1.3 KiB
Modula-2

##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
user_limits : Bug#23921 random failure of user_limits.test
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper
federated_transactions : Bug#29523 Transactions do not work
events : Bug#32664 events.test fails randomly
lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log
kill : Bug#29149: Test "kill" fails on Windows
innodb_mysql : Bug#32724: innodb_mysql.test fails randomly
wait_timeout : Bug#32801 wait_timeout.test fails randomly
ctype_create : Bug#32965 main.ctype_create fails
status : Bug#32966 main.status fails
ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166
maria-preload : Bug#34911 unrepeatable output of SHOW STATUS