diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/t/alter_partitioned.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/alter_partitioned.test')
-rw-r--r-- | mysql-test/suite/innodb/t/alter_partitioned.test | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/alter_partitioned.test b/mysql-test/suite/innodb/t/alter_partitioned.test new file mode 100644 index 00000000..8c6adbbb --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_partitioned.test @@ -0,0 +1,68 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV-26077 Assertion failure err != DB_DUPLICATE_KEY +--echo # or unexpected ER_TABLE_EXISTS_ERROR +--echo # + +CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB; + +--connect (con1,localhost,root,,test) + +START TRANSACTION; +INSERT INTO t2 (pk) VALUES (1); +SAVEPOINT sp; +INSERT INTO t1 (pk) VALUES (1); +ROLLBACK TO SAVEPOINT sp; + +--connection default +SET @save_timeout=@@lock_wait_timeout; +SET @save_innodb_timeout=@@innodb_lock_wait_timeout; +SET lock_wait_timeout=0; +SET innodb_lock_wait_timeout=0; +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 PARTITION BY HASH(pk); +SET lock_wait_timeout=@save_timeout; +SET innodb_lock_wait_timeout=@save_innodb_timeout; + +SHOW CREATE TABLE t1; +--connection con1 +COMMIT; +--connection default +SET lock_wait_timeout=@save_timeout; +SET innodb_lock_wait_timeout=@save_innodb_timeout; +ALTER TABLE t2 PARTITION BY HASH(pk); +# Cleanup +--disconnect con1 +--connection default +DROP TABLE t1, t2; + +--echo # End of 10.2 tests + +CREATE TABLE t1(a INT, b VARCHAR(10), INDEX(a))ENGINE=InnoDB +PARTITION BY RANGE(a) +(PARTITION pa VALUES LESS THAN (3), +PARTITION pb VALUES LESS THAN (5)); + +--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING +CREATE TABLE t2(a INT, FOREIGN KEY(a) REFERENCES t1(a))ENGINE=INNODB +PARTITION BY RANGE(a) +(PARTITION pa VALUES LESS THAN (2), +PARTITION pb VALUES LESS THAN (4)); + +DROP TABLE t1; + +--echo # End of 10.3 tests + +--echo # +--echo # MDEV-24754 Server crash in +--echo # ha_partition_inplace_ctx::~ha_partition_inplace_ctx +--echo # +CREATE TABLE t1 (id INT PRIMARY KEY, a INT, va INT AS (a) VIRTUAL) +ENGINE=InnoDB PARTITION BY HASH(id) PARTITIONS 2; +ALTER TABLE t1 ADD b INT, ALGORITHM=INSTANT; +DROP TABLE t1; + +--echo # End of 10.5 tests |