2003-01-06 00:48:59 +01:00
|
|
|
# Initialise
|
|
|
|
--disable_warnings
|
2001-03-27 19:23:04 +02:00
|
|
|
drop table if exists t1;
|
2003-08-18 23:08:08 +02:00
|
|
|
drop database if exists mysqltest;
|
2003-01-06 00:48:59 +01:00
|
|
|
--enable_warnings
|
|
|
|
|
2001-03-27 19:23:04 +02:00
|
|
|
--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;
|
2001-06-22 00:48:18 +02:00
|
|
|
|
2001-12-22 14:13:31 +01:00
|
|
|
# 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;
|
2004-03-18 11:03:24 +01:00
|
|
|
--enable_info
|
2001-12-22 14:13:31 +01:00
|
|
|
drop database if exists mysqltest;
|
2004-03-18 11:03:24 +01:00
|
|
|
--disable_info
|
2001-12-22 14:13:31 +01:00
|
|
|
create database mysqltest;
|
|
|
|
drop database mysqltest;
|
2001-06-22 00:48:18 +02:00
|
|
|
|
|
|
|
# test drop/create database and FLUSH TABLES WITH READ LOCK
|
2001-06-21 23:59:51 +02:00
|
|
|
flush tables with read lock;
|
2001-11-04 14:43:41 +01:00
|
|
|
--error 1209,1223;
|
2001-12-22 14:13:31 +01:00
|
|
|
create database mysqltest;
|
2001-06-21 23:59:51 +02:00
|
|
|
unlock tables;
|
2001-12-22 14:13:31 +01:00
|
|
|
create database mysqltest;
|
2001-06-21 23:59:51 +02:00
|
|
|
show databases;
|
|
|
|
flush tables with read lock;
|
2001-11-04 14:43:41 +01:00
|
|
|
--error 1208,1223;
|
2001-12-22 14:13:31 +01:00
|
|
|
drop database mysqltest;
|
2001-06-21 23:59:51 +02:00
|
|
|
unlock tables;
|
2001-12-22 14:13:31 +01:00
|
|
|
drop database mysqltest;
|
2001-06-21 23:59:51 +02:00
|
|
|
show databases;
|
2001-09-03 04:16:15 +02:00
|
|
|
--error 1008
|
2001-12-22 14:13:31 +01:00
|
|
|
drop database mysqltest;
|
2003-08-27 15:03:39 +02:00
|
|
|
|
|
|
|
# test create table and FLUSH TABLES WITH READ LOCK
|
|
|
|
drop table t1;
|
|
|
|
flush tables with read lock;
|
2003-08-28 15:09:00 +02:00
|
|
|
--error 1223;
|
2003-08-27 15:03:39 +02:00
|
|
|
create table t1(n int);
|
|
|
|
unlock tables;
|
|
|
|
create table t1(n int);
|
|
|
|
show tables;
|
|
|
|
drop table t1;
|