home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / drop.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  1002 b   |  44 lines  |  [TEXT/ttxt]

  1. drop table if exists t1;
  2. drop table if exists t1;
  3. --error 1051;
  4. drop table t1;
  5. create table t1(n int);
  6. insert into t1 values(1);
  7. create temporary table t1( n int);
  8. insert into t1 values(2);
  9. --error 1050;
  10. create table t1(n int);
  11. drop table t1;
  12. select * from t1;
  13.  
  14. #now test for a bug in drop database - it is important that the name
  15. #of the table is the same as the name of the database - in the original
  16. #code this triggered a bug
  17. drop database if exists foo;
  18. create database foo;
  19. drop database if exists foo;
  20. create database foo;
  21. create table foo.foo (n int);
  22. insert into foo.foo values (4);
  23. select * from foo.foo;
  24. drop database if exists foo;
  25. create database foo;
  26. drop database foo;
  27.  
  28. # test drop/create database and FLUSH TABLES WITH READ LOCK
  29. drop database if exists foo;
  30. flush tables with read lock;
  31. --error 1209
  32. create database foo;
  33. unlock tables;
  34. create database foo;
  35. show databases;
  36. flush tables with read lock;
  37. --error 1208
  38. drop database foo;
  39. unlock tables;
  40. drop database foo;
  41. show databases;
  42.  
  43.  
  44.