diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-08-13 09:50:25 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-08-13 09:50:25 +0200 |
commit | 9a7a64acdb53d7ef73ea874d2520c902a49754b7 (patch) | |
tree | 80e56f944086ce1c788ab7e2cb4f6c9b353e15c9 /mysql-test/t/partition_innodb.test | |
parent | 66972aa2b30a179fa88115fbffae605cadd1a225 (diff) | |
download | mariadb-git-9a7a64acdb53d7ef73ea874d2520c902a49754b7.tar.gz |
Bug#53676: Unexpected errors and possible table
corruption on ADD PARTITION and LOCK TABLE
Bug#53770: Server crash at handler.cc:2076 on
LOAD DATA after timed out COALESCE PARTITION
5.5 fix for:
Bug#51042: REORGANIZE PARTITION can leave table in an
inconsistent state in case of crash
Needs to be back-ported to 5.1
5.5 fix for:
Bug#50418: DROP PARTITION does not interact with
transactions
Main problem was non-persistent operations done
before meta-data lock was taken (53770+53676).
And 53676 needed to keep the table/partitions opened and locked
while copying the data to the new partitions.
Also added thorough tests to spot some additional bugs
in the ddl_log code, which could result in bad state
between the .frm and partitions.
Collapsed patch, includes all fixes required from the reviewers.
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 30f5894716c..f6adf014468 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -9,6 +9,50 @@ drop table if exists t1, t2; let $MYSQLD_DATADIR= `SELECT @@datadir`; --echo # +--echo # Bug#50418: DROP PARTITION does not interact with transactions +--echo # +CREATE TABLE t1 ( + id INT AUTO_INCREMENT NOT NULL, + name CHAR(50) NOT NULL, + myDate DATE NOT NULL, + PRIMARY KEY (id, myDate), + INDEX idx_date (myDate) + ) ENGINE=InnoDB +PARTITION BY RANGE ( TO_DAYS(myDate) ) ( + PARTITION p0 VALUES LESS THAN (734028), + PARTITION p1 VALUES LESS THAN (734029), + PARTITION p2 VALUES LESS THAN (734030), + PARTITION p3 VALUES LESS THAN MAXVALUE + ) ; +INSERT INTO t1 VALUES +(NULL, 'Lachlan', '2009-09-13'), + (NULL, 'Clint', '2009-09-13'), + (NULL, 'John', '2009-09-14'), + (NULL, 'Dave', '2009-09-14'), + (NULL, 'Jeremy', '2009-09-15'), + (NULL, 'Scott', '2009-09-15'), + (NULL, 'Jeff', '2009-09-16'), + (NULL, 'Joe', '2009-09-16'); +SET AUTOCOMMIT=0; +SELECT * FROM t1 FOR UPDATE; +UPDATE t1 SET name = 'Mattias' WHERE id = 7; +SELECT * FROM t1 WHERE id = 7; +--connect (con1, localhost, root,,) +--echo # Connection con1 +SET lock_wait_timeout = 1; +--echo # After the patch it will wait and fail on timeout. +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 DROP PARTITION p3; +SHOW WARNINGS; +--disconnect con1 +--connection default +--echo # Connection default +SELECT * FROM t1; +--echo # No changes. +COMMIT; +DROP TABLE t1; + +--echo # --echo # Bug#51830: Incorrect partition pruning on range partition (regression) --echo # CREATE TABLE t1 (a INT NOT NULL) |