-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/10.1' into 10.1
Extra merge due to more extra commits during merge process
- Loading branch information
Showing
69 changed files
with
2,030 additions
and
2,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/perl | ||
# Convert tablespace flags to the format understood by MariaDB 10.1.0..10.1.20, | ||
# with the assumption that the flags were correct. | ||
|
||
sub convert_to_mariadb_101 | ||
{ | ||
my ($file, $page_size) = @_; | ||
open(FILE, "+<", $file) or die "Unable to open $file\n"; | ||
sysread(FILE, $_, $page_size)==$page_size||die "Unable to read $file\n"; | ||
sysseek(FILE, 0, 0)||die "Unable to seek $file\n"; | ||
|
||
# FIL_PAGE_DATA + FSP_SPACE_FLAGS = 38 + 16 = 54 bytes from the start | ||
my($flags) = unpack "x[54]N", $_; | ||
my $badflags = ($flags & 0x3f); | ||
my $compression_level=6; | ||
$badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16); | ||
$badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE | ||
|
||
substr ($_, 54, 4) = pack("N", $badflags); | ||
# Replace the innodb_checksum_algorithm=none checksum | ||
substr ($_, 0, 4) = pack("N", 0xdeadbeef); | ||
substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef); | ||
syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n"; | ||
close(FILE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# MDEV-11623 MariaDB 10.1 fails to start datadir created with | ||
# MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K | ||
# | ||
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace"); | ||
SET GLOBAL innodb_file_per_table=1; | ||
SET GLOBAL innodb_file_format=Barracuda; | ||
CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; | ||
CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT; | ||
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; | ||
CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='MYSQL_TMP_DIR'; | ||
CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1; | ||
CREATE TABLE ti(a INT) ENGINE=InnoDB; | ||
FLUSH TABLES ti FOR EXPORT; | ||
backup: ti | ||
UNLOCK TABLES; | ||
ALTER TABLE ti DISCARD TABLESPACE; | ||
restore: ti .ibd and .cfg files | ||
ALTER TABLE ti IMPORT TABLESPACE; | ||
BEGIN; | ||
INSERT INTO tr VALUES(1); | ||
INSERT INTO tc VALUES(1); | ||
INSERT INTO td VALUES(1); | ||
INSERT INTO tz VALUES(1); | ||
INSERT INTO tdd VALUES(1); | ||
INSERT INTO tp VALUES(1); | ||
INSERT INTO ti VALUES(1); | ||
# Kill the server | ||
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; | ||
Table Op Msg_type Msg_text | ||
test.tr check status OK | ||
test.tc check status OK | ||
test.td check status OK | ||
test.tz check status OK | ||
test.tdd check status OK | ||
test.tp check status OK | ||
test.ti check status OK | ||
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; | ||
Table Op Msg_type Msg_text | ||
test.tr check status OK | ||
test.tc check status OK | ||
test.td check status OK | ||
test.tz check status OK | ||
test.tdd check status OK | ||
test.tp check status OK | ||
test.ti check status OK | ||
DROP TABLE tr,tc,td,tz,tdd,tp,ti; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--source include/have_innodb.inc | ||
--source include/not_embedded.inc | ||
|
||
-- echo # | ||
-- echo # MDEV-11623 MariaDB 10.1 fails to start datadir created with | ||
-- echo # MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K | ||
-- echo # | ||
|
||
# This is actually testing the opposite: starting the fixed 10.1 with | ||
# buggy 10.1 files (by manually converting the flags in the files). | ||
|
||
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace"); | ||
SET GLOBAL innodb_file_per_table=1; | ||
SET GLOBAL innodb_file_format=Barracuda; | ||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`; | ||
let MYSQLD_DATADIR=`select @@datadir`; | ||
|
||
CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; | ||
CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT; | ||
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
--disable_warnings | ||
CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; | ||
--enable_warnings | ||
|
||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR | ||
EVAL CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='$MYSQL_TMP_DIR'; | ||
|
||
CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1; | ||
CREATE TABLE ti(a INT) ENGINE=InnoDB; | ||
FLUSH TABLES ti FOR EXPORT; | ||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; | ||
ib_backup_tablespaces("test", "ti"); | ||
EOF | ||
UNLOCK TABLES; | ||
ALTER TABLE ti DISCARD TABLESPACE; | ||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; | ||
ib_discard_tablespaces("test", "ti"); | ||
ib_restore_tablespaces("test", "ti"); | ||
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; | ||
my $ps = $ENV{INNODB_PAGE_SIZE}; | ||
my $dd = $ENV{MYSQLD_DATADIR}; | ||
convert_to_mariadb_101("$dd/test/ti.ibd", $ps); | ||
EOF | ||
|
||
ALTER TABLE ti IMPORT TABLESPACE; | ||
|
||
BEGIN; | ||
INSERT INTO tr VALUES(1); | ||
INSERT INTO tc VALUES(1); | ||
INSERT INTO td VALUES(1); | ||
INSERT INTO tz VALUES(1); | ||
INSERT INTO tdd VALUES(1); | ||
INSERT INTO tp VALUES(1); | ||
INSERT INTO ti VALUES(1); | ||
|
||
--source include/kill_mysqld.inc | ||
|
||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; | ||
my $ps = $ENV{INNODB_PAGE_SIZE}; | ||
my $dd = $ENV{MYSQLD_DATADIR}; | ||
|
||
convert_to_mariadb_101("$dd/ibdata1", $ps); | ||
convert_to_mariadb_101("$dd/test/tr.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/tc.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/td.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768; | ||
convert_to_mariadb_101("$dd/test/tp.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/ti.ibd", $ps); | ||
convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps); | ||
EOF | ||
|
||
--source include/start_mysqld.inc | ||
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; | ||
--source include/shutdown_mysqld.inc | ||
|
||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; | ||
my $ps = $ENV{INNODB_PAGE_SIZE}; | ||
my $dd = $ENV{MYSQLD_DATADIR}; | ||
|
||
convert_to_mariadb_101("$dd/ibdata1", $ps); | ||
convert_to_mariadb_101("$dd/test/tr.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/tc.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/td.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768; | ||
convert_to_mariadb_101("$dd/test/tp.ibd", $ps); | ||
convert_to_mariadb_101("$dd/test/ti.ibd", $ps); | ||
convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps); | ||
EOF | ||
|
||
--let $restart_parameters=--innodb-read-only | ||
--source include/start_mysqld.inc | ||
CHECK TABLE tr,tc,td,tz,tdd,tp,ti; | ||
--source include/shutdown_mysqld.inc | ||
|
||
--let $restart_parameters= | ||
--source include/start_mysqld.inc | ||
DROP TABLE tr,tc,td,tz,tdd,tp,ti; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.