#At file:///Users/mattiasj/clones/bzrroot/b40515-51-bugteam/
2727 Mattias Jonsson 2008-12-04
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.
modified:
mysql-test/suite/parts/r/partition_special_innodb.result
mysql-test/suite/parts/t/partition_special_innodb.test
sql/ha_partition.cc
per-file messages:
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.
=== modified file 'mysql-test/suite/parts/r/partition_special_innodb.result'
--- a/mysql-test/suite/parts/r/partition_special_innodb.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/parts/r/partition_special_innodb.result 2008-12-04 09:47:25 +0000
@@ -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;
=== modified file 'mysql-test/suite/parts/t/partition_special_innodb.test'
--- a/mysql-test/suite/parts/t/partition_special_innodb.test 2008-08-20 15:29:14 +0000
+++ b/mysql-test/suite/parts/t/partition_special_innodb.test 2008-12-04 09:47:25 +0000
@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row
--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
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc 2008-11-24 16:24:03 +0000
+++ b/sql/ha_partition.cc 2008-12-04 09:47:25 +0000
@@ -3431,7 +3431,7 @@ int ha_partition::rnd_next(uchar *buf)
while (TRUE)
{
- int result= file->rnd_next(buf);
+ result= file->rnd_next(buf);
if (!result)
{
m_last_part= part_id;
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (mattias.jonsson:2727)Bug#40515 | Mattias Jonsson | 4 Dec |