mariadb/mysql-test/suite/maria/maria-page-checksum.result

941 lines
29 KiB
Text
Raw Normal View History

Added versioning of row data Will in future changeset (soon) av versioning of status variables (number of rows) and index Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Removed some not needed variables (as noticed by Guilhem) include/maria.h: Added prototypes for maria_chk_init_for_check(), maria_versioning() and maria_ignore_trids() include/my_base.h: Add new error HA_ERR_ROW_NOT_VISIBLE include/myisamchk.h: Added variables for checking visibility of rows during maria_chk include/thr_lock.h: Changed argument type from int to my_bool for get_status Added variable allow_multiple_concurrent_insert, to signal if table supports multiple concurrent inserts mysql-test/r/maria-page-checksum.result: Added missing drop table mysql-test/t/maria-page-checksum.test: Added missing drop table mysys/my_handler.c: Added new error messages mysys/thr_lock.c: Added support for multiple concurrent inserts, if table handler supports it sql/sql_yacc.yy: Added LOCK TABLE table_name WRITE CONCURRENT This was added (temporarly?) to be able to check versioning with Maria storage/csv/ha_tina.cc: Updated parameter for get_status storage/maria/ha_maria.cc: Added calls to maria_chk_init_status() Fixed call to ma_control_file_open() storage/maria/ma_blockrec.c: Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Changed back some 'header' parameters to const char* Removed some casts Added support for versioning: - If info->row_flag & ROW_FLAG_TRANSID is set, store transaction id together with the row - When reading rows, check if rows are visible. Give error if not - When scanning table, ignore not visible rows - Added function parameters to some functions, to be able to call _ma_compact_block_page() with different parameters depending of if the page is a HEAD or TAIL page - _ma_compact_block_page() deletes transaction id's that are visible by all running transactions - Added functions for thr_lock() to enable multiple concurrent inserts - Added helper function 'mysql_versioning()' to enable/disable versioning - Added helper function maria_ignore_trids(), used by maria_chk and maria_pack to see all rows. storage/maria/ma_blockrec.h: Updated parameters for some functions. Added new functions to read/store state with thr_lock storage/maria/ma_check.c: Enable handling of transaction id's in rows Give a readable error if a table contains a transation id that makes rows not visible storage/maria/ma_control_file.c: Added option to not give warning if control file doesn't exists. storage/maria/ma_control_file.h: Updated parameter lists for ma_control_file_open() storage/maria/ma_delete.c: Removed not used variable (suggestion by Guilhem) storage/maria/ma_locking.c: Changed type of argument from int -> my_bool storage/maria/ma_open.c: Removed not used variables 'key_write_undo_lsn' and 'key_delete_undo_lsn' Added new thr_lock interface functions for BLOCK_RECORD to enable multiple concurrent insert storage/maria/ma_test1.c: Added option --versioning (-C) to check versioning storage/maria/ma_test2.c: Added option -C to check versioning storage/maria/ma_test_recovery: Forward argumetns to ma_test_recovery.pl storage/maria/ma_write.c: Removed not used variable key_write_undo_lsn storage/maria/maria_chk.c: Always read control file (if exist) at start Initialize checking of tables by calling maria_chk_init_for_check() In verbose mode and in case of error, print max found transaction id storage/maria/maria_def.h: Added Trid to MARIA_ROW to be able to check transaction id for found row Moved 'base_length' from MARIA_ROW to MARIA_HA to be able to handle different base length (with and without TRANSID) without if's Added default row_flag to MARIA_HA for the same reason Changed LEX_STRING -> LEX_CUSTRING to avoid casts in ma_blockrec.c Removed not needed variables key_write_undo_lsn and key_delete_undo_lsn Added prototypes for new functions and fixed those that had changed storage/maria/maria_pack.c: Ensure we can read all rows from the file, independent of the used transaction id storage/maria/maria_read_log.c: Updated arguments to ma_control_file_open() storage/maria/trnman.c: If we have only one transaction, fixed that min_read_from contains current transaction Fixed that trnman_can_read_from() returns that row is readable if it was written by current transaction storage/maria/unittest/ma_control_file-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_all-t: Added test of versioning Removed printing of one extra space storage/maria/unittest/ma_test_loghandler-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_recovery.expected: Updated file with result from new tests storage/maria/unittest/ma_test_recovery.pl: Added options --abort-on-error and --verbose In case of --verbose, print all excuted shell commands Added test of versioning storage/myisam/mi_locking.c: Updated type of parameter storage/myisam/myisamdef.h: Updated type of parameter mysql-test/r/maria-mvcc.result: New BitKeeper file ``mysql-test/r/maria-mvcc.result'' mysql-test/t/maria-mvcc.test: New BitKeeper file ``mysql-test/t/maria-mvcc.test''
2008-04-10 04:26:36 +02:00
drop table if exists t1;
2010-09-12 18:40:01 +02:00
select @@global.aria_page_checksum;
@@global.aria_page_checksum
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
1
2013-07-13 22:29:17 +02:00
# iteration 1a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 2a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 3a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 4a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 5a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 6a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 7a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 8a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 9a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 10a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 11a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 12a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 13a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 14a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 15a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 16a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 17a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 18a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 19a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 20a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 21a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 22a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 23a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 24a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 25a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 26a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 27a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 28a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 29a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 30a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 31a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 32a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 33a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 0 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 34a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
alter table t1 engine=aria ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 35a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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
Page checksums are not used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 36a
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
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
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
2010-09-12 18:40:01 +02:00
set global aria_page_checksum = 1 ;
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
alter table t1 PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
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
Page checksums are used
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 1b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
alter table t1 modify a bigint ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 2b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
alter table t1 transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 3b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
alter table t1 transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 4b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 5b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 6b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 7b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
alter table t1 modify a bigint ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 8b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
alter table t1 transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 9b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
alter table t1 transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 10b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 11b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 12b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 13b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
alter table t1 modify a bigint ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 14b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
alter table t1 transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 15b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
alter table t1 transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 16b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 17b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=0 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
2013-07-13 22:29:17 +02:00
# iteration 18b
2010-09-12 18:40:01 +02:00
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
2010-09-12 18:40:01 +02:00
alter table t1 engine=aria transactional=1 ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
2010-09-12 18:40:01 +02:00
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;