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 / rpl000013.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  870 b   |  39 lines  |  [TEXT/ttxt]

  1. source include/master-slave.inc;
  2. connection master;
  3. save_master_pos;
  4. connection slave;
  5. sync_with_master;
  6. connection master;
  7. drop table if exists t2;
  8. create table t2(n int);
  9. create temporary table t1 (n int);
  10. insert into t1 values(1),(2),(3);
  11. insert into t2 select * from t1;
  12. connection master1;
  13. create temporary table t1 (n int);
  14. insert into t1 values (4),(5);
  15. insert into t2 select * from t1 as t10;
  16. save_master_pos;
  17. disconnect master;
  18. connection slave;
  19. #add 1 to catch drop table
  20. sync_with_master 1;
  21. connection master1;
  22. insert into t2 values(6);
  23. save_master_pos;
  24. disconnect master1;
  25. connection slave;
  26. # same trick to go one more event
  27. sync_with_master 1;
  28. select * from t2;
  29. show status like 'Slave_open_temp_tables';
  30. #
  31. # Clean up
  32. #
  33. connect (master2,localhost,root,,);
  34. connection master2;
  35. drop table if exists t1,t2;
  36. save_master_pos;
  37. connection slave;
  38. sync_with_master;
  39.