mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
merged 41453 to 5.1-bugteam
This commit is contained in:
commit
e0df7f1cd5
4 changed files with 57 additions and 3 deletions
21
mysql-test/r/innodb_mysql_rbk.result
Normal file
21
mysql-test/r/innodb_mysql_rbk.result
Normal file
|
@ -0,0 +1,21 @@
|
|||
CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
|
||||
DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
a b
|
||||
3 3
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
ROLLBACK;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
a b
|
||||
3 3
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SELECT * FROM t1 WHERE b = 10;
|
||||
a b
|
||||
DROP TABLE t1;
|
1
mysql-test/t/innodb_mysql_rbk-master.opt
Normal file
1
mysql-test/t/innodb_mysql_rbk-master.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1
|
35
mysql-test/t/innodb_mysql_rbk.test
Normal file
35
mysql-test/t/innodb_mysql_rbk.test
Normal file
|
@ -0,0 +1,35 @@
|
|||
-- source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
|
||||
# Diagnostics_area::sql_errno
|
||||
#
|
||||
|
||||
CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
|
||||
DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
|
||||
CONNECT (con1,localhost,root,,);
|
||||
CONNECT (con2,localhost,root,,);
|
||||
|
||||
CONNECTION con1;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
CONNECTION con2;
|
||||
START TRANSACTION;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
|
||||
ROLLBACK;
|
||||
|
||||
CONNECTION con1;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
|
||||
CONNECTION con2;
|
||||
START TRANSACTION;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
|
||||
SELECT * FROM t1 WHERE b = 10;
|
||||
|
||||
CONNECTION default;
|
||||
DISCONNECT con1;
|
||||
DISCONNECT con2;
|
||||
DROP TABLE t1;
|
|
@ -562,10 +562,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
|
|||
if (quick_select)
|
||||
{
|
||||
if ((error= select->quick->get_next()))
|
||||
{
|
||||
error= HA_ERR_END_OF_FILE;
|
||||
break;
|
||||
}
|
||||
file->position(sort_form->record[0]);
|
||||
DBUG_EXECUTE_IF("debug_filesort", dbug_print_record(sort_form, TRUE););
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue