mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
241ed6b81c
This commit is related to my previos one(ChangeSet 1.1583 03/08/27 18:03:39). Note about COMMIT&ROLLBACK: Only 'COMMIT' statement updates the binary log. 'ROLLBACK' statement doesn't update the binlog. mysql-test/r/drop.result: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE mysql-test/r/innodb.result: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE mysql-test/t/drop.test: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE mysql-test/t/innodb.test: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE sql/handler.cc: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE sql/sql_table.cc: Fix for bug #799 FLUSH TABLES WITH READ LOCK does not block CREATE TABLE
55 lines
1.3 KiB
Text
55 lines
1.3 KiB
Text
# Initialise
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
drop database if exists mysqltest;
|
|
--enable_warnings
|
|
|
|
--error 1051;
|
|
drop table t1;
|
|
create table t1(n int);
|
|
insert into t1 values(1);
|
|
create temporary table t1( n int);
|
|
insert into t1 values(2);
|
|
--error 1050;
|
|
create table t1(n int);
|
|
drop table t1;
|
|
select * from t1;
|
|
|
|
# now test for a bug in drop database - it is important that the name
|
|
# of the table is the same as the name of the database - in the original
|
|
# code this triggered a bug
|
|
create database mysqltest;
|
|
drop database if exists mysqltest;
|
|
create database mysqltest;
|
|
create table mysqltest.mysqltest (n int);
|
|
insert into mysqltest.mysqltest values (4);
|
|
select * from mysqltest.mysqltest;
|
|
drop database if exists mysqltest;
|
|
create database mysqltest;
|
|
drop database mysqltest;
|
|
|
|
# test drop/create database and FLUSH TABLES WITH READ LOCK
|
|
flush tables with read lock;
|
|
--error 1209,1223;
|
|
create database mysqltest;
|
|
unlock tables;
|
|
create database mysqltest;
|
|
show databases;
|
|
flush tables with read lock;
|
|
--error 1208,1223;
|
|
drop database mysqltest;
|
|
unlock tables;
|
|
drop database mysqltest;
|
|
show databases;
|
|
--error 1008
|
|
drop database mysqltest;
|
|
|
|
# test create table and FLUSH TABLES WITH READ LOCK
|
|
drop table t1;
|
|
flush tables with read lock;
|
|
--error 1223;
|
|
create table t1(n int);
|
|
unlock tables;
|
|
create table t1(n int);
|
|
show tables;
|
|
drop table t1;
|