mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-25105 Remove innodb_checksum_algorithm values none,innodb,...
Historically, InnoDB supported a buggy page checksum algorithm that did not compute a checksum over the full page. Later, well before MySQL 4.1 introduced .ibd files and the innodb_file_per_table option, the algorithm was corrected and the first 4 bytes of each page were redefined to be a checksum. The original checksum was so slow that an option to disable page checksum was introduced for benchmarketing purposes. The Intel Nehalem microarchitecture introduced the SSE4.2 instruction set extension, which includes instructions for faster computation of CRC-32C. In MySQL 5.6 (and MariaDB 10.0), innodb_checksum_algorithm=crc32 was implemented to make of that. As that option was changed to be the default in MySQL 5.7, a bug was found on big-endian platforms and some work-around code was added to weaken that checksum further. MariaDB disables that work-around by default since MDEV-17958. Later, SIMD-accelerated CRC-32C has been implemented in MariaDB for POWER and ARM and also for IA-32/AMD64, making use of carry-less multiplication where available. Long story short, innodb_checksum_algorithm=crc32 is faster and more secure than the pre-MySQL 5.6 checksum, called innodb_checksum_algorithm=innodb. It should have removed any need to use innodb_checksum_algorithm=none. The setting innodb_checksum_algorithm=crc32 is the default in MySQL 5.7 and MariaDB Server 10.2, 10.3, 10.4. In MariaDB 10.5, MDEV-19534 made innodb_checksum_algorithm=full_crc32 the default. It is even faster and more secure. The default settings in MariaDB do allow old data files to be read, no matter if a worse checksum algorithm had been used. (Unfortunately, before innodb_checksum_algorithm=full_crc32, the data files did not identify which checksum algorithm is being used.) The non-default settings innodb_checksum_algorithm=strict_crc32 or innodb_checksum_algorithm=strict_full_crc32 would only allow CRC-32C checksums. The incompatibility with old data files is why they are not the default. The newest server not to support innodb_checksum_algorithm=crc32 were MySQL 5.5 and MariaDB 5.5. Both have reached their end of life. A valid reason for using innodb_checksum_algorithm=innodb could have been the ability to downgrade. If it is really needed, data files can be converted with an older version of the innochecksum utility. Because there is no good reason to allow data files to be written with insecure checksums, we will reject those option values: innodb_checksum_algorithm=none innodb_checksum_algorithm=innodb innodb_checksum_algorithm=strict_none innodb_checksum_algorithm=strict_innodb Furthermore, the following innochecksum options will be removed, because only strict crc32 will be supported: innochecksum --strict-check=crc32 innochecksum -C crc32 innochecksum --write=crc32 innochecksum -w crc32 If a user wishes to convert a data file to use a different checksum (so that it might be used with the no-longer-supported MySQL 5.5 or MariaDB 5.5, which do not support IMPORT TABLESPACE nor system tablespace format changes that were made in MariaDB 10.3), then the innochecksum tool from MariaDB 10.2, 10.3, 10.4, 10.5 or MySQL 5.7 can be used. Reviewed by: Thirunarayanan Balathandayuthapani
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
[crc32]
|
||||
--innodb-checksum-algorithm=crc32
|
||||
|
||||
[full_crc32]
|
||||
--innodb-checksum-algorithm=full_crc32
|
@@ -1 +0,0 @@
|
||||
--skip-innodb-doublewrite
|
@@ -1,19 +1,12 @@
|
||||
#************************************************************
|
||||
# WL6045:Improve Innochecksum
|
||||
#************************************************************
|
||||
--source include/innodb_page_size_small.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/no_valgrind_without_big.inc
|
||||
# Embedded server does not support crashing.
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Avoid CrashReporter popup on Mac.
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
--echo # Set the environmental variables
|
||||
let MYSQLD_BASEDIR= `SELECT @@basedir`;
|
||||
let MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
|
||||
let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
|
||||
|
||||
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
|
||||
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
|
||||
@@ -21,10 +14,6 @@ call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"
|
||||
CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
|
||||
CREATE INDEX idx1 ON tab1(c2(10));
|
||||
INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
|
||||
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
insert into t1 values(1,"i");
|
||||
insert into t1 values(2,"am");
|
||||
insert into t1 values(3,"compressed table");
|
||||
|
||||
--echo # Shutdown the Server
|
||||
--source include/shutdown_mysqld.inc
|
||||
@@ -42,12 +31,6 @@ insert into t1 values(3,"compressed table");
|
||||
--echo [1b]: check the innochecksum without --strict-check
|
||||
--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo [2]: check the innochecksum with full form --strict-check=crc32
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo [3]: check the innochecksum with short form -C crc32
|
||||
--exec $INNOCHECKSUM -C crc32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
@@ -63,195 +46,21 @@ let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
|
||||
--echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=innodb --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
|
||||
let SEARCH_PATTERN= unknown variable 'strict-check=innodb';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo [8]: check the innochecksum with short & full form combination
|
||||
--echo # strict-check & no-check, an error is expected
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo [9]: check the innochecksum with full form --strict-check=innodb
|
||||
# Server Default checksum = crc32
|
||||
let $error_code = 0;
|
||||
|
||||
if ($checksum_algorithm == "crc32")
|
||||
{
|
||||
let $error_code = 1;
|
||||
}
|
||||
|
||||
if ($checksum_algorithm == "strict_crc32")
|
||||
{
|
||||
let $error_code = 1;
|
||||
}
|
||||
|
||||
--error $error_code
|
||||
--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
|
||||
--echo [10]: check the innochecksum with full form --strict-check=none
|
||||
--echo # when server Default checksum=crc32
|
||||
--error $error_code
|
||||
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
|
||||
--echo [11]: check the innochecksum with short form -C innodb
|
||||
--echo # when server Default checksum=crc32
|
||||
--error $error_code
|
||||
--exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
|
||||
--echo [12]: check the innochecksum with short form -C none
|
||||
--echo # when server Default checksum=crc32
|
||||
--error $error_code
|
||||
--exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
|
||||
--echo [13]: check strict-check with invalid values
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
|
||||
let SEARCH_PATTERN= unknown option '-C';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -C strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
|
||||
--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= unknown variable 'write=crc32';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -C strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -C strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM -C InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2>$SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=crc $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'crc\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --strict-check=no $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo [14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
|
||||
--echo # Also check the long form of write option.
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/t1.ibd
|
||||
# Rewrite done, verify with --strict-check=crc32
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd
|
||||
|
||||
--echo [14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
|
||||
--echo # Also check the long form of write option.
|
||||
--exec $INNOCHECKSUM --no-check --write=innodb $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --strict-check=crc32 --write=innodb $MYSQLD_DATADIR/test/t1.ibd
|
||||
# Rewrite done, verify with --strict-check=innodb
|
||||
--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo # start the server with innodb_checksum_algorithm=InnoDB
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=innodb
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
|
||||
SELECT c1,c2 FROM tab1 order by c1,c2;
|
||||
|
||||
--echo # Stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
|
||||
--echo # Also check the short form of write option.
|
||||
--exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/t1.ibd
|
||||
# Rewrite done, verify with --strict-check=none
|
||||
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
|
||||
|
||||
--echo # Start the server with checksum algorithm=none
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=none
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
INSERT INTO tab1 VALUES(3, 'Innochecksum None');
|
||||
SELECT c1,c2 FROM tab1 order by c1,c2;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [16]: rewrite into new checksum=crc32 with innochecksum
|
||||
--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo # Restart the DB server with innodb_checksum_algorithm=crc32
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=crc32
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
SELECT * FROM tab1;
|
||||
DELETE FROM tab1 where c1=3;
|
||||
SELECT c1,c2 FROM tab1 order by c1,c2;
|
||||
|
||||
--echo # Stop server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [17]: rewrite into new checksum=InnoDB
|
||||
--exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
|
||||
|
||||
--echo # Restart the DB server with innodb_checksum_algorithm=InnoDB
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=innodb
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
DELETE FROM tab1 where c1=2;
|
||||
SELECT * FROM tab1;
|
||||
|
||||
--echo # Stop server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [18]:check Innochecksum with invalid write options
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --no-check --write=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN=Error while setting value \'strict_crc32\' to \'write\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --no-check --write=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN=Error while setting value \'strict_innodb\' to \'write\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--error 1
|
||||
--exec $INNOCHECKSUM --no-check --write=crc23 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
|
||||
let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\';
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $SEARCH_FILE
|
||||
|
||||
# Cleanup
|
||||
--let $restart_parameters=
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
DROP TABLE tab1;
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#************************************************************
|
||||
--source include/innodb_page_size_small.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/no_valgrind_without_big.inc
|
||||
# Avoid CrashReporter popup on Mac.
|
||||
--source include/not_crashrep.inc
|
||||
|
||||
@@ -93,27 +92,3 @@ EOF
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo [5]:# Check the innochecksum for compressed table t1 with different key_block_size
|
||||
--echo # Test for KEY_BLOCK_SIZE=1
|
||||
--let $size=1
|
||||
--source ../include/innodb-wl6045.inc
|
||||
|
||||
--echo # Test for KEY_BLOCK_SIZE=2
|
||||
--let $size=2
|
||||
--source ../include/innodb-wl6045.inc
|
||||
|
||||
--echo # Test for for KEY_BLOCK_SIZE=4
|
||||
--let $size=4
|
||||
--source ../include/innodb-wl6045.inc
|
||||
|
||||
set innodb_strict_mode=off;
|
||||
--echo # Test for for KEY_BLOCK_SIZE=8
|
||||
--let $size=8
|
||||
--source ../include/innodb-wl6045.inc
|
||||
|
||||
set innodb_strict_mode=off;
|
||||
--echo # Test for KEY_BLOCK_SIZE=16
|
||||
--let $size=16
|
||||
--source ../include/innodb-wl6045.inc
|
||||
--echo # Test[5] completed
|
||||
|
@@ -19,8 +19,6 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
|
||||
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
|
||||
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to.*");
|
||||
|
||||
--echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
|
||||
|
||||
CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
|
||||
linestring_key GEOMETRY NOT NULL,
|
||||
linestring_nokey GEOMETRY NOT NULL)
|
||||
@@ -59,137 +57,6 @@ while ($i) {
|
||||
dec $i;
|
||||
}
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM tab2 ORDER BY col_7;
|
||||
|
||||
--echo # stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
|
||||
--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab2.ibd
|
||||
--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/ibdata1
|
||||
perl;
|
||||
foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
|
||||
system("$ENV{INNOCHECKSUM} --no-check --write=InnoDB $_")
|
||||
}
|
||||
EOF
|
||||
|
||||
--echo : start the server with innodb_checksum_algorithm=strict_innodb
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=strict_innodb
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
|
||||
VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
|
||||
|
||||
# load the with repeat function
|
||||
SET @col_1 = repeat('a', 5);
|
||||
SET @col_2 = repeat('b', 20);
|
||||
SET @col_3 = repeat('c', 100);
|
||||
SET @col_4 = repeat('d', 100);
|
||||
SET @col_5 = repeat('e', 100);
|
||||
SET @col_6 = repeat('f', 100);
|
||||
|
||||
# check the table status is GOOD with DML
|
||||
let $i = 6;
|
||||
eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
|
||||
VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
|
||||
|
||||
-- disable_result_log
|
||||
SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
|
||||
FROM tab1 ORDER BY pk;
|
||||
|
||||
-- disable_result_log
|
||||
SELECT * FROM tab2 ORDER BY col_7;
|
||||
|
||||
--echo # stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
|
||||
--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab2.ibd
|
||||
--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/ibdata1
|
||||
perl;
|
||||
foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
|
||||
system("$ENV{INNOCHECKSUM} --no-check --write=crc32 $_")
|
||||
}
|
||||
EOF
|
||||
|
||||
--echo # start the server with innodb_checksum_algorithm=strict_crc32
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=strict_crc32
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
# check the table status is GOOD with DML
|
||||
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
|
||||
VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
|
||||
ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
|
||||
|
||||
# load the with repeat function
|
||||
SET @col_1 = repeat('g', 5);
|
||||
SET @col_2 = repeat('h', 20);
|
||||
SET @col_3 = repeat('i', 100);
|
||||
SET @col_4 = repeat('j', 100);
|
||||
SET @col_5 = repeat('k', 100);
|
||||
SET @col_6 = repeat('l', 100);
|
||||
|
||||
# check the table status is GOOD with DML
|
||||
let $i = 7;
|
||||
eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
|
||||
VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
|
||||
|
||||
# check the records from table
|
||||
-- disable_result_log
|
||||
SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
|
||||
FROM tab1 ORDER BY pk;
|
||||
|
||||
-- disable_result_log
|
||||
SELECT * FROM tab2 ORDER BY col_7;
|
||||
|
||||
--echo # stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo [1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
|
||||
--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab1.ibd
|
||||
--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab2.ibd
|
||||
--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/ibdata1
|
||||
perl;
|
||||
foreach (glob("$ENV{MYSQLD_DATADIR}/undo*")) {
|
||||
system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
|
||||
}
|
||||
foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
|
||||
system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
|
||||
}
|
||||
EOF
|
||||
|
||||
--let $restart_parameters= --innodb_checksum_algorithm=strict_none
|
||||
--source include/start_mysqld.inc
|
||||
--let $restart_parameters=
|
||||
# check the table status is GOOD with DML
|
||||
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
|
||||
VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
|
||||
|
||||
# load the with repeat function
|
||||
SET @col_1 = repeat('m', 5);
|
||||
SET @col_2 = repeat('n', 20);
|
||||
SET @col_3 = repeat('o', 100);
|
||||
SET @col_4 = repeat('p', 100);
|
||||
SET @col_5 = repeat('q', 100);
|
||||
SET @col_6 = repeat('r', 100);
|
||||
|
||||
# check the table status is GOOD with DML
|
||||
let $i = 8;
|
||||
eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
|
||||
VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
|
||||
|
||||
# check the records from table
|
||||
-- disable_result_log
|
||||
SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
|
||||
FROM tab1 ORDER BY pk;
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM tab2 ORDER BY col_7;
|
||||
--enable_result_log
|
||||
|
||||
--echo # stop the server
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
|
Reference in New Issue
Block a user