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 / backup.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  1.1 KB  |  49 lines  |  [TEXT/ttxt]

  1. connect (con1,localhost,root,,);
  2. connect (con2,localhost,root,,);
  3. connection con1;
  4. set SQL_LOG_BIN=0;
  5. drop table if exists t1;
  6. create table t1(n int);
  7. --replace_result "errno = 2" "errno = X" "errno = 22" "errno = X" "errno = 23" "errno = X"
  8. backup table t1 to '../bogus';
  9. backup table t1 to '../tmp';
  10. drop table t1;
  11. restore table t1 from '../tmp';
  12. select count(*) from t1;
  13. insert into t1 values (23),(45),(67);
  14. backup table t1 to '../tmp';
  15. drop table t1;
  16. restore table t1 from '../bogus';
  17. restore table t1 from '../tmp';
  18. select n from t1;
  19. create table t2(m int not null primary key);
  20. create table t3(k int not null primary key);
  21. insert into t2 values (123),(145),(167);
  22. insert into t3 values (223),(245),(267);
  23. backup table t1,t2,t3 to '../tmp';
  24. drop table t1,t2,t3;
  25. restore table t1,t2,t3 from '../tmp';
  26. select n from t1;
  27. select m from t2;
  28. select k from t3;
  29. drop table t1,t2,t3;
  30. restore table t1 from '../tmp';
  31. connection con2;
  32. --send
  33. lock tables t1 write;
  34. connection con1;
  35. --send
  36. backup table t1 to '../tmp';
  37. connection con2;
  38. reap;
  39. unlock tables;
  40. connection con1;
  41. reap;
  42. drop table t1;
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.