mariadb/mysql-test/r/row-checksum-old.result

88 lines
2.2 KiB
Text
Raw Normal View History

Fix for Bug #37007 Maria: different checksum for MyISAM table depending on CHECKSUM=0|1 This also adds a check that MyISAM tables with incompatible checksums are detected by CHECK TABLE ... [FOR UPGRADE] and thus also by mysql_upgrade. The tables that are incomatible are MyISAM tables with ROW_FORMAT=fixed and has VARCHAR fields and have CHECKSUM enabled. Before these tables gave different checksum if you used CHECK TABLE with or without EXTENDED mysql-test/r/old-mode.result: Now we get same results with and without EXTENDED mysql-test/r/row-checksum-old.result: Initial results mysql-test/r/row-checksum.result: Initial results mysql-test/t/old-mode.test: Added test with QUICK to show that the live checksum is not used when running with --old mysql-test/t/row-checksum-old-master.opt: Start mysqld with --old mode to enable old checksum code mysql-test/t/row-checksum-old.test: Run row-checksum test under mysqld --old mysql-test/t/row-checksum.test: Verify that checksum are calculated the same way with and without EXTENDED We run this with several storage engines to ensure results are the same over storage engines sql/ha_partition.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/handler.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/handler.h: Split HA_HAS_CHECKSUM into HA_HAS_NEW_CHECKSUM and HA_HAS_OLD_CHECKSUM flags. This is a safe API change as only MyISAM and Maria should use these handler flags. sql/sql_show.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/sql_table.cc: Use file->checksum() for live checksums if the life checksum method corresponds to the mysqld --old flag storage/maria/ha_maria.cc: Use new HA_HAS_xxx_CHECKSUM flags storage/myisam/ha_myisam.cc: Set HA_HAS_OLD_CHECKSUM and/or HA_HAS_NEW_CHECKSUM flags depending on if this is a new myisam or old myisam file Add method check_for_upgrade() to detect if the table is of old version with a checksum that is incompatible with CHECK TABLE ... EXTENDED storage/myisam/ha_myisam.h: Added check_for_upgrade() storage/myisam/mi_open.c: Removed not neede cast Initialize share->has_null_fields and share->has_varchar_fields variables storage/myisam/myisamdef.h: Added share->has_null_fields and share->has_varchar_fields
2008-06-28 14:45:15 +02:00
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 452555338
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=1;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 452555338
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 452555338
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table t1;
create table t1 (a int null, v varchar(100)) engine=maria checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 452555338
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table t1;
create table t1 (a int null, v varchar(100)) engine=maria checksum=1;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 452555338
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=1 row_format=fixed;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 4108368782
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 4108368782
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
XtraDB after-merge fixes. Fixes to get the test suite to run without failures. mysql-test/r/information_schema.result: Additional variables available now. Sort output to avoid depending on engine order. mysql-test/r/information_schema_all_engines.result: More variables now. mysql-test/r/innodb-autoinc.result: Avoid picking up pbxt variables in result mysql-test/r/innodb-index.result: Save state to not corrupt following testcases. Suppress an expected warning. mysql-test/r/innodb-zip.result: Work around a problem with dependency on zlib version mysql-test/r/innodb.result: Checksums have changed in Maria. Save and restore server state to not corrupt following testcases. mysql-test/r/innodb_bug36169.result: Save and restore server state to not corrupt following testcases. mysql-test/r/innodb_xtradb_bug317074.result: Save and restore server state to not corrupt following testcases. mysql-test/r/row-checksum-old.result: Update result file mysql-test/r/row-checksum.result: Update result file mysql-test/t/information_schema.test: Sort output to avoid depending on engine order. mysql-test/t/innodb-analyze.test: Save and restore server state to not corrupt following testcases. mysql-test/t/innodb-autoinc.test: Save and restore server state to not corrupt following testcases. mysql-test/t/innodb-index.test: Save state to not corrupt following testcases. Suppress an expected warning. mysql-test/t/innodb-zip.test: Work around a problem with dependency on zlib version mysql-test/t/innodb.test: Save and restore server state to not corrupt following testcases. Update --replace statements for new mysql-test-run mysql-test/t/innodb_bug34300.test: Save and restore server state to not corrupt following testcases. mysql-test/t/innodb_bug36169.test: Save and restore server state to not corrupt following testcases. mysql-test/t/innodb_bug36172.test: Save and restore server state to not corrupt following testcases. mysql-test/t/innodb_xtradb_bug317074.test: Save and restore server state to not corrupt following testcases. mysql-test/t/partition_innodb.test: Fix regexps to work with new SHOW INNODB STATUS output. mysys/thr_mutex.c: Initialize mutex deadlock detection lazily. This allows to test XtraDB, which initializes huge amounts of mutexes without using any but a few of them. storage/xtradb/ibuf/ibuf0ibuf.c: Fix problem where value of INNODB_IBUF_MAX_SIZE would depend on the alignment of memory allocated by the buffer pool. storage/xtradb/include/sync0rw.h: Fix XtraDB to compile without GCC atomic operation intrinsics (performance may suffer when they are not available though). storage/xtradb/include/sync0rw.ic: Fix XtraDB to compile without GCC atomic operation intrinsics (performance may suffer when they are not available though). storage/xtradb/include/univ.i: Fix for MariaDB storage/xtradb/setup.sh: Remove no longer needed file from XtraDB. storage/xtradb/srv/srv0start.c: Fix for MariaDB
2009-06-09 17:08:46 +02:00
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
Fix for Bug #37007 Maria: different checksum for MyISAM table depending on CHECKSUM=0|1 This also adds a check that MyISAM tables with incompatible checksums are detected by CHECK TABLE ... [FOR UPGRADE] and thus also by mysql_upgrade. The tables that are incomatible are MyISAM tables with ROW_FORMAT=fixed and has VARCHAR fields and have CHECKSUM enabled. Before these tables gave different checksum if you used CHECK TABLE with or without EXTENDED mysql-test/r/old-mode.result: Now we get same results with and without EXTENDED mysql-test/r/row-checksum-old.result: Initial results mysql-test/r/row-checksum.result: Initial results mysql-test/t/old-mode.test: Added test with QUICK to show that the live checksum is not used when running with --old mysql-test/t/row-checksum-old-master.opt: Start mysqld with --old mode to enable old checksum code mysql-test/t/row-checksum-old.test: Run row-checksum test under mysqld --old mysql-test/t/row-checksum.test: Verify that checksum are calculated the same way with and without EXTENDED We run this with several storage engines to ensure results are the same over storage engines sql/ha_partition.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/handler.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/handler.h: Split HA_HAS_CHECKSUM into HA_HAS_NEW_CHECKSUM and HA_HAS_OLD_CHECKSUM flags. This is a safe API change as only MyISAM and Maria should use these handler flags. sql/sql_show.cc: Use new HA_HAS_xxx_CHECKSUM flags sql/sql_table.cc: Use file->checksum() for live checksums if the life checksum method corresponds to the mysqld --old flag storage/maria/ha_maria.cc: Use new HA_HAS_xxx_CHECKSUM flags storage/myisam/ha_myisam.cc: Set HA_HAS_OLD_CHECKSUM and/or HA_HAS_NEW_CHECKSUM flags depending on if this is a new myisam or old myisam file Add method check_for_upgrade() to detect if the table is of old version with a checksum that is incompatible with CHECK TABLE ... EXTENDED storage/myisam/ha_myisam.h: Added check_for_upgrade() storage/myisam/mi_open.c: Removed not neede cast Initialize share->has_null_fields and share->has_varchar_fields variables storage/myisam/myisamdef.h: Added share->has_null_fields and share->has_varchar_fields
2008-06-28 14:45:15 +02:00
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 4108368782
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 4108368782
drop table t1;