mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge moksha.local:/Users/davi/mysql/push/bugs/25164-5.0
into moksha.local:/Users/davi/mysql/push/bugs/25164-5.1 sql/lock.cc: Auto merged mysql-test/include/deadlock.inc: Auto merged mysql-test/r/deadlock_innodb.result: Auto merged
This commit is contained in:
commit
e7d7a2382f
3 changed files with 39 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue