1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Backport test cases for Bug#46198 and Bug#38054

from 6.0 to trunk-bugfixing.
This commit is contained in:
Alexander Nozdrin
2010-05-19 16:31:18 +04:00
parent b530d5660e
commit 796fd24e15
4 changed files with 82 additions and 0 deletions

View File

@@ -2111,4 +2111,24 @@ COUNT(*)
0
DROP TABLE t1;
SET SESSION SQL_MODE=DEFAULT;
#
# Bug#46198: Hang after failed ALTER TABLE on partitioned table.
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (s1 INT PRIMARY KEY) PARTITION BY HASH(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
ALTER TABLE t1 DROP PARTITION p1;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
SELECT * FROM t1;
s1
DROP TABLE t1;
CREATE TABLE t1 (s1 VARCHAR(5) PRIMARY KEY) PARTITION BY KEY(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
ALTER TABLE t1 ADD COLUMN (s3 VARCHAR(5) UNIQUE);
ERROR HY000: A UNIQUE INDEX must include all columns in the table's partitioning function
SELECT * FROM t1;
s1
DROP TABLE t1;
End of 5.1 tests