diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-12-04 10:47:25 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-12-04 10:47:25 +0100 |
commit | 8adc9d1b86317fceb57611565dc344e5baa05eb0 (patch) | |
tree | 23f0a35142902d29fe8cdf73ca4f8eccc19ec068 /mysql-test/suite/parts | |
parent | 014143e8588c4313ccf10e269aa34a997f5772b6 (diff) | |
download | mariadb-git-8adc9d1b86317fceb57611565dc344e5baa05eb0.tar.gz |
Bug#40515: Query on a partitioned table does not return
'lock wait timeout exceeded'
Problem was a bug in the implementation of scan in partitioning
which masked the error code from the partition's handler.
Fixed by returning the value from the underlying handler.
mysql-test/suite/parts/r/partition_special_innodb.result:
Bug#40515: Query on a partitioned table does not return
'lock wait timeout exceeded'
Updated test result
mysql-test/suite/parts/t/partition_special_innodb.test:
Bug#40515: Query on a partitioned table does not return
'lock wait timeout exceeded'
Updated test case for covering the bug.
sql/ha_partition.cc:
Bug#40515: Query on a partitioned table does not return
'lock wait timeout exceeded'
Removing redeclaration of result variable,
which resulted in never returning the correct return value.
Diffstat (limited to 'mysql-test/suite/parts')
-rw-r--r-- | mysql-test/suite/parts/r/partition_special_innodb.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/parts/t/partition_special_innodb.test | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/suite/parts/r/partition_special_innodb.result b/mysql-test/suite/parts/r/partition_special_innodb.result index 5eab78de8c2..8869f6d450c 100644 --- a/mysql-test/suite/parts/r/partition_special_innodb.result +++ b/mysql-test/suite/parts/r/partition_special_innodb.result @@ -213,5 +213,10 @@ START TRANSACTION; INSERT INTO t1 VALUES (NULL, 'first row t2'); SET autocommit=OFF; ALTER TABLE t1 AUTO_INCREMENT = 10; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t1 VALUES (NULL, 'second row t2'); +SELECT a,b FROM t1 ORDER BY a; +a b +1 first row t2 +2 second row t2 DROP TABLE t1; diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test index b9fc8bdcd56..eac19f6d588 100644 --- a/mysql-test/suite/parts/t/partition_special_innodb.test +++ b/mysql-test/suite/parts/t/partition_special_innodb.test @@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2'); --connection con2 SET autocommit=OFF; +--error ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 AUTO_INCREMENT = 10; --connection con1 INSERT INTO t1 VALUES (NULL, 'second row t2'); +SELECT a,b FROM t1 ORDER BY a; --disconnect con2 --disconnect con1 --connection default |