mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Removed redundant partitioning check
This check was introduced in602a222
and then became redundant in ad1553e, where we attempt to open a table even for non-copy algorithms. Added missing test case from602a222
. Part of MDEV-17805 - Remove InnoDB cache for temporary tables.
This commit is contained in:
@ -580,6 +580,33 @@ DROP TABLE t1;
|
||||
# Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
|
||||
# table unusable".
|
||||
#
|
||||
CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a))
|
||||
ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2;
|
||||
INSERT INTO t1 values (0,1), (1,2);
|
||||
# The below ALTER should fail. It should leave the
|
||||
# table in its original, non-corrupted, usable state.
|
||||
ALTER TABLE t1 ADD UNIQUE KEY (b);
|
||||
ERROR HY000: A UNIQUE INDEX must include all columns in the table's partitioning function
|
||||
# The below statements should succeed, as ALTER should
|
||||
# have left table intact.
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) NOT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
PARTITION BY KEY (`a`)
|
||||
PARTITIONS 2
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2
|
||||
0 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
|
||||
# table unusable".
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a))
|
||||
ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2;
|
||||
|
Reference in New Issue
Block a user