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.

25 lines
651 B

  1. stop slave;
  2. drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
  3. reset master;
  4. reset slave;
  5. drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
  6. start slave;
  7. SHOW VARIABLES LIKE 'relay_log_space_limit';
  8. Variable_name Value
  9. relay_log_space_limit 0
  10. CREATE TABLE t1 (name varchar(64), age smallint(3));
  11. INSERT INTO t1 SET name='Andy', age=31;
  12. INSERT t1 SET name='Jacob', age=2;
  13. INSERT into t1 SET name='Caleb', age=1;
  14. ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
  15. select * from t1;
  16. name age id
  17. Andy 31 00000001
  18. Jacob 2 00000002
  19. Caleb 1 00000003
  20. select * from t1;
  21. name age id
  22. Andy 31 00000001
  23. Jacob 2 00000002
  24. Caleb 1 00000003
  25. drop table t1;