2001-03-27 10:23:04 -07:00
|
|
|
drop table if exists t1;
|
|
|
|
--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-21 16:48:18 -06:00
|
|
|
|
2001-12-22 15:13:31 +02: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
|
|
|
|
drop database if exists mysqltest;
|
|
|
|
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;
|
2001-06-21 16:48:18 -06:00
|
|
|
|
|
|
|
# test drop/create database and FLUSH TABLES WITH READ LOCK
|
2001-06-21 15:59:51 -06:00
|
|
|
flush tables with read lock;
|
2001-11-04 15:43:41 +02:00
|
|
|
--error 1209,1223;
|
2001-12-22 15:13:31 +02:00
|
|
|
create database mysqltest;
|
2001-06-21 15:59:51 -06:00
|
|
|
unlock tables;
|
2001-12-22 15:13:31 +02:00
|
|
|
create database mysqltest;
|
2001-06-21 15:59:51 -06:00
|
|
|
show databases;
|
|
|
|
flush tables with read lock;
|
2001-11-04 15:43:41 +02:00
|
|
|
--error 1208,1223;
|
2001-12-22 15:13:31 +02:00
|
|
|
drop database mysqltest;
|
2001-06-21 15:59:51 -06:00
|
|
|
unlock tables;
|
2001-12-22 15:13:31 +02:00
|
|
|
drop database mysqltest;
|
2001-06-21 15:59:51 -06:00
|
|
|
show databases;
|
2001-09-03 05:16:15 +03:00
|
|
|
--error 1008
|
2001-12-22 15:13:31 +02:00
|
|
|
drop database mysqltest;
|