| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 3 |
TRUNCATE TABLE t1; |
| 4 |
INSERT INTO t1 (a,b) VALUES (1,'a'), (2,'b'), (3,'c'); |
| 5 |
TRUNCATE TABLE t1; |
| 6 |
SELECT a,b FROM t1; |
| 7 |
a b |
| 8 |
DROP TABLE t1; |
| 9 |
CREATE TABLE t1 (a <INT_COLUMN> KEY AUTO_INCREMENT, c <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 10 |
SHOW TABLE STATUS LIKE 't1'; |
| 11 |
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary |
| 12 |
t1 # # # # # # # # # 1 # # # # # # # # N |
| 13 |
INSERT INTO t1 (c) VALUES ('a'),('b'),('c'); |
| 14 |
SHOW TABLE STATUS LIKE 't1'; |
| 15 |
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary |
| 16 |
t1 # # # # # # # # # 4 # # # # # # # # N |
| 17 |
TRUNCATE TABLE t1; |
| 18 |
SHOW TABLE STATUS LIKE 't1'; |
| 19 |
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary |
| 20 |
t1 # # # # # # # # # 1 # # # # # # # # N |
| 21 |
INSERT INTO t1 (c) VALUES ('d'); |
| 22 |
SHOW TABLE STATUS LIKE 't1'; |
| 23 |
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary |
| 24 |
t1 # # # # # # # # # 2 # # # # # # # # N |
| 25 |
SELECT a,c FROM t1; |
| 26 |
a c |
| 27 |
1 d |
| 28 |
DROP TABLE t1; |
| 29 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; |
| 30 |
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); |
| 31 |
HANDLER t1 OPEN AS h1; |
| 32 |
HANDLER h1 READ FIRST; |
| 33 |
a b |
| 34 |
1 a |
| 35 |
TRUNCATE TABLE t1; |
| 36 |
HANDLER h1 READ NEXT; |
| 37 |
ERROR 42S02: Unknown table 'h1' in HANDLER |
| 38 |
HANDLER t1 OPEN AS h2; |
| 39 |
HANDLER h2 READ FIRST; |
| 40 |
a b |
| 41 |
DROP TABLE t1; |