summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-03-03 13:03:17 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-03-03 13:03:17 +0200
commit15ce2700360f8677d3f9f928c6d5ec95dbf72fef (patch)
treec3e0bc0c138c2e90b7657004d2a3c168b6bebe8a /mysql-test/suite
parent177345dadc9250387343164be0053b1952fc59c1 (diff)
parentc8a18589dec9137730122ecc07e16c4164939988 (diff)
downloadmariadb-git-15ce2700360f8677d3f9f928c6d5ec95dbf72fef.tar.gz
Merge 10.8 into 10.9
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/archive/discover.result2
-rw-r--r--mysql-test/suite/archive/discover.test4
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create.result3
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_create.test3
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.result4
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.test4
-rw-r--r--mysql-test/suite/parts/r/engine_defined_part_attributes.result70
-rw-r--r--mysql-test/suite/parts/t/engine_defined_part_attributes.test47
8 files changed, 130 insertions, 7 deletions
diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result
index 99bb955ea24..74ba3752373 100644
--- a/mysql-test/suite/archive/discover.result
+++ b/mysql-test/suite/archive/discover.result
@@ -84,7 +84,7 @@ drop table t1;
db.opt
t0.ARZ
#
-# discover of table non-existance on drop
+# discover of table non-existence on drop
#
select * from t0;
a
diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test
index 4ab35cf1115..1bced9edcbc 100644
--- a/mysql-test/suite/archive/discover.test
+++ b/mysql-test/suite/archive/discover.test
@@ -67,7 +67,7 @@ drop table t1;
--list_files $mysqld_datadir/test
--echo #
---echo # discover of table non-existance on drop
+--echo # discover of table non-existence on drop
--echo #
select * from t0;
remove_file $mysqld_datadir/test/t0.ARZ;
@@ -119,7 +119,7 @@ select * from t1;
--list_files $mysqld_datadir/test
#
-# MDEV-4955 discover of table non-existance on CREATE
+# MDEV-4955 discover of table non-existence on CREATE
#
create table t1 (a int) engine=archive;
select * from t1;
diff --git a/mysql-test/suite/innodb/r/default_row_format_create.result b/mysql-test/suite/innodb/r/default_row_format_create.result
index 50adc757b62..a1334101b61 100644
--- a/mysql-test/suite/innodb/r/default_row_format_create.result
+++ b/mysql-test/suite/innodb/r/default_row_format_create.result
@@ -58,10 +58,13 @@ CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
DROP TABLE IF EXISTS t;
SET GLOBAL innodb_compression_level=1;
CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1;
+CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY)
+ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB;
SET GLOBAL innodb_compression_level=0;
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED'
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`t` (errno: 140 "Wrong create options")
DROP TABLE t;
+TRUNCATE tt;
SET GLOBAL innodb_compression_level=@save_level;
diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test
index 0b3e0d25f00..cd497d74de7 100644
--- a/mysql-test/suite/innodb/t/default_row_format_create.test
+++ b/mysql-test/suite/innodb/t/default_row_format_create.test
@@ -69,10 +69,13 @@ DROP TABLE IF EXISTS t;
SET GLOBAL innodb_compression_level=1;
CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1;
+CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY)
+ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB;
SET GLOBAL innodb_compression_level=0;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE;
--error ER_CANT_CREATE_TABLE
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY;
DROP TABLE t;
+TRUNCATE tt;
SET GLOBAL innodb_compression_level=@save_level;
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.result b/mysql-test/suite/mariabackup/log_page_corruption.result
index 91db833622a..4dcd21f1e2f 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.result
+++ b/mysql-test/suite/mariabackup/log_page_corruption.result
@@ -98,12 +98,12 @@ test/t3_inc
------
# Full backup prepare
# "innodb_corrupted_pages" file must not exist after successful prepare
-FOUND 1 /was successfuly fixed.*/ in backup.log
+FOUND 1 /was successfully fixed.*/ in backup.log
# Check that fixed pages are zero-filled
# Incremental backup prepare
# "innodb_corrupted_pages" file must not exist after successful prepare
# do not remove "innodb_corrupted_pages" in incremental dir
-FOUND 1 /was successfuly fixed.*/ in backup.log
+FOUND 1 /was successfully fixed.*/ in backup.log
# Check that fixed pages are zero-filled
# shutdown server
# remove datadir
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test
index 0151afb96b4..8931eb1eaf7 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.test
+++ b/mysql-test/suite/mariabackup/log_page_corruption.test
@@ -323,7 +323,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir > $backuplog;
--echo # "innodb_corrupted_pages" file must not exist after successful prepare
--error 1
--file_exists $targetdir/innodb_corrupted_pages
---let SEARCH_PATTERN=was successfuly fixed.*
+--let SEARCH_PATTERN=was successfully fixed.*
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
@@ -347,7 +347,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir --incremental-dir=$incdir > $
--file_exists $targetdir/innodb_corrupted_pages
--echo # do not remove "innodb_corrupted_pages" in incremental dir
--file_exists $incdir/innodb_corrupted_pages
---let SEARCH_PATTERN=was successfuly fixed.*
+--let SEARCH_PATTERN=was successfully fixed.*
--let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/parts/r/engine_defined_part_attributes.result b/mysql-test/suite/parts/r/engine_defined_part_attributes.result
index 81063d82c6f..f31d5e901fb 100644
--- a/mysql-test/suite/parts/r/engine_defined_part_attributes.result
+++ b/mysql-test/suite/parts/r/engine_defined_part_attributes.result
@@ -216,3 +216,73 @@ SUBPARTITION BY HASH (`id`)
(SUBPARTITION `spt3` ENGINE = InnoDB,
SUBPARTITION `spt4` ENGINE = InnoDB))
DROP TABLE `t11`;
+#
+# MDEV-27605 ALTER .. ADD PARTITION uses wrong partition-level option values
+#
+# restart: --innodb-sys-tablespaces
+CREATE TABLE `t12` (
+id INT
+) ENGINE=InnoDB PARTITION BY HASH(id)
+(
+pt1 PAGE_COMPRESSED=0
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+name flag
+test/t12#P#pt1 21
+ALTER TABLE `t12` ADD PARTITION (
+PARTITION pt2 PAGE_COMPRESSED=1
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+name flag
+test/t12#P#pt1 21
+test/t12#P#pt2 1610612789
+ALTER TABLE `t12` ADD PARTITION (
+PARTITION pt3 PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+name flag
+test/t12#P#pt1 21
+test/t12#P#pt2 1610612789
+test/t12#P#pt3 805306421
+DROP TABLE `t12`;
+CREATE TABLE `t13` (
+`id` INT
+) ENGINE=InnoDB PAGE_COMPRESSED=1 PARTITION BY RANGE(id) (
+PARTITION pt1 VALUES LESS THAN (100) PAGE_COMPRESSED=0,
+PARTITION pt2 VALUES LESS THAN (200) PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3,
+PARTITION pt3 VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE `t13`;
+Table Create Table
+t13 CREATE TABLE `t13` (
+ `id` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1
+ PARTITION BY RANGE (`id`)
+(PARTITION `pt1` VALUES LESS THAN (100) ENGINE = InnoDB PAGE_COMPRESSED = 0,
+ PARTITION `pt2` VALUES LESS THAN (200) ENGINE = InnoDB PAGE_COMPRESSED = 1 PAGE_COMPRESSION_LEVEL = 3,
+ PARTITION `pt3` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t13%';
+name flag
+test/t13#P#pt1 21
+test/t13#P#pt2 805306421
+test/t13#P#pt3 1610612789
+ALTER TABLE `t13` PARTITION BY RANGE(id) (
+PARTITION pt1 VALUES LESS THAN (100) PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3,
+PARTITION pt2 VALUES LESS THAN (200),
+PARTITION pt3 VALUES LESS THAN MAXVALUE PAGE_COMPRESSED=0
+);
+SHOW CREATE TABLE `t13`;
+Table Create Table
+t13 CREATE TABLE `t13` (
+ `id` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1
+ PARTITION BY RANGE (`id`)
+(PARTITION `pt1` VALUES LESS THAN (100) ENGINE = InnoDB PAGE_COMPRESSED = 1 PAGE_COMPRESSION_LEVEL = 3,
+ PARTITION `pt2` VALUES LESS THAN (200) ENGINE = InnoDB,
+ PARTITION `pt3` VALUES LESS THAN MAXVALUE ENGINE = InnoDB PAGE_COMPRESSED = 0)
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t13%';
+name flag
+test/t13#P#pt1 805306421
+test/t13#P#pt2 1610612789
+test/t13#P#pt3 21
+DROP TABLE `t13`;
diff --git a/mysql-test/suite/parts/t/engine_defined_part_attributes.test b/mysql-test/suite/parts/t/engine_defined_part_attributes.test
index 8d08f4654cc..22aec9286e9 100644
--- a/mysql-test/suite/parts/t/engine_defined_part_attributes.test
+++ b/mysql-test/suite/parts/t/engine_defined_part_attributes.test
@@ -167,3 +167,50 @@ SUBPARTITION BY HASH(id) (
SHOW CREATE TABLE `t11`;
DROP TABLE `t11`;
+
+--echo #
+--echo # MDEV-27605 ALTER .. ADD PARTITION uses wrong partition-level option values
+--echo #
+
+--let $restart_parameters= --innodb-sys-tablespaces
+--source include/restart_mysqld.inc
+
+CREATE TABLE `t12` (
+ id INT
+) ENGINE=InnoDB PARTITION BY HASH(id)
+(
+ pt1 PAGE_COMPRESSED=0
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+
+ALTER TABLE `t12` ADD PARTITION (
+ PARTITION pt2 PAGE_COMPRESSED=1
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+
+ALTER TABLE `t12` ADD PARTITION (
+ PARTITION pt3 PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3
+);
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t12%';
+
+DROP TABLE `t12`;
+
+CREATE TABLE `t13` (
+ `id` INT
+) ENGINE=InnoDB PAGE_COMPRESSED=1 PARTITION BY RANGE(id) (
+ PARTITION pt1 VALUES LESS THAN (100) PAGE_COMPRESSED=0,
+ PARTITION pt2 VALUES LESS THAN (200) PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3,
+ PARTITION pt3 VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE `t13`;
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t13%';
+
+ALTER TABLE `t13` PARTITION BY RANGE(id) (
+ PARTITION pt1 VALUES LESS THAN (100) PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3,
+ PARTITION pt2 VALUES LESS THAN (200),
+ PARTITION pt3 VALUES LESS THAN MAXVALUE PAGE_COMPRESSED=0
+);
+SHOW CREATE TABLE `t13`;
+SELECT name, flag FROM information_schema.innodb_sys_tablespaces WHERE name like 'test/t13%';
+
+DROP TABLE `t13`;