You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
930 B

  1. connection slave;
  2. STOP SLAVE;
  3. source include/wait_for_slave_to_stop.inc;
  4. connection master;
  5. --disable_warnings
  6. DROP TABLE IF EXISTS t1;
  7. --enable_warnings
  8. connection slave;
  9. --disable_warnings
  10. DROP TABLE IF EXISTS t1;
  11. --enable_warnings
  12. RESET SLAVE;
  13. START SLAVE;
  14. --echo **** On Master ****
  15. connection master;
  16. eval SET SESSION BINLOG_FORMAT=$format;
  17. eval SET GLOBAL BINLOG_FORMAT=$format;
  18. eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
  19. INSERT INTO t1 VALUES (1,1), (2,2);
  20. SELECT * FROM t1;
  21. --echo **** On Slave ****
  22. sync_slave_with_master;
  23. INSERT INTO t1 VALUE (3,3);
  24. SELECT * FROM t1;
  25. --echo **** On Master ****
  26. connection master;
  27. eval $stmt t1;
  28. SELECT * FROM t1;
  29. --echo **** On Slave ****
  30. sync_slave_with_master;
  31. # Should be empty
  32. SELECT * FROM t1;
  33. --echo **** On Master ****
  34. connection master;
  35. DROP TABLE t1;
  36. let $SERVER_VERSION=`select version()`;
  37. source include/show_binlog_events.inc;
  38. connection master;
  39. RESET MASTER;