Commit ba506ca6 authored by Georgi Kodinov's avatar Georgi Kodinov

merged 41453 to 5.1-bugteam

parents a13eda38 53ba196e
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;
--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1
-- 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););
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment