diff options
Diffstat (limited to 'mysql-test')
45 files changed, 270 insertions, 528 deletions
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 49fb03ecc57..89d0d779627 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -52,7 +52,7 @@ loose-innodb_buffer_pool_size= 8M loose-innodb_lru_scan_depth= 100 loose-innodb_write_io_threads= 2 loose-innodb_read_io_threads= 2 -loose-innodb_log_buffer_size= 1M +loose-innodb_log_buffer_size= 2M loose-innodb_log_file_size= 10M slave-net-timeout=120 diff --git a/mysql-test/main/drop_table_force.result b/mysql-test/main/drop_table_force.result index 404d8be8b21..1dd0f1f9dab 100644 --- a/mysql-test/main/drop_table_force.result +++ b/mysql-test/main/drop_table_force.result @@ -1,6 +1,4 @@ -CALL mtr.add_suppression("Operating system error number"); -CALL mtr.add_suppression("The error means the system cannot"); -CALL mtr.add_suppression("returned OS error 71"); +CALL mtr.add_suppression("InnoDB: File .*test/t1\\.ibd was not found"); #Test1: table with missing .ibd can be dropped directly create table t1(a int)engine=innodb; drop table t1; diff --git a/mysql-test/main/drop_table_force.test b/mysql-test/main/drop_table_force.test index f3073e3b67d..04ebb997b80 100644 --- a/mysql-test/main/drop_table_force.test +++ b/mysql-test/main/drop_table_force.test @@ -10,9 +10,7 @@ # the new one, we have left some references to the original test case # -CALL mtr.add_suppression("Operating system error number"); -CALL mtr.add_suppression("The error means the system cannot"); -CALL mtr.add_suppression("returned OS error 71"); +CALL mtr.add_suppression("InnoDB: File .*test/t1\\.ibd was not found"); let $DATADIR= `select @@datadir`; diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test index 153dcdd155a..5f372e6d5fd 100644 --- a/mysql-test/suite/binlog/t/binlog_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -180,7 +180,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; SET @old_flush = @@GLOBAL.innodb_flush_log_at_trx_commit; SET GLOBAL innodb_flush_log_at_trx_commit=1; ---let $syncs1 = query_get_value(SHOW STATUS LIKE 'Innodb_os_log_fsyncs', Value, 1) +--let $syncs1 = query_get_value(SHOW STATUS LIKE 'Innodb_data_fsyncs', Value, 1) --let $ROWS = 100 --disable_query_log let $count = $ROWS; @@ -188,7 +188,7 @@ while ($count) { eval INSERT INTO t1 VALUES ($count); dec $count; } ---let $syncs2 = query_get_value(SHOW STATUS LIKE 'Innodb_os_log_fsyncs', Value, 1) +--let $syncs2 = query_get_value(SHOW STATUS LIKE 'Innodb_data_fsyncs', Value, 1) eval SET @num_sync = $syncs2 - $syncs1; --enable_query_log diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result index 8d1eb447b03..c1771fe534b 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result @@ -12,14 +12,13 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err -FOUND 2 /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err # redo log from before MariaDB 10.2.2, with corrupted log block # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err # empty redo log from before MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES @@ -35,15 +34,15 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 2 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err -# Empty multi-file redo log from before MariaDB 10.2.2 +FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +# Empty multi-file redo log (wrong offset) from before MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) -1 -FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err +0 +FOUND 3 /Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint\./ in mysqld.1.err # Multi-file redo log with size mismatch from after MariaDB 10.2.2 # Corrupted multi-file redo log from after MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m @@ -52,30 +51,30 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!/ in mysqld.1.err -FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err +FOUND 3 /Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint\./ in mysqld.1.err +FOUND 1 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 2 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err +FOUND 2 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # Empty multi-file redo log from after MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) -1 -FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err +0 +FOUND 3 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # redo log from "after" MariaDB 10.2.2, but with invalid header checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err +FOUND 1 /InnoDB: Invalid log header checksum/ in mysqld.1.err # distant future redo log format, with valid header checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -89,14 +88,14 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err +FOUND 1 /InnoDB: No valid checkpoint was found; the log was created with malicious intentions, or perhaps\./ in mysqld.1.err # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND 2 /InnoDB: Invalid log header checksum/ in mysqld.1.err FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\./ in mysqld.1.err # same, but with current-version header # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 @@ -104,7 +103,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND 3 /InnoDB: Invalid log header checksum/ in mysqld.1.err # --innodb-force-recovery=6 (skip the entire redo log) # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6 SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -112,7 +111,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES -FOUND 1 /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err +FOUND 1 /\[Note\] InnoDB: log sequence number 0.*; transaction id 0/ in mysqld.1.err # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -141,8 +140,9 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err -FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err +NOT FOUND /InnoDB: Invalid log header checksum +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err # valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -171,7 +171,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 1 /InnoDB: .* started; log sequence number 1213964; transaction id 0/ in mysqld.1.err +FOUND 1 /InnoDB: log sequence number 1213964\b.*; transaction id 0/ in mysqld.1.err # Empty 10.2 redo log # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES @@ -179,7 +179,15 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 5 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err +# Empty 10.5 redo log +# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +COUNT(*) +1 +FOUND 4 /InnoDB: Upgrading redo log:/ in mysqld.1.err # Minimal MariaDB 10.1.21 encrypted redo log # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' diff --git a/mysql-test/suite/innodb/include/no_checkpoint_end.inc b/mysql-test/suite/innodb/include/no_checkpoint_end.inc index 4a00dadfd6e..61721650f32 100644 --- a/mysql-test/suite/innodb/include/no_checkpoint_end.inc +++ b/mysql-test/suite/innodb/include/no_checkpoint_end.inc @@ -10,12 +10,12 @@ my $cp = $ENV{CHECKPOINT_LSN}; $cp =~ s/^InnoDB\t\t//; my $log = "$ENV{MYSQLD_DATADIR}ib_logfile0"; open(LOG, "<$log") || die "Unable to open $log"; -seek(LOG, 512, 0) || die "Unable to seek $log"; -die unless read(LOG, $_, 16) == 16; -my ($no1hi,$no1lo,$cp1hi,$cp1lo) = unpack("N*", $_); -seek(LOG, 3 * 512, 0) || die "Unable to seek $log"; -die unless read(LOG, $_, 16) == 16; -my ($no2hi,$no2lo,$cp2hi,$cp2lo) = unpack("N*", $_); +seek(LOG, 4096, 0) || die "Unable to seek $log"; +die unless read(LOG, $_, 8) == 8; +my ($cp1hi,$cp1lo) = unpack("NN", $_); +seek(LOG, 8192, 0) || die "Unable to seek $log"; +die unless read(LOG, $_, 8) == 8; +my ($cp2hi,$cp2lo) = unpack("NN", $_); close(LOG); my $cp1 = $cp1hi << 32 | $cp1lo; @@ -27,8 +27,7 @@ if ($cp1 > $cp || $cp2 > $cp) { print OUT "--source include/start_mysqld.inc\n" unless $ENV{no_checkpoint_kill}; print OUT "$ENV{CLEANUP_IF_CHECKPOINT}\n"; - print OUT "--skip Extra checkpoint 1 after $cp"; - print OUT " ($no1hi:$no1lo=$cp1,$no2hi:$no2lo=$cp2)\n"; + print OUT "--skip Extra checkpoint 1 after $cp ($cp1,$cp2)\n"; } close(OUT); diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 2973e5de550..4c1b35ac1e4 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -1,5 +1,5 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); -call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result index 49fe8e629e3..2bbe990d7f1 100644 --- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result +++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result @@ -156,9 +156,6 @@ os_data_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status os_pending_reads os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of reads pending os_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of writes pending os_log_bytes_written os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Bytes of log written (innodb_os_log_written) -os_log_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of fsync log writes (innodb_os_log_fsyncs) -os_log_pending_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pending fsync write (innodb_os_log_pending_fsyncs) -os_log_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pending log file writes (innodb_os_log_pending_writes) trx_rw_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of read-write transactions committed trx_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of read-only transactions committed trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of non-locking auto-commit read-only transactions committed @@ -176,20 +173,17 @@ purge_undo_log_pages purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL purge_dml_delay_usec purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Microseconds DML to be delayed due to purge lagging purge_stop_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of times purge was stopped purge_resume_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of times purge was resumed -log_checkpoints recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of checkpoints +log_checkpoints recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of checkpoints log_lsn_last_flush recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value LSN of Last flush log_lsn_last_checkpoint recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value LSN at last checkpoint log_lsn_current recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value minus LSN at last checkpoint log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The oldest modified block LSN in the buffer pool log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Maximum LSN difference; when exceeded, start asynchronous preflush -log_pending_log_flushes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Pending log flushes -log_pending_checkpoint_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Pending checkpoints log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of log I/Os log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log waits due to small log buffer (innodb_log_waits) log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log write requests (innodb_log_write_requests) log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log writes (innodb_log_writes) -log_padded recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Bytes of log padded for log write ahead compress_pages_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages compressed compress_pages_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages decompressed compression_pad_increments compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times padding is incremented to avoid compression failures diff --git a/mysql-test/suite/innodb/r/innodb_status_variables.result b/mysql-test/suite/innodb/r/innodb_status_variables.result index da5020bbe08..02f73f37d66 100644 --- a/mysql-test/suite/innodb/r/innodb_status_variables.result +++ b/mysql-test/suite/innodb/r/innodb_status_variables.result @@ -64,9 +64,6 @@ INNODB_MASTER_THREAD_ACTIVE_LOOPS INNODB_MASTER_THREAD_IDLE_LOOPS INNODB_MAX_TRX_ID INNODB_MEM_DICTIONARY -INNODB_OS_LOG_FSYNCS -INNODB_OS_LOG_PENDING_FSYNCS -INNODB_OS_LOG_PENDING_WRITES INNODB_OS_LOG_WRITTEN INNODB_PAGE_SIZE INNODB_PAGES_CREATED diff --git a/mysql-test/suite/innodb/r/instant_alter_import.result b/mysql-test/suite/innodb/r/instant_alter_import.result index c569c65d4ce..ed3c87b4e41 100644 --- a/mysql-test/suite/innodb/r/instant_alter_import.result +++ b/mysql-test/suite/innodb/r/instant_alter_import.result @@ -1,6 +1,6 @@ call mtr.add_suppression("Operating system error number .* in a file operation."); call mtr.add_suppression("The error means the system cannot find the path specified."); -call mtr.add_suppression("File ./test/t1.ibd: 'delete' returned OS error"); +call mtr.add_suppression("File ./test/t1.ibd was not found"); set default_storage_engine=innodb; # # MDEV-18295 IMPORT TABLESPACE fails with instant-altered tables diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result index bf92f77d30c..12e9d340bbd 100644 --- a/mysql-test/suite/innodb/r/log_corruption.result +++ b/mysql-test/suite/innodb/r/log_corruption.result @@ -12,14 +12,13 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err -FOUND 2 /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err # redo log from before MariaDB 10.2.2, with corrupted log block # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err # empty redo log from before MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES @@ -35,15 +34,15 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 2 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err -# Empty multi-file redo log from before MariaDB 10.2.2 +FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +# Empty multi-file redo log (wrong offset) from before MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) -1 -FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err +0 +FOUND 3 /Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint\./ in mysqld.1.err # Multi-file redo log with size mismatch from after MariaDB 10.2.2 # Corrupted multi-file redo log from after MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m @@ -52,30 +51,30 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!/ in mysqld.1.err -FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err +FOUND 3 /Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint\./ in mysqld.1.err +FOUND 1 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 0 -FOUND 2 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err +FOUND 2 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # Empty multi-file redo log from after MariaDB 10.2.2 # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) -1 -FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err +0 +FOUND 3 /InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\.2\.3\.4\./ in mysqld.1.err # redo log from "after" MariaDB 10.2.2, but with invalid header checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err +FOUND 1 /InnoDB: Invalid log header checksum/ in mysqld.1.err # distant future redo log format, with valid header checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -89,14 +88,14 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err +FOUND 1 /InnoDB: No valid checkpoint was found; the log was created with malicious intentions, or perhaps\./ in mysqld.1.err # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND 2 /InnoDB: Invalid log header checksum/ in mysqld.1.err FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\./ in mysqld.1.err # same, but with current-version header # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 @@ -104,7 +103,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND 3 /InnoDB: Invalid log header checksum/ in mysqld.1.err # --innodb-force-recovery=6 (skip the entire redo log) # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6 SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -112,7 +111,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES -FOUND 1 /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err +FOUND 1 /\[Note\] InnoDB: log sequence number 0.*; transaction id 0/ in mysqld.1.err # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -141,8 +140,9 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err -FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err +NOT FOUND /InnoDB: Invalid log header checksum +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err # valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption SELECT * FROM INFORMATION_SCHEMA.ENGINES @@ -171,7 +171,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 1 /InnoDB: .* started; log sequence number 1213964; transaction id 0/ in mysqld.1.err +FOUND 1 /InnoDB: log sequence number 1213964\b.*; transaction id 0/ in mysqld.1.err # Empty 10.2 redo log # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES @@ -179,7 +179,15 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 5 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err +# Empty 10.5 redo log +# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +COUNT(*) +1 +FOUND 4 /InnoDB: Upgrading redo log:/ in mysqld.1.err # Minimal MariaDB 10.1.21 encrypted redo log # restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 SELECT * FROM INFORMATION_SCHEMA.ENGINES diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result index d2070d23a9a..734e9b07687 100644 --- a/mysql-test/suite/innodb/r/log_file.result +++ b/mysql-test/suite/innodb/r/log_file.result @@ -15,7 +15,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err +FOUND 1 /Cannot create /path/to/non-existent/ib_logfile101/ in mysqld.1.err # Successfully let InnoDB create tablespaces # restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES @@ -255,7 +255,6 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES bak_ib_logfile0 bak_ibdata1 bak_ibdata2 @@ -263,7 +262,6 @@ bak_undo001 bak_undo002 bak_undo003 ib_buffer_pool -ib_logfile0 ibdata1 ibdata2 undo001 diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result index cb2ee68fc98..0058a305185 100644 --- a/mysql-test/suite/innodb/r/log_file_name_debug.result +++ b/mysql-test/suite/innodb/r/log_file_name_debug.result @@ -9,7 +9,7 @@ CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-file-size=4194304 +# restart: --debug=d,innodb_log_abort_5,ib_log --innodb-log-file-size=4194304 SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 1 /ib_log: FILE_CHECKPOINT.* written/ in mysqld.1.err diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result index 1c98dc4bbf2..47ca20af2f4 100644 --- a/mysql-test/suite/innodb/r/log_file_size.result +++ b/mysql-test/suite/innodb/r/log_file_size.result @@ -35,61 +35,32 @@ FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=.*/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_3 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' # restart: --innodb-read-only SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_4 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 5 /redo log from [1-9][0-9.]+[KMGT]iB to [1-9][0-9.]+[KMGT]iB/ in mysqld.1.err # restart: --debug=d,innodb_log_abort_5 SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 6 /redo log from [1-9][0-9.]+[KMGT]iB to [1-9][0-9.]+[KMGT]iB/ in mysqld.1.err +FOUND 1 /redo log from 5\.000MiB to [0-9.]*[KMGT]iB/ in mysqld.1.err # restart: --innodb-read-only SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_6 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 7 /redo log from [1-9][0-9.]+[KMGT]iB to [1-9][0-9.]+[KMGT]iB/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_7 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -# restart: --innodb-read-only -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /InnoDB: Cannot create log file in read-only mode/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_8 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_9 -SELECT * FROM t1; -ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_9 +# restart SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err -# restart: --debug=d,innodb_log_abort_9 -SELECT * FROM t1; -a -42 -123 -# restart: --debug=d,innodb_log_abort_10 +FOUND 1 /InnoDB: File .*ib_logfile0 is too small/ in mysqld.1.err +# restart SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' -FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err -FOUND 1 /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err +FOUND 1 /InnoDB: Expecting only ib_logfile0/ in mysqld.1.err +# restart +FOUND 1 /InnoDB: File .*ib_logfile0 was not found/ in mysqld.1.err # restart SELECT * FROM t1; a 42 123 DROP TABLE t1; +FOUND 2 /InnoDB: Resizing redo log from 5\.000MiB to [0-9.]*[KMGT]iB; LSN=\d+\b/ in mysqld.1.err diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result index 2e5e5e2241a..0424ea51238 100644 --- a/mysql-test/suite/innodb/r/monitor.result +++ b/mysql-test/suite/innodb/r/monitor.result @@ -122,9 +122,6 @@ os_data_fsyncs disabled os_pending_reads disabled os_pending_writes disabled os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs disabled -os_log_pending_writes disabled trx_rw_commits disabled trx_ro_commits disabled trx_nl_ro_commits disabled @@ -149,13 +146,10 @@ log_lsn_current disabled log_lsn_checkpoint_age disabled log_lsn_buf_pool_oldest disabled log_max_modified_age_async disabled -log_pending_log_flushes disabled -log_pending_checkpoint_writes disabled log_num_log_io disabled log_waits disabled log_write_requests disabled log_writes disabled -log_padded disabled compress_pages_compressed disabled compress_pages_decompressed disabled compression_pad_increments disabled @@ -284,9 +278,6 @@ os_data_fsyncs enabled os_pending_reads enabled os_pending_writes enabled os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs enabled -os_log_pending_writes enabled set global innodb_monitor_enable=""; ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '' set global innodb_monitor_enable="_"; diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result index 8c3722c7940..0ed56005e21 100644 --- a/mysql-test/suite/innodb/r/rename_table.result +++ b/mysql-test/suite/innodb/r/rename_table.result @@ -21,7 +21,7 @@ path DROP DATABASE abc_def; # restart DROP DATABASE abc_def2; -call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); +call mtr.add_suppression("InnoDB: (Operating system error|Error number \\d+ means|Cannot rename file)"); CREATE TABLE t1 (a INT) ENGINE=InnoDB; RENAME TABLE t1 TO non_existing_db.t1; ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: 168 "Unknown (generic) error from engine") diff --git a/mysql-test/suite/innodb/r/truncate_missing.result b/mysql-test/suite/innodb/r/truncate_missing.result index 1cc654f0d7e..b7e514b172b 100644 --- a/mysql-test/suite/innodb/r/truncate_missing.result +++ b/mysql-test/suite/innodb/r/truncate_missing.result @@ -1,5 +1,5 @@ call mtr.add_suppression("InnoDB: Operating system error number "); -call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: (Error number \\d+ means|If you are|Cannot open datafile) "); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t "); call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); CREATE TABLE t (a SERIAL) ENGINE=InnoDB; diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test index bf7111509bd..5c7f63eb813 100644 --- a/mysql-test/suite/innodb/t/alter_missing_tablespace.test +++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test @@ -9,7 +9,7 @@ --disable_query_log call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: "); call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation"); -call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified"); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/\(t\|x@002e@002ed\) because it could not be opened"); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing"); call mtr.add_suppression("Could not find a valid tablespace file for"); diff --git a/mysql-test/suite/innodb/t/innodb-index-online.opt b/mysql-test/suite/innodb/t/innodb-index-online.opt index ff20edbe2f7..1837463f07a 100644 --- a/mysql-test/suite/innodb/t/innodb-index-online.opt +++ b/mysql-test/suite/innodb/t/innodb-index-online.opt @@ -1,6 +1,5 @@ --loose-innodb-sort-buffer-size=64k --loose-innodb-online-alter-log-max-size=128k --loose-innodb-buffer-pool-size=5M ---loose-innodb-log-buffer-size=256k --loose-innodb-sys-indexes --loose-innodb-sys-fields diff --git a/mysql-test/suite/innodb/t/innodb-table-online-master.opt b/mysql-test/suite/innodb/t/innodb-table-online-master.opt index 92eea2b0d2e..1eafb5ac188 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online-master.opt +++ b/mysql-test/suite/innodb/t/innodb-table-online-master.opt @@ -1 +1 @@ ---innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=512k --innodb-buffer-pool-size=5M --innodb-log-buffer-size=256k +--innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=512k --innodb-buffer-pool-size=5M diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index b460cba9322..e7a39f23e11 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -19,7 +19,7 @@ let $restart_noprint=2; call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); -call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test index 99ae48ba815..854b5b3a953 100644 --- a/mysql-test/suite/innodb/t/instant_alter_import.test +++ b/mysql-test/suite/innodb/t/instant_alter_import.test @@ -4,7 +4,7 @@ call mtr.add_suppression("Operating system error number .* in a file operation."); call mtr.add_suppression("The error means the system cannot find the path specified."); -call mtr.add_suppression("File ./test/t1.ibd: 'delete' returned OS error"); +call mtr.add_suppression("File ./test/t1.ibd was not found"); set default_storage_engine=innodb; diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test index 4e9ea9fa698..dad5f67afca 100644 --- a/mysql-test/suite/innodb/t/log_corruption.test +++ b/mysql-test/suite/innodb/t/log_corruption.test @@ -7,8 +7,8 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("InnoDB: Unsupported redo log format"); -call mtr.add_suppression("InnoDB: No valid checkpoint found"); -call mtr.add_suppression("InnoDB: Invalid (log block|redo log header) checksum"); +call mtr.add_suppression("InnoDB: No valid checkpoint was found"); +call mtr.add_suppression("InnoDB: Invalid log header checksum"); call mtr.add_suppression("InnoDB: Missing MLOG_CHECKPOINT"); call mtr.add_suppression("InnoDB: MLOG_FILE_NAME incorrect"); call mtr.add_suppression("InnoDB: ############### CORRUPT LOG RECORD FOUND"); @@ -16,8 +16,7 @@ call mtr.add_suppression("InnoDB: Log scan aborted at LSN"); call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\\r?$"); call mtr.add_suppression("InnoDB: Obtaining redo log encryption key version 1 failed"); call mtr.add_suppression("InnoDB: Decrypting checkpoint failed"); -call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile0 to start up the database\\? The checkpoint is 1213964,"); -call mtr.add_suppression("InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!"); +call mtr.add_suppression("InnoDB: Log file .*ib_logfile1 is of different size 2097152 bytes than other log files 1048576 bytes!"); --enable_query_log let bugdir= $MYSQLTEST_VARDIR/tmp/log_corruption; @@ -134,8 +133,6 @@ eval $check_no_innodb; let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and we did not find a valid checkpoint; --source include/search_pattern_in_file.inc -let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed; ---source include/search_pattern_in_file.inc --echo # redo log from before MariaDB 10.2.2, with corrupted log block --remove_file $bugdir/ib_logfile0 @@ -154,7 +151,6 @@ EOF --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and it appears corrupted; --source include/search_pattern_in_file.inc --echo # empty redo log from before MariaDB 10.2.2 @@ -204,7 +200,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and it appears corrupted; --source include/search_pattern_in_file.inc ---echo # Empty multi-file redo log from before MariaDB 10.2.2 +--echo # Empty multi-file redo log (wrong offset) from before MariaDB 10.2.2 perl; die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile1"; binmode OUT; @@ -220,7 +216,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN= InnoDB: Upgrading redo log: +--let SEARCH_PATTERN= Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and we did not find a valid checkpoint\\. --source include/search_pattern_in_file.inc --echo # Multi-file redo log with size mismatch from after MariaDB 10.2.2 @@ -251,9 +247,8 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN=InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes! --source include/search_pattern_in_file.inc ---let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\\. The redo log was created with BogoDB 1\\.2\\.3\\.4, and it appears corrupted\\. +--let SEARCH_PATTERN=InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\\.2\\.3\\.4\\. --source include/search_pattern_in_file.inc perl; @@ -270,7 +265,8 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\\. The redo log was created with BogoDB 1\\.2\\.3\\.4, and it appears corrupted\\. +--let SEARCH_PATTERN=InnoDB: Log file .*ib_logfile1 is of different size 2097152 bytes than other log files 1048576 bytes! +--let SEARCH_PATTERN=InnoDB: No valid checkpoint was found; the log was created with BogoDB 1\\.2\\.3\\.4\\. --source include/search_pattern_in_file.inc --echo # Empty multi-file redo log from after MariaDB 10.2.2 @@ -292,7 +288,6 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN= InnoDB: Upgrading redo log: --source include/search_pattern_in_file.inc --let $restart_parameters= $dirs @@ -309,7 +304,7 @@ EOF --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum; +let SEARCH_PATTERN=InnoDB: Invalid log header checksum; --source include/search_pattern_in_file.inc --echo # distant future redo log format, with valid header checksum @@ -345,7 +340,7 @@ EOF --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log; +--let SEARCH_PATTERN=InnoDB: No valid checkpoint was found; the log was created with malicious intentions, or perhaps\\. --source include/search_pattern_in_file.inc --echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum @@ -363,7 +358,7 @@ EOF --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122; +let SEARCH_PATTERN=InnoDB: Invalid log header checksum; --source include/search_pattern_in_file.inc let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\.; --source include/search_pattern_in_file.inc @@ -380,14 +375,14 @@ EOF eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122; +let SEARCH_PATTERN=InnoDB: Invalid log header checksum; --source include/search_pattern_in_file.inc --echo # --innodb-force-recovery=6 (skip the entire redo log) --let $restart_parameters= $dirs --innodb-force-recovery=6 --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN=\\[Note\\] InnoDB: .* started; log sequence number 0 +--let SEARCH_PATTERN=\\[Note\\] InnoDB: log sequence number 0.*; transaction id 0 --source include/search_pattern_in_file.inc --echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number @@ -464,7 +459,7 @@ EOF --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151; +let SEARCH_PATTERN=InnoDB: Invalid log header checksum --source include/search_pattern_in_file.inc let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\.; --source include/search_pattern_in_file.inc @@ -544,7 +539,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/shutdown_mysqld.inc ---let SEARCH_PATTERN= InnoDB: .* started; log sequence number 1213964; transaction id 0 +--let SEARCH_PATTERN= InnoDB: log sequence number 1213964\\b.*; transaction id 0 --source include/search_pattern_in_file.inc --echo # Empty 10.2 redo log @@ -577,6 +572,33 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); --let SEARCH_PATTERN= InnoDB: Upgrading redo log: --source include/search_pattern_in_file.inc +--echo # Empty 10.5 redo log +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header block +print OUT pack("Nx[5]nx[5]", 0x50485953, 0x1286); +print OUT "ibbackup was here!!!1!"; +print OUT pack("x[470]N", 0x677700cf); +# invalid (all-zero) checkpoint page 1 and an empty log page +print OUT chr(0) x 1024; +# valid checkpoint block 2 +print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x80c); +# pointer to the FILE_CHECKPOINT record, and checkpoint page checksum +print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x101741b); +# log page +print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2); +close OUT or die; +EOF + +--source include/start_mysqld.inc +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN= InnoDB: Upgrading redo log: +--source include/search_pattern_in_file.inc + --echo # Minimal MariaDB 10.1.21 encrypted redo log perl; die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test index b33c680f02f..0f26622e2b6 100644 --- a/mysql-test/suite/innodb/t/log_file.test +++ b/mysql-test/suite/innodb/t/log_file.test @@ -11,7 +11,7 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("InnoDB: Operating system error number \d+ in a file operation"); call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified"); -call mtr.add_suppression("InnoDB: File .path.to.non-existent.ib_logfile101: 'create' returned OS error \d+"); +call mtr.add_suppression("InnoDB: File /path/to/non-existent/ib_logfile101 was not found"); call mtr.add_suppression("InnoDB: Cannot create .path.to.non-existent.ib_logfile101"); call mtr.add_suppression("InnoDB: The data file '.*ibdata1' was not found but one of the other data files '.*ibdata2' exists"); call mtr.add_suppression("InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages"); @@ -61,7 +61,7 @@ let SEARCH_PATTERN=\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002 --source include/start_mysqld.inc eval $check_no_innodb; --source include/shutdown_mysqld.inc -let SEARCH_PATTERN=File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+; +let SEARCH_PATTERN=Cannot create /path/to/non-existent/ib_logfile101; --source include/search_pattern_in_file.inc --list_files $bugdir diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test index 895e945f4e3..b0935c90ca3 100644 --- a/mysql-test/suite/innodb/t/log_file_name.test +++ b/mysql-test/suite/innodb/t/log_file_name.test @@ -146,7 +146,7 @@ DROP TABLE t0; --disable_query_log # The following are for the orphan file t0.ibd or for the directory t2.ibd: call mtr.add_suppression("InnoDB: Operating system error number [0-9]* in a file operation"); -call mtr.add_suppression("InnoDB: Error number [0-9]* means '(File exists|Is a directory)'"); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot create file '.*t0.ibd'"); call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists"); call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'"); diff --git a/mysql-test/suite/innodb/t/log_file_name_debug.test b/mysql-test/suite/innodb/t/log_file_name_debug.test index d90be6d8916..9ef3c9ff4dc 100644 --- a/mysql-test/suite/innodb/t/log_file_name_debug.test +++ b/mysql-test/suite/innodb/t/log_file_name_debug.test @@ -35,7 +35,7 @@ SELECT * FROM t1; --let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either --source include/search_pattern_in_file.inc ---let $restart_parameters= --debug=d,innodb_log_abort_3,ib_log $resize +--let $restart_parameters= --debug=d,innodb_log_abort_5,ib_log $resize --source include/restart_mysqld.inc --error ER_UNKNOWN_STORAGE_ENGINE SELECT * FROM t1; diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test index a8bec8a7c21..22838475c60 100644 --- a/mysql-test/suite/innodb/t/log_file_size.test +++ b/mysql-test/suite/innodb/t/log_file_size.test @@ -7,31 +7,50 @@ # This test is slow on buildbot. --source include/big_test.inc -if (`SELECT @@innodb_log_file_size = 1048576`) { - --skip Test requires innodb_log_file_size>1M. -} - --disable_query_log -call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata file do not match the log sequence number [0-9]+ in the ib_logfile"); call mtr.add_suppression("syntax error in innodb_log_group_home_dir"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery"); -call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile"); -call mtr.add_suppression("InnoDB: Cannot (create|resize) log file in read-only mode"); -call mtr.add_suppression("InnoDB: Can't initiate database recovery, running in read-only-mode"); -call mtr.add_suppression("InnoDB: Log file .*ib_logfile0.* size"); -call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support"); +call mtr.add_suppression("InnoDB: Log file .*ib_logfile1.* size"); +call mtr.add_suppression("InnoDB: File .*ib_logfile0 (is too small|was not found)"); +call mtr.add_suppression("InnoDB: Expecting only ib_logfile0"); FLUSH TABLES; --enable_query_log let MYSQLD_DATADIR= `select @@datadir`; CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; --source include/shutdown_mysqld.inc ---move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile.old -write_file $MYSQLD_DATADIR/ib_logfile0; +perl; +do "$ENV{MTR_SUITE_DIR}/include/crc32.pl"; +my $file = "$ENV{MYSQLD_DATADIR}ib_logfile0"; +open(FILE, "<$file") || die "Unable to open $file\n"; +seek(FILE, 4096, 0) || die "Unable to seek $file\n"; +die unless read(FILE, $_, 8) == 8; +my ($lsn_hi,$lsn_lo) = unpack("NN", $_); +seek(FILE, 8192, 0) || die "Unable to seek $file\n"; +die unless read(FILE, $_, 8) == 8; +my ($cp2hi,$cp2lo) = unpack("NN", $_); +if ($cp2hi < $lsn_hi) {} +elsif ($cp2hi > $lsn_hi || $cp2lo > $lsn_lo) +{ $lsn_hi=$cp2hi;$lsn_lo=$cp2lo; } +close(FILE); +open(FILE, ">", $file) or die "Unable to open $file\n"; +binmode FILE; +my $polynomial = 0x82f63b78; # CRC-32C +my ($header, $checkpoint, $log); +$header = "Phys" . pack("x[4]NN", $lsn_hi, $lsn_lo) . + "some Perl code" . pack("x[478]"); +$header .= pack("Nx[3584]", mycrc32($header, 0, $polynomial)); +$checkpoint = pack("NNNNx[44]", $lsn_hi, $lsn_lo, $lsn_hi, $lsn_lo); +$checkpoint .= pack("Nx[8128]", mycrc32($checkpoint, 0, $polynomial)); +$log = pack("CxxNN", 0xfa, $lsn_hi, $lsn_lo); +$log .= pack("CN", 1, mycrc32($log, 0, $polynomial)); +print FILE $header, $checkpoint, $log; +close(FILE) or die "Unable to close $file\n"; EOF + let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); @@ -95,11 +114,6 @@ SELECT * FROM t1; let SEARCH_PATTERN= InnoDB: Starting crash recovery from checkpoint LSN=.*; --source include/search_pattern_in_file.inc ---let $restart_parameters= --debug=d,innodb_log_abort_3 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - --let $restart_parameters= --innodb-read-only --source include/restart_mysqld.inc @@ -108,17 +122,11 @@ SELECT * FROM t1; let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery; --source include/search_pattern_in_file.inc ---let $restart_parameters= --debug=d,innodb_log_abort_4 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; -let SEARCH_PATTERN= redo log from [1-9][0-9.]+[KMGT]iB to [1-9][0-9.]+[KMGT]iB; ---source include/search_pattern_in_file.inc - --let $restart_parameters= --debug=d,innodb_log_abort_5 --source include/restart_mysqld.inc --error ER_UNKNOWN_STORAGE_ENGINE SELECT * FROM t1; +let SEARCH_PATTERN= redo log from 5\\.000MiB to [0-9.]*[KMGT]iB; --source include/search_pattern_in_file.inc --let $restart_parameters= --innodb-read-only @@ -128,87 +136,40 @@ SELECT * FROM t1; let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery; --source include/search_pattern_in_file.inc ---let $restart_parameters= --debug=d,innodb_log_abort_6 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -let SEARCH_PATTERN= redo log from [1-9][0-9.]+[KMGT]iB to [1-9][0-9.]+[KMGT]iB; ---source include/search_pattern_in_file.inc - ---let $restart_parameters= --debug=d,innodb_log_abort_7 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -# this aborts right after deleting all log files - ---let $restart_parameters= --innodb-read-only ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -let SEARCH_PATTERN= InnoDB: Cannot create log file in read-only mode; ---source include/search_pattern_in_file.inc - ---let $restart_parameters= --debug=d,innodb_log_abort_8 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; ---source include/search_pattern_in_file.inc - ---let $restart_parameters= --debug=d,innodb_log_abort_9 ---source include/restart_mysqld.inc ---error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; ---source include/search_pattern_in_file.inc ---source include/shutdown_mysqld.inc - -# We should have perfectly synced files here. # Trigger an error in recovery. -perl; -die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0"); -print FILE "garbage"; -close(FILE); +--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101 +--write_file $MYSQLD_DATADIR/ib_logfile0 +garbage EOF ---source include/start_mysqld.inc +--let $restart_parameters= +--source include/restart_mysqld.inc --error ER_UNKNOWN_STORAGE_ENGINE SELECT * FROM t1; -let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes; +let SEARCH_PATTERN= InnoDB: File .*ib_logfile0 is too small; --source include/search_pattern_in_file.inc ---remove_file $MYSQLD_DATADIR/ib_logfile0 +--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile1 --move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0 -perl; -die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile1"); -print FILE "junkfill" x 131072; -close(FILE); -EOF - --source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE SELECT * FROM t1; +let SEARCH_PATTERN= InnoDB: Expecting only ib_logfile0; +--source include/search_pattern_in_file.inc --remove_file $MYSQLD_DATADIR/ib_logfile1 --move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101 ---let $restart_parameters= --debug=d,innodb_log_abort_10 --source include/restart_mysqld.inc --error ER_UNKNOWN_STORAGE_ENGINE -SELECT * FROM t1; - -let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; ---source include/search_pattern_in_file.inc -let SEARCH_PATTERN= InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0; +let SEARCH_PATTERN= InnoDB: File .*ib_logfile0 was not found; --source include/search_pattern_in_file.inc +--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0 ---let $restart_parameters= --source include/restart_mysqld.inc - SELECT * FROM t1; DROP TABLE t1; + +--let SEARCH_PATTERN= InnoDB: Resizing redo log from 5\\.000MiB to [0-9.]*[KMGT]iB; LSN=\\d+\\b +--source include/search_pattern_in_file.inc diff --git a/mysql-test/suite/innodb/t/missing_tablespaces.test b/mysql-test/suite/innodb/t/missing_tablespaces.test index 8dc325b3356..9f970ca2dd2 100644 --- a/mysql-test/suite/innodb/t/missing_tablespaces.test +++ b/mysql-test/suite/innodb/t/missing_tablespaces.test @@ -25,7 +25,7 @@ let $restart_noprint=2; --disable_query_log call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation."); -call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified."); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Error number \\d+ means"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only"); call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened"); --enable_query_log diff --git a/mysql-test/suite/innodb/t/rename_table.test b/mysql-test/suite/innodb/t/rename_table.test index 35421f0ce7a..654f8809b22 100644 --- a/mysql-test/suite/innodb/t/rename_table.test +++ b/mysql-test/suite/innodb/t/rename_table.test @@ -32,7 +32,7 @@ DROP DATABASE abc_def; DROP DATABASE abc_def2; -call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); +call mtr.add_suppression("InnoDB: (Operating system error|Error number \\d+ means|Cannot rename file)"); CREATE TABLE t1 (a INT) ENGINE=InnoDB; --replace_result "\\" "/" diff --git a/mysql-test/suite/innodb/t/truncate_missing.test b/mysql-test/suite/innodb/t/truncate_missing.test index fb6bd678237..d36a2de5cd9 100644 --- a/mysql-test/suite/innodb/t/truncate_missing.test +++ b/mysql-test/suite/innodb/t/truncate_missing.test @@ -2,7 +2,7 @@ --source include/not_embedded.inc call mtr.add_suppression("InnoDB: Operating system error number "); -call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: (Error number \\d+ means|If you are|Cannot open datafile) "); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t "); call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index c69c30c5b25..86e56b4904b 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -5,7 +5,7 @@ call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); call mtr.add_suppression("InnoDB: Unknown index id .* on page"); call mtr.add_suppression("InnoDB: Operating system error number"); -call mtr.add_suppression("InnoDB: The error means"); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd"); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t1 "); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index 8d328dea576..1f436fafeb5 100644 --- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -21,7 +21,7 @@ call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); call mtr.add_suppression("InnoDB: Unknown index id .* on page"); call mtr.add_suppression("InnoDB: Operating system error number"); -call mtr.add_suppression("InnoDB: The error means"); +call mtr.add_suppression("InnoDB: Error number \\d+ means"); call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd"); call mtr.add_suppression("InnoDB: Ignoring tablespace for test/t1 "); call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing"); diff --git a/mysql-test/suite/mariabackup/huge_lsn,strict_crc32.rdiff b/mysql-test/suite/mariabackup/huge_lsn,strict_crc32.rdiff new file mode 100644 index 00000000000..9e516cf2ef1 --- /dev/null +++ b/mysql-test/suite/mariabackup/huge_lsn,strict_crc32.rdiff @@ -0,0 +1,9 @@ +@@ -2,7 +2,7 @@ + # MDEV-13416 mariabackup fails with EFAULT "Bad Address" + # + # restart +-FOUND 1 /redo log from 2\.012MiB to [0-9.]*[KMGT]iB; LSN=17596481011216\b/ in mysqld.1.err ++FOUND 1 /redo log: [0-9.]*[KMGT]iB; LSN=17596481010687\b/ in mysqld.1.err + CREATE TABLE t(i INT) ENGINE INNODB; + INSERT INTO t VALUES(1); + # xtrabackup backup diff --git a/mysql-test/suite/mariabackup/huge_lsn.result b/mysql-test/suite/mariabackup/huge_lsn.result index b24c1af964c..22cd346bbb5 100644 --- a/mysql-test/suite/mariabackup/huge_lsn.result +++ b/mysql-test/suite/mariabackup/huge_lsn.result @@ -2,7 +2,7 @@ # MDEV-13416 mariabackup fails with EFAULT "Bad Address" # # restart -FOUND 1 /InnoDB: New log file created, LSN=175964\d{8}/ in mysqld.1.err +FOUND 1 /redo log from 2\.012MiB to [0-9.]*[KMGT]iB; LSN=17596481011216\b/ in mysqld.1.err CREATE TABLE t(i INT) ENGINE INNODB; INSERT INTO t VALUES(1); # xtrabackup backup diff --git a/mysql-test/suite/mariabackup/huge_lsn.test b/mysql-test/suite/mariabackup/huge_lsn.test index 0af66b761ec..00c7e66516c 100644 --- a/mysql-test/suite/mariabackup/huge_lsn.test +++ b/mysql-test/suite/mariabackup/huge_lsn.test @@ -14,8 +14,8 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir= --enable_result_log --source include/shutdown_mysqld.inc +if ($MTR_COMBINATION_STRICT_CRC32) { perl; -do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; my $file= "$ENV{MYSQLD_DATADIR}/ibdata1"; open(FILE, "+<", $file) or die "Unable to open $file\n"; binmode FILE; @@ -23,23 +23,48 @@ my $ps= $ENV{INNODB_PAGE_SIZE}; my $page; die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; substr($page,26,8) = pack("NN", 4096, ~1024); -my $polynomial = 0x82f63b78; # CRC-32C -my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS -if ($full_crc32) -{ - my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial); - substr($page, $ps-4, 4) = pack("N", $ck); -} sysseek(FILE, 0, 0) || die "Unable to rewind $file\n"; syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; close(FILE) || die "Unable to close $file\n"; + +$file= "$ENV{MYSQLD_DATADIR}/ib_logfile0"; +open(FILE, ">", $file) || die "Unable to truncate $file\n"; +close(FILE) || "Unable to close $file\n"; EOF +--let SEARCH_PATTERN= redo log: [0-9.]*[KMGT]iB; LSN=17596481010687\\b +} ---remove_files_wildcard $MYSQLD_DATADIR ib_logfile* +if (!$MTR_COMBINATION_STRICT_CRC32) { +perl; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; +my $file= "$ENV{MYSQLD_DATADIR}/ib_logfile0"; +open(FILE, ">", $file) or die "Unable to open $file\n"; +binmode FILE; +# the desired log sequence number, plus 16 +my $extra_repeat = 139820; +my $lsn_hi=4096,$lsn_lo=0xfffffe00 - $extra_repeat * 15; +my $polynomial = 0x82f63b78; # CRC-32C +my ($header, $checkpoint, $log); +$header = "Phys" . pack("x[4]NN", $lsn_hi, $lsn_lo) . + "some Perl code" . pack("x[478]"); +$header .= pack("Nx[3584]", mycrc32($header, 0, $polynomial)); +$checkpoint = pack("NNNNx[44]", $lsn_hi, $lsn_lo, $lsn_hi, $lsn_lo); +$checkpoint .= pack("Nx[8128]", mycrc32($checkpoint, 0, $polynomial)); +$log = pack("CxxNN", 0xfa, $lsn_hi, $lsn_lo); +$log .= pack("CN", 1, mycrc32($log, 0, $polynomial)); + +# Write more than 2MiB of FILE_MODIFY mini-transactions to exercise the parser. +my $extra = pack("CCxa*", 0xb9, 127, "a/b.ibd"); +$extra .= pack("CN", 1, mycrc32($extra, 0, $polynomial)); + +print FILE $header, $checkpoint, $extra x $extra_repeat, $log; +close(FILE) or die "Unable to close $file\n"; +EOF +--let SEARCH_PATTERN= redo log from 2\\.012MiB to [0-9.]*[KMGT]iB; LSN=17596481011216\\b +} --source include/start_mysqld.inc let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; ---let SEARCH_PATTERN= InnoDB: New log file created, LSN=175964\d{8} --source include/search_pattern_in_file.inc CREATE TABLE t(i INT) ENGINE INNODB; diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.result b/mysql-test/suite/mariabackup/innodb_redo_overwrite.result index 9076dbaa57a..abc0c57bcce 100644 --- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.result +++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.result @@ -1,27 +1,6 @@ CREATE TABLE t(i INT) ENGINE=INNODB; -INSERT INTO t VALUES -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9), -(0), (1), (2), (3), (4), (5), (6), (7), (8), (9); -# Generate enough data to overwrite innodb redo log -# on the next "INSERT INTO t SELECT * FROM t" execution. -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; -INSERT INTO t SELECT * FROM t; +INSERT INTO t SELECT seq%10 FROM seq_0_to_51199; # xtrabackup backup -FOUND 1 /failed: redo log block is overwritten/ in backup.log -FOUND 1 /failed: redo log block checksum does not match/ in backup.log +FOUND 1 /Was only able to copy log from \d+ to \d+, not \d+; try increasing innodb_log_file_size\b/ in backup.log +NOT FOUND /failed: redo log block checksum does not match/ in backup.log DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test index e27229c5f33..7e0c1cef54f 100644 --- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test +++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test @@ -1,26 +1,10 @@ --source include/have_innodb.inc --source include/have_debug_sync.inc +--source include/have_debug.inc +--source include/have_sequence.inc CREATE TABLE t(i INT) ENGINE=INNODB; - -INSERT INTO t VALUES - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), - (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); ---echo # Generate enough data to overwrite innodb redo log ---echo # on the next "INSERT INTO t SELECT * FROM t" execution. ---let $i = 0 -while ($i < 9) { -INSERT INTO t SELECT * FROM t; ---inc $i -} +INSERT INTO t SELECT seq%10 FROM seq_0_to_51199; --echo # xtrabackup backup --let $targetdir=$MYSQLTEST_VARDIR/tmp/backup @@ -33,13 +17,13 @@ INSERT INTO t SELECT * FROM t; --exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events > $backuplog --enable_result_log ---let SEARCH_PATTERN=failed: redo log block is overwritten +--let SEARCH_PATTERN=Was only able to copy log from \\d+ to \\d+, not \\d+; try increasing innodb_log_file_size\\b --let SEARCH_FILE=$backuplog --source include/search_pattern_in_file.inc --remove_file $backuplog --rmdir $targetdir ---let before_innodb_log_copy_thread_started=INSERT INTO test.t VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9) +--let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT seq FROM seq_0_to_9 --disable_result_log --error 1 diff --git a/mysql-test/suite/mariabackup/missing_ibd.test b/mysql-test/suite/mariabackup/missing_ibd.test index dc1406039e7..f406a555b4a 100644 --- a/mysql-test/suite/mariabackup/missing_ibd.test +++ b/mysql-test/suite/mariabackup/missing_ibd.test @@ -9,7 +9,7 @@ let MYSQLD_DATADIR=`select @@datadir`; --disable_query_log call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: '.*test.t1\.ibd'"); -call mtr.add_suppression('InnoDB: Operating system error number'); +call mtr.add_suppression('InnoDB: (Operating system error number|Error number \\d+ means)'); call mtr.add_suppression('InnoDB: The error means the system cannot find the path specified\.'); call mtr.add_suppression('InnoDB: Table test/t1 in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist'); call mtr.add_suppression('InnoDB: Ignoring tablespace for test/t1 because it could not be opened\.'); diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.result b/mysql-test/suite/mariabackup/xb_file_key_management.result index 6cedfd2213b..cf8edb310b8 100644 --- a/mysql-test/suite/mariabackup/xb_file_key_management.result +++ b/mysql-test/suite/mariabackup/xb_file_key_management.result @@ -1,5 +1,7 @@ -CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes; +CREATE TABLE t(c TEXT) ENGINE INNODB encrypted=yes; +INSERT INTO t VALUES(REPEAT('fubar',100)); INSERT INTO t VALUES('foobar1'); +DELETE FROM t LIMIT 1; # xtrabackup backup NOT FOUND /foobar1/ in ib_logfile0 # expect NOT FOUND diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.test b/mysql-test/suite/mariabackup/xb_file_key_management.test index 2a176952053..4d27b2dfa95 100644 --- a/mysql-test/suite/mariabackup/xb_file_key_management.test +++ b/mysql-test/suite/mariabackup/xb_file_key_management.test @@ -1,8 +1,10 @@ #--source include/innodb_page_size.inc --source include/have_file_key_management.inc -CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes; +CREATE TABLE t(c TEXT) ENGINE INNODB encrypted=yes; +INSERT INTO t VALUES(REPEAT('fubar',100)); INSERT INTO t VALUES('foobar1'); +DELETE FROM t LIMIT 1; echo # xtrabackup backup; let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; --disable_result_log @@ -24,7 +26,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir; --enable_result_log --list_files $targetdir ib_logfile* ---cat_file $targetdir/ib_logfile0 +--remove_file $targetdir/ib_logfile0 SELECT * FROM t; DROP TABLE t; diff --git a/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf index eee52ede869..6bcf7a09401 100644 --- a/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf +++ b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf @@ -19,9 +19,8 @@ loose-innodb_buffer_pool_size= 8M loose-innodb_lru_scan_depth= 100 loose-innodb_write_io_threads= 2 loose-innodb_read_io_threads= 2 -loose-innodb_log_buffer_size= 1M -loose-innodb_log_file_size= 5M -loose-innodb_log_files_in_group= 2 +loose-innodb_log_buffer_size= 2M +loose-innodb_log_file_size= 10M slave-net-timeout=120 diff --git a/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result deleted file mode 100644 index 5c9eb69de50..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result +++ /dev/null @@ -1,88 +0,0 @@ -SET @start_global_value = @@global.innodb_log_write_ahead_size; -SET global innodb_log_write_ahead_size=4096; -Valid values are positive number -SELECT @@global.innodb_log_write_ahead_size >= 512; -@@global.innodb_log_write_ahead_size >= 512 -1 -SELECT @@global.innodb_log_write_ahead_size <= 16*1024; -@@global.innodb_log_write_ahead_size <= 16*1024 -1 -SELECT @@session.innodb_log_write_ahead_size; -ERROR HY000: Variable 'innodb_log_write_ahead_size' is a GLOBAL variable -SHOW global variables LIKE 'innodb_log_write_ahead_size'; -Variable_name Value -innodb_log_write_ahead_size 4096 -SHOW session variables LIKE 'innodb_log_write_ahead_size'; -Variable_name Value -innodb_log_write_ahead_size 4096 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_LOG_WRITE_AHEAD_SIZE 4096 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_log_write_ahead_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_LOG_WRITE_AHEAD_SIZE 4096 -SET global innodb_log_write_ahead_size=1024; -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -1024 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_LOG_WRITE_AHEAD_SIZE 1024 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_log_write_ahead_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_LOG_WRITE_AHEAD_SIZE 1024 -SET session innodb_log_write_ahead_size=2048; -ERROR HY000: Variable 'innodb_log_write_ahead_size' is a GLOBAL variable and should be set with SET GLOBAL -SET global innodb_log_write_ahead_size=512; -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -512 -SET global innodb_log_write_ahead_size=2048; -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -2048 -SET global innodb_log_write_ahead_size=4096; -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -4096 -SET global innodb_log_write_ahead_size=0; -Warnings: -Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '0' -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -512 -SET global innodb_log_write_ahead_size=-1024; -Warnings: -Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '-1024' -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -512 -SET global innodb_log_write_ahead_size=3000; -Warnings: -Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '3000' -Warning 1210 innodb_log_write_ahead_size should be set 2^n value and larger than 512. -Warning 1210 Setting innodb_log_write_ahead_size to 4096 -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -4096 -SET global innodb_log_write_ahead_size=1.1; -ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size' -SET global innodb_log_write_ahead_size=1e1; -ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size' -SET global innodb_log_write_ahead_size="foo"; -ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size' -SET global innodb_log_write_ahead_size=-7; -Warnings: -Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '-7' -SELECT @@global.innodb_log_write_ahead_size; -@@global.innodb_log_write_ahead_size -512 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_LOG_WRITE_AHEAD_SIZE 512 -SET @@global.innodb_log_write_ahead_size = @start_global_value; diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff index 803fbba6200..67d3897375b 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -213,23 +213,14 @@ VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk. - NUMERIC_MIN_VALUE 262144 --NUMERIC_MAX_VALUE 9223372036854775807 -+NUMERIC_MAX_VALUE 2147483647 - NUMERIC_BLOCK_SIZE 1024 + VARIABLE_COMMENT Redo log buffer size in bytes. + NUMERIC_MIN_VALUE 2097152 +-NUMERIC_MAX_VALUE 18446744073709551615 ++NUMERIC_MAX_VALUE 4294967295 + NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1033,7 +1033,7 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 8192 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size - NUMERIC_MIN_VALUE 512 - NUMERIC_MAX_VALUE 16384 -@@ -1045,10 +1045,10 @@ +@@ -1033,10 +1033,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 32 VARIABLE_SCOPE GLOBAL @@ -242,7 +233,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1057,10 +1057,10 @@ +@@ -1045,10 +1045,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 1536 VARIABLE_SCOPE GLOBAL @@ -255,7 +246,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1093,10 +1093,10 @@ +@@ -1081,10 +1081,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -268,7 +259,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1105,7 +1105,7 @@ +@@ -1093,7 +1093,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -277,7 +268,7 @@ VARIABLE_COMMENT Maximum delay of user threads in micro-seconds NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 10000000 -@@ -1237,10 +1237,10 @@ +@@ -1225,10 +1225,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -290,7 +281,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1261,7 +1261,7 @@ +@@ -1249,7 +1249,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 16384 VARIABLE_SCOPE GLOBAL @@ -299,7 +290,7 @@ VARIABLE_COMMENT Page size to use for all InnoDB tablespaces. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 65536 -@@ -1297,7 +1297,7 @@ +@@ -1285,7 +1285,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 300 VARIABLE_SCOPE GLOBAL @@ -308,7 +299,7 @@ VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 5000 -@@ -1309,7 +1309,7 @@ +@@ -1297,7 +1297,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -317,7 +308,7 @@ VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -1345,7 +1345,7 @@ +@@ -1333,7 +1333,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 56 VARIABLE_SCOPE GLOBAL @@ -326,7 +317,7 @@ VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 64 -@@ -1417,7 +1417,7 @@ +@@ -1405,7 +1405,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -335,7 +326,7 @@ VARIABLE_COMMENT Memory buffer size for index creation NUMERIC_MIN_VALUE 65536 NUMERIC_MAX_VALUE 67108864 -@@ -1585,10 +1585,10 @@ +@@ -1573,10 +1573,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 324433acbe3..40e5596e5e2 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -986,10 +986,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 16777216 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk. -NUMERIC_MIN_VALUE 262144 -NUMERIC_MAX_VALUE 9223372036854775807 -NUMERIC_BLOCK_SIZE 1024 +VARIABLE_COMMENT Redo log buffer size in bytes. +NUMERIC_MIN_VALUE 2097152 +NUMERIC_MAX_VALUE 18446744073709551615 +NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED @@ -1010,10 +1010,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 100663296 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Size of each log file in a log group. +VARIABLE_COMMENT Redo log size in bytes. NUMERIC_MIN_VALUE 1048576 NUMERIC_MAX_VALUE 18446744073709551615 -NUMERIC_BLOCK_SIZE 65536 +NUMERIC_BLOCK_SIZE 4096 ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED @@ -1029,18 +1029,6 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME INNODB_LOG_WRITE_AHEAD_SIZE -SESSION_VALUE NULL -DEFAULT_VALUE 8192 -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size -NUMERIC_MIN_VALUE 512 -NUMERIC_MAX_VALUE 16384 -NUMERIC_BLOCK_SIZE 512 -ENUM_VALUE_LIST NULL -READ_ONLY NO -COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_LRU_FLUSH_SIZE SESSION_VALUE NULL DEFAULT_VALUE 32 diff --git a/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test deleted file mode 100644 index 8693c6a7b1b..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test +++ /dev/null @@ -1,93 +0,0 @@ ---source include/have_innodb.inc - -SET @start_global_value = @@global.innodb_log_write_ahead_size; - -# default value is limited by innodb_page_size and varying along with the page size. -#SELECT @start_global_value; - -#set common valid value -SET global innodb_log_write_ahead_size=4096; - -# -# exists as global only -# ---echo Valid values are positive number -SELECT @@global.innodb_log_write_ahead_size >= 512; -SELECT @@global.innodb_log_write_ahead_size <= 16*1024; - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@session.innodb_log_write_ahead_size; -SHOW global variables LIKE 'innodb_log_write_ahead_size'; -SHOW session variables LIKE 'innodb_log_write_ahead_size'; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_log_write_ahead_size'; ---enable_warnings - -# -# show that it's writable -# -SET global innodb_log_write_ahead_size=1024; -SELECT @@global.innodb_log_write_ahead_size; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_log_write_ahead_size'; ---enable_warnings ---error ER_GLOBAL_VARIABLE -SET session innodb_log_write_ahead_size=2048; - -# -# Valid values -# -SET global innodb_log_write_ahead_size=512; -SELECT @@global.innodb_log_write_ahead_size; -SET global innodb_log_write_ahead_size=2048; -SELECT @@global.innodb_log_write_ahead_size; -SET global innodb_log_write_ahead_size=4096; -SELECT @@global.innodb_log_write_ahead_size; - -# limited by innodb_page_size, and the followings are occationally invalid -#SET global innodb_log_write_ahead_size=8192; -#SELECT @@global.innodb_log_write_ahead_size; -#SET global innodb_log_write_ahead_size=16384; -#SELECT @@global.innodb_log_write_ahead_size; - -# -# Invalid values -# -SET global innodb_log_write_ahead_size=0; -SELECT @@global.innodb_log_write_ahead_size; -SET global innodb_log_write_ahead_size=-1024; -SELECT @@global.innodb_log_write_ahead_size; -SET global innodb_log_write_ahead_size=3000; -SELECT @@global.innodb_log_write_ahead_size; - -# limited by innodb_page_size, and the followings result occationally different -#SET global innodb_log_write_ahead_size=32768; -#SELECT @@global.innodb_log_write_ahead_size; - -# -# incorrect types -# ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_log_write_ahead_size=1.1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_log_write_ahead_size=1e1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_log_write_ahead_size="foo"; -SET global innodb_log_write_ahead_size=-7; -SELECT @@global.innodb_log_write_ahead_size; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_log_write_ahead_size'; ---enable_warnings - -# -# cleanup -# - -SET @@global.innodb_log_write_ahead_size = @start_global_value; |