Commit 769cd00e authored by davi@moksha.local's avatar davi@moksha.local

Merge moksha.local:/Users/davi/mysql/push/bugs/25164-5.0

into  moksha.local:/Users/davi/mysql/push/bugs/25164-5.1
parents 1013eb57 91e1cc21
......@@ -144,4 +144,29 @@ disconnect con1;
disconnect con2;
drop table t1, t2;
# End of 4.1 tests
--echo End of 4.1 tests
#
# Bug#25164 create table `a` as select * from `A` hangs
#
set storage_engine=innodb;
--disable_warnings
drop table if exists a;
drop table if exists A;
--enable_warnings
create table A (c int);
insert into A (c) values (0);
--error 0,ER_LOCK_DEADLOCK,ER_UPDATE_TABLE_USED
create table a as select * from A;
drop table A;
--disable_warnings
drop table if exists a;
--enable_warnings
set storage_engine=default;
--echo End of 5.0 tests.
......@@ -112,3 +112,14 @@ id x
commit;
# Switch to connection default + disconnect con1 and con2
drop table t1, t2;
End of 4.1 tests
set storage_engine=innodb;
drop table if exists a;
drop table if exists A;
create table A (c int);
insert into A (c) values (0);
create table a as select * from A;
drop table A;
drop table if exists a;
set storage_engine=default;
End of 5.0 tests.
......@@ -276,6 +276,8 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count,
thd->lock_id)];
if (rc > 1) /* a timeout or a deadlock */
{
if (sql_lock->table_count)
VOID(unlock_external(thd, sql_lock->table, sql_lock->table_count));
my_error(rc, MYF(0));
my_free((uchar*) sql_lock,MYF(0));
sql_lock= 0;
......
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