| 1 |
CREATE TABLE t1 ( i INT ) ENGINE=Aria PARTITION BY HASH(i) PARTITIONS 2; |
| 2 |
SET AUTOCOMMIT = 0; |
| 3 |
TRUNCATE TABLE t1; |
| 4 |
DROP TABLE t1; |
| 5 |
CREATE TABLE t1 ( i INT ) ENGINE=Aria; |
| 6 |
CREATE TABLE t2 ( i INT ) ENGINE=Aria; |
| 7 |
insert into t1 values(1); |
| 8 |
lock table t1 write; |
| 9 |
truncate table t1; |
| 10 |
select count(*) from t1; |
| 11 |
count(*) |
| 12 |
0 |
| 13 |
insert into t1 values(2); |
| 14 |
select count(*) from t1; |
| 15 |
count(*) |
| 16 |
1 |
| 17 |
truncate table t1; |
| 18 |
select count(*) from t1; |
| 19 |
count(*) |
| 20 |
0 |
| 21 |
insert into t1 values(3); |
| 22 |
select count(*) from t1; |
| 23 |
count(*) |
| 24 |
1 |
| 25 |
select * from t2; |
| 26 |
ERROR HY000: Table 't2' was not locked with LOCK TABLES |
| 27 |
unlock tables; |
| 28 |
insert into t1 values(4); |
| 29 |
select * from t1; |
| 30 |
i |
| 31 |
3 |
| 32 |
4 |
| 33 |
truncate t1; |
| 34 |
select count(*) from t1; |
| 35 |
count(*) |
| 36 |
0 |
| 37 |
drop table t1,t2; |
| 38 |
CREATE TEMPORARY TABLE t1 ( i int) ENGINE=aria; |
| 39 |
SHOW CREATE TABLE t1; |
| 40 |
Table Create Table |
| 41 |
t1 CREATE TEMPORARY TABLE `t1` ( |
| 42 |
`i` int(11) DEFAULT NULL |
| 43 |
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=0 |
| 44 |
TRUNCATE TABLE t1; |
| 45 |
INSERT INTO t1 (i) VALUES (1); |
| 46 |
lock table t1 write; |
| 47 |
truncate table t1; |
| 48 |
unlock tables; |
| 49 |
drop table t1; |