mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug16986-main sql/sql_table.cc: Auto merged
This commit is contained in:
@ -67,6 +67,21 @@ Select_priv
|
||||
N
|
||||
use test;
|
||||
use test;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
CREATE TABLE t2 (c1 int);
|
||||
UNLOCK TABLES;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
ERROR HY000: Table 't2' was not locked with LOCK TABLES
|
||||
UNLOCK TABLES;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
||||
lock tables t1 write;
|
||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
||||
|
@ -142,6 +142,7 @@ disconnect con2;
|
||||
--error ER_DB_DROP_EXISTS
|
||||
DROP DATABASE mysqltest_1;
|
||||
|
||||
#
|
||||
# Bug#16986 - Deadlock condition with MyISAM tables
|
||||
#
|
||||
connection locker;
|
||||
@ -170,6 +171,55 @@ connection locker;
|
||||
use test;
|
||||
#
|
||||
connection default;
|
||||
#
|
||||
# Test if CREATE TABLE with LOCK TABLE deadlocks.
|
||||
#
|
||||
connection writer;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
#
|
||||
# This waits until t1 is unlocked.
|
||||
connection locker;
|
||||
send FLUSH TABLES WITH READ LOCK;
|
||||
--sleep 1
|
||||
#
|
||||
# This must not block.
|
||||
connection writer;
|
||||
CREATE TABLE t2 (c1 int);
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
# This awakes now.
|
||||
connection locker;
|
||||
reap;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
connection default;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Test if CREATE TABLE SELECT with LOCK TABLE deadlocks.
|
||||
#
|
||||
connection writer;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
#
|
||||
# This waits until t1 is unlocked.
|
||||
connection locker;
|
||||
send FLUSH TABLES WITH READ LOCK;
|
||||
--sleep 1
|
||||
#
|
||||
# This must not block.
|
||||
connection writer;
|
||||
--error 1100
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
# This awakes now.
|
||||
connection locker;
|
||||
reap;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #17264: MySQL Server freeze
|
||||
|
Reference in New Issue
Block a user