From 7b44d0ba573c3a07d5fe8b43251c705ec1d63597 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 29 Nov 2022 05:21:03 +1100 Subject: [PATCH 1/2] MDEV-23230 wsrep files installed when built without WSREP (#2334) Prevent wsrep files from being installed if WITH_WSREP=OFF. Reviewed by Daniel Black Additionally excluded #include wsrep files and galera* files along with galera/wsrep tests. mysql-test/include/have_wsrep.inc remainds as its used by a few isolated tests. Co-authored-by: Chris Ross --- CMakeLists.txt | 5 ++++- cmake/install_macros.cmake | 6 ++++++ cmake/systemd.cmake | 5 ++++- include/CMakeLists.txt | 11 ++++++++++- man/CMakeLists.txt | 12 +++++++----- sql/CMakeLists.txt | 4 ++++ support-files/CMakeLists.txt | 12 ++++++++++-- 7 files changed, 45 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8a420afed4..f530d2abdc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -550,7 +550,10 @@ INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY COMPONENT Readme) # ${CMAKE_BINARY_DIR}/Docs/INFO_BIN) IF(UNIX) - INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme) + INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme) + IF(WITH_WSREP) + INSTALL_DOCUMENTATION(Docs/README-wsrep COMPONENT Readme) + ENDIF() ENDIF() INCLUDE(build_depends) diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index 765f3be23e0..7814f1dbeac 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -265,6 +265,11 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug FUNCTION(INSTALL_MYSQL_TEST from to) IF(INSTALL_MYSQLTESTDIR) + IF(NOT WITH_WSREP) + SET(EXCL_GALERA "(suite/(galera|wsrep|sys_vars/[rt]/(sysvars_)?wsrep).*|include/((w.*)?wsrep.*|.*galera.*)\\.inc|std_data/(galera|wsrep).*)") + ELSE() + SET(EXCL_GALERA "^DOES_NOT_EXIST$") + ENDIF() INSTALL( DIRECTORY ${from} DESTINATION "${INSTALL_MYSQLTESTDIR}/${to}" @@ -286,6 +291,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to) PATTERN "*.vcxproj.user" EXCLUDE PATTERN "CTest*" EXCLUDE PATTERN "*~" EXCLUDE + REGEX "${EXCL_GALERA}" EXCLUDE ) ENDIF() ENDFUNCTION() diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake index 255abe62351..a093b89f3c8 100644 --- a/cmake/systemd.cmake +++ b/cmake/systemd.cmake @@ -44,7 +44,10 @@ MACRO(CHECK_SYSTEMD) IF(HAVE_SYSTEMD_SD_DAEMON_H AND HAVE_SYSTEMD_SD_LISTEN_FDS AND HAVE_SYSTEMD_SD_NOTIFY AND HAVE_SYSTEMD_SD_NOTIFYF) SET(HAVE_SYSTEMD TRUE) - SET(SYSTEMD_SCRIPTS mariadb-service-convert galera_new_cluster galera_recovery) + SET(SYSTEMD_SCRIPTS mariadb-service-convert) + IF(WITH_WSREP) + SET(SYSTEMD_SCRIPTS ${SYSTEMD_SCRIPTS} galera_new_cluster galera_recovery) + ENDIF() IF(DEB) SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld") SET(SYSTEMD_EXECSTARTPOST "ExecStartPost=/etc/mysql/debian-start") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index a7b98a11050..7076d2d88d2 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -74,7 +74,15 @@ FOREACH(f ${HEADERS_GEN_CONFIGURE}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development) ENDFOREACH(f) -INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h") +IF(NOT WITH_WSREP) + SET(EXCL_SERVICE_WSREP "service_wsrep.h") + SET(EXCL_WSREP "wsrep.h") +ENDIF() +INSTALL(DIRECTORY mysql/ + DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development + FILES_MATCHING PATTERN "*.h" + PATTERN "${EXCL_SERVICE_WSREP}" EXCLUDE +) STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}") STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}") @@ -85,6 +93,7 @@ MACRO(INSTALL_PRIVATE DIR) FILES_MATCHING PATTERN "*.h" PATTERN CMakeFiles EXCLUDE PATTERN mysql EXCLUDE + PATTERN "${EXCL_WSREP}" EXCLUDE REGEX "\\./(${EXCL_RE}$)" EXCLUDE) ENDMACRO() diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index f5ae0a0fb38..975bfd5e887 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -13,6 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA +SET(MAN1_WSREP wsrep_sst_rsync.1 wsrep_sst_common.1 wsrep_sst_mariabackup.1 + wsrep_sst_mysqldump.1 wsrep_sst_rsync_wan.1 galera_recovery.1 galera_new_cluster.1) SET(MAN1_SERVER innochecksum.1 myisam_ftdump.1 myisamchk.1 aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1 aria_s3_copy.1 @@ -24,12 +26,12 @@ SET(MAN1_SERVER innochecksum.1 myisam_ftdump.1 myisamchk.1 mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1 perror.1 replace.1 resolve_stack_dump.1 resolveip.1 mariadb-service-convert.1 - mysqld_safe_helper.1 wsrep_sst_common.1 - wsrep_sst_mysqldump.1 wsrep_sst_rsync.1 - galera_recovery.1 galera_new_cluster.1 + mysqld_safe_helper.1 mysql_ldb.1 myrocks_hotbackup.1 - wsrep_sst_mariabackup.1 mbstream.1 mariabackup.1 - wsrep_sst_rsync_wan.1) + mbstream.1 mariabackup.1) +IF(WITH_WSREP) + SET(MAN1_SERVER ${MAN1_SERVER} ${MAN1_WSREP}) +ENDIF() SET(MAN8_SERVER mysqld.8) SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1 mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 8143136b13b..583fe11b38b 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -495,7 +495,11 @@ IF(WIN32) TARGET_LINK_LIBRARIES(mariadb-upgrade-service mysys winservice) ENDIF(WIN32) +IF(NOT WITH_WSREP) + SET(EXCL_WSREP "wsrep*.h") +ENDIF() INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development FILES_MATCHING PATTERN "*.h" PATTERN share EXCLUDE + PATTERN "${EXCL_WSREP}" EXCLUDE PATTERN CMakeFiles EXCLUDE) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index ff468dcbe9c..d65408fc4dd 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -51,7 +51,11 @@ ENDIF() IF(UNIX) SET(prefix ${CMAKE_INSTALL_PREFIX}) - FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure wsrep_notify) + SET(SCRIPTS mysqld_multi.server mysql-log-rotate binary-configure) + IF(WITH_WSREP) + SET(SCRIPTS ${SCRIPTS} wsrep_notify) + ENDIF() + FOREACH(script ${SCRIPTS}) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY ) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script} @@ -126,7 +130,11 @@ IF(UNIX) COMMAND ${CMAKE_COMMAND} -E create_symlink ./mariadb.service mysqld.service WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - INSTALL(FILES use_galera_new_cluster.conf + IF(WITH_WSREP) + INSTALL(FILES use_galera_new_cluster.conf + DESTINATION ${inst_location}/systemd COMPONENT SupportFiles) + ENDIF() + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service ${CMAKE_CURRENT_BINARY_DIR}/mysql.service ${CMAKE_CURRENT_BINARY_DIR}/mysqld.service From 846112ce36844903284be3f2536c184a0bc226ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 30 Nov 2022 06:57:32 +0200 Subject: [PATCH 2/2] MDEV-24412: Create a separate test Some builders in our CI, most notably FreeBSD and IBM AIX, do not support sparse files. Also, Microsoft Windows requires special means for creating sparse files. Since these platforms do not run ./mtr --big-test, we will for now simply move the test to a separate file that requires that option. --- .../r/innodb_encrypt_log_corruption.result | 10 +- .../suite/innodb/r/log_corruption.result | 10 +- mysql-test/suite/innodb/r/log_upgrade.result | 16 +++ mysql-test/suite/innodb/t/log_corruption.test | 36 ------ mysql-test/suite/innodb/t/log_upgrade.test | 118 ++++++++++++++++++ 5 files changed, 136 insertions(+), 54 deletions(-) create mode 100644 mysql-test/suite/innodb/r/log_upgrade.result create mode 100644 mysql-test/suite/innodb/t/log_upgrade.test 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 7563100babb..8d1eb447b03 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result @@ -69,14 +69,6 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err -# Empty large 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 4 /InnoDB: Upgrading redo log:/ 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 @@ -187,7 +179,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 6 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 5 /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/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result index 890e3296164..bf92f77d30c 100644 --- a/mysql-test/suite/innodb/r/log_corruption.result +++ b/mysql-test/suite/innodb/r/log_corruption.result @@ -69,14 +69,6 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err -# Empty large 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 4 /InnoDB: Upgrading redo log:/ 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 @@ -187,7 +179,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 6 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 5 /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_upgrade.result b/mysql-test/suite/innodb/r/log_upgrade.result new file mode 100644 index 00000000000..4da83460f93 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_upgrade.result @@ -0,0 +1,16 @@ +call mtr.add_suppression("InnoDB: The change buffer is corrupted"); +# +# MDEV-24412 InnoDB: Upgrade after a crash is not supported +# +# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-force-recovery=5 --innodb-log-file-size=4m +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +COUNT(*) +1 +FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err +ib_buffer_pool +ib_logfile0 +ibdata1 +# restart +# End of 10.5 tests diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test index 27fae80a135..a3ab4510743 100644 --- a/mysql-test/suite/innodb/t/log_corruption.test +++ b/mysql-test/suite/innodb/t/log_corruption.test @@ -291,42 +291,6 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED'); --source include/search_pattern_in_file.inc --let $restart_parameters= $dirs ---echo # Empty large multi-file redo log from after MariaDB 10.2.2 -perl; -do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; -my $polynomial = 0x82f63b78; # CRC-32C - -die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; -binmode OUT; -$_= pack("Nx[5]nx[5]", 1, 0x1286) . "BogoDB 4.3.2.1" . chr(0) x 478; -print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); -# checkpoint page 1 and all-zero checkpoint 2 -$_= pack("x[13]nCNNx[484]", 0x1286, 12, 2, 0x80c); -print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); -print OUT chr(0) x 1024; -die unless seek(OUT, 0x1FFFFFFFF, 0); -print OUT chr(0); -close OUT or die; -die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1"; -binmode OUT; -die unless seek(OUT, 0x800, 0); # the first 2048 bytes are unused! -$_= pack("Nnnx[500]", 0x80000944, 12, 12); -print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); -die unless seek(OUT, 0x1FFFFFFFF, 0); -print OUT chr(0); -close OUT or die; -EOF - ---let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m ---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 ---let $restart_parameters= $dirs - --remove_file $bugdir/ib_logfile0 --move_file $bugdir/ib_logfile $bugdir/ib_logfile0 diff --git a/mysql-test/suite/innodb/t/log_upgrade.test b/mysql-test/suite/innodb/t/log_upgrade.test new file mode 100644 index 00000000000..6f548d93b3e --- /dev/null +++ b/mysql-test/suite/innodb/t/log_upgrade.test @@ -0,0 +1,118 @@ +--source include/have_innodb.inc +--source include/have_innodb_16k.inc +# Some operating systems or file systems do not support sparse files. +# For example, tmpfs on FreeBSD does not support them. +# On Microsoft Windows, sparse files have to be created in a special way. +--source include/big_test.inc + +call mtr.add_suppression("InnoDB: The change buffer is corrupted"); + +--source include/shutdown_mysqld.inc + +let bugdir= $MYSQLTEST_VARDIR/tmp/log_upgrade; +--mkdir $bugdir +--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err + +--let $dirs= --innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir + +--echo # +--echo # MDEV-24412 InnoDB: Upgrade after a crash is not supported +--echo # + +perl; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; +my $polynomial = 0x82f63b78; # CRC-32C + +# Create a dummy system tablespace file using the default innodb_page_size=16k +die unless open OUT, ">", "$ENV{bugdir}/ibdata1"; +binmode OUT; + +# We calculate innodb_checksum_algorithm=crc32 for the pages. +# The following bytes are excluded: +# bytes 0..3 (the checksum is stored there) +# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id) +# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN) + +# Tablespace header page with valid FSP_SIZE=768 pages. +# Also, write a dummy FSEG_MAGIC_N at offset 60 to keep fseg_inode_try_get() +# happy when fseg_n_reserved_pages() is following an invalid pointer +# from the all-zero change buffer header page (page 3). +## FIL_PAGE_OFFSET +my $head = pack("Nx[18]", 0); +## FSP_PAGE_SIZE, # FSEG_MAGIC_N +my $body = pack("x[8]Nx[10]Nx[16312]", 768, 97937874); +my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); +print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck); +# Dummy pages 1..6. +print OUT chr(0) x (6 * 16384); +# Dictionary header page (page 7). +## FIL_PAGE_OFFSET +$head = pack("Nx[18]", 7); +## DICT_HDR_TABLES,DICT_HDR_INDEXES +$body = pack("x[32]Nx[8]Nx[16290]", 8, 9); +$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); +print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck); + +# Empty SYS_TABLES page (page 8). +## FIL_PAGE_OFFSET, FIL_PAGE_PREV, FIL_PAGE_NEXT, FIL_PAGE_TYPE +$head = pack("NNNx[8]n", 8, ~0, ~0, 17855); +## PAGE_N_DIR_SLOTS, PAGE_HEAP_TOP, PAGE_INDEX_ID == DICT_TABLES_ID +$body = pack("nnx[31]Cx[20]", 2, 124, 1); +$body .= pack("nxnn", 0x801, 3, 116) . "infimum"; +$body .= pack("xnxnxx", 0x901, 0x803) . "supremum"; +$body .= pack("x[16248]nn", 116, 101); +$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); +print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck); + +# Empty SYS_INDEXES page (page 9). +## FIL_PAGE_OFFSET, FIL_PAGE_PREV, FIL_PAGE_NEXT, FIL_PAGE_TYPE +$head = pack("NNNx[8]n", 9, ~0, ~0, 17855); +## PAGE_N_DIR_SLOTS, PAGE_HEAP_TOP, PAGE_INDEX_ID == DICT_INDEXES_ID +$body = pack("nnx[31]Cx[20]", 2, 124, 3); +$body .= pack("nxnn", 0x801, 3, 116) . "infimum"; +$body .= pack("xnxnxx", 0x901, 0x803) . "supremum"; +$body .= pack("x[16248]nn", 116, 101); +$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); +print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck); + +die unless seek(OUT, 768 * 16384 - 1, 0); +print OUT chr(0); +close OUT or die; + +die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +$_= pack("Nx[5]nx[5]", 1, 0x1286) . "BogoDB 4.3.2.1" . chr(0) x 478; +print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); +# checkpoint page 1 and all-zero checkpoint 2 +$_= pack("x[13]nCNNx[484]", 0x1286, 12, 2, 0x80c); +print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); +die unless seek(OUT, 0x1FFFFFFFF, 0); +print OUT chr(0); +close OUT or die; +die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1"; +binmode OUT; +die unless seek(OUT, 0x800, 0); # the first 2048 bytes are unused! +$_= pack("Nnnx[500]", 0x80000944, 12, 12); +print OUT $_, pack("N", mycrc32($_, 0, $polynomial)); +die unless seek(OUT, 0x1FFFFFFFF, 0); +print OUT chr(0); +close OUT or die; +EOF + +--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=4m +--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 +--let $restart_parameters= $dirs + +--list_files $bugdir +--remove_files_wildcard $bugdir +--rmdir $bugdir +--let $restart_parameters= +--source include/start_mysqld.inc + +--echo # End of 10.5 tests