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.

26 lines
805 B

  1. drop table if exists t1;
  2. SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
  3. CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
  4. INSERT INTO t1 VALUES (null);
  5. SHOW CREATE TABLE t1;
  6. Table Create Table
  7. t1 CREATE TABLE `t1` (
  8. `c1` int(11) NOT NULL AUTO_INCREMENT,
  9. PRIMARY KEY (`c1`)
  10. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
  11. DELETE FROM t1;
  12. OPTIMIZE TABLE t1;
  13. Table Op Msg_type Msg_text
  14. test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
  15. test.t1 optimize status OK
  16. SHOW CREATE TABLE t1;
  17. Table Create Table
  18. t1 CREATE TABLE `t1` (
  19. `c1` int(11) NOT NULL AUTO_INCREMENT,
  20. PRIMARY KEY (`c1`)
  21. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
  22. INSERT INTO t1 VALUES(null);
  23. SELECT * FROM t1;
  24. c1
  25. 2
  26. DROP TABLE t1;