| 1 |
create table t1 (a int) engine=archive; |
| 2 |
show create table t1; |
| 3 |
Table Create Table |
| 4 |
t1 CREATE TABLE `t1` ( |
| 5 |
`a` int(11) DEFAULT NULL |
| 6 |
) ENGINE=ARCHIVE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
| 7 |
insert t1 values (1); |
| 8 |
show tables; |
| 9 |
Tables_in_test |
| 10 |
t1 |
| 11 |
# |
| 12 |
# simple discover on use |
| 13 |
# |
| 14 |
flush tables; |
| 15 |
insert t1 values (2); |
| 16 |
select * from t1; |
| 17 |
a |
| 18 |
1 |
| 19 |
2 |
| 20 |
db.opt |
| 21 |
t1.ARZ |
| 22 |
t1.frm |
| 23 |
# |
| 24 |
# show tables |
| 25 |
# |
| 26 |
create table t2 (a int) engine=archive; |
| 27 |
select * from t2; |
| 28 |
a |
| 29 |
flush tables; |
| 30 |
show tables; |
| 31 |
Tables_in_test |
| 32 |
t1 |
| 33 |
t2 |
| 34 |
db.opt |
| 35 |
t1.ARZ |
| 36 |
t2.ARZ |
| 37 |
t2.frm |
| 38 |
# |
| 39 |
# show full tables |
| 40 |
# |
| 41 |
flush tables; |
| 42 |
show full tables; |
| 43 |
Tables_in_test Table_type |
| 44 |
t1 BASE TABLE |
| 45 |
t2 BASE TABLE |
| 46 |
db.opt |
| 47 |
t1.ARZ |
| 48 |
t2.ARZ |
| 49 |
t2.frm |
| 50 |
# |
| 51 |
# discover on truncate |
| 52 |
# |
| 53 |
flush tables; |
| 54 |
truncate table t1; |
| 55 |
ERROR HY000: Storage engine ARCHIVE of the table `test`.`t1` doesn't have this option |
| 56 |
db.opt |
| 57 |
t1.ARZ |
| 58 |
t1.frm |
| 59 |
t2.ARZ |
| 60 |
t2.frm |
| 61 |
# |
| 62 |
# discover on rename |
| 63 |
# |
| 64 |
flush tables; |
| 65 |
rename table t2 to t0; |
| 66 |
db.opt |
| 67 |
t0.ARZ |
| 68 |
t0.frm |
| 69 |
t1.ARZ |
| 70 |
t1.frm |
| 71 |
# |
| 72 |
# discover on HA_ERR_TABLE_DEF_CHANGED |
| 73 |
# |
| 74 |
alter table t1 modify a int default 5; |
| 75 |
show create table t1; |
| 76 |
Table Create Table |
| 77 |
t1 CREATE TABLE `t1` ( |
| 78 |
`a` int(11) DEFAULT NULL |
| 79 |
) ENGINE=ARCHIVE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
| 80 |
# |
| 81 |
# discover on drop |
| 82 |
# |
| 83 |
flush tables; |
| 84 |
drop table t1; |
| 85 |
db.opt |
| 86 |
t0.ARZ |
| 87 |
t0.frm |
| 88 |
# |
| 89 |
# discover of table non-existence on drop |
| 90 |
# |
| 91 |
select * from t0; |
| 92 |
a |
| 93 |
flush tables; |
| 94 |
drop table t0; |
| 95 |
db.opt |
| 96 |
show status like 'Handler_discover'; |
| 97 |
Variable_name Value |
| 98 |
Handler_discover 7 |
| 99 |
# |
| 100 |
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE |
| 101 |
# |
| 102 |
create table t1 (a int) engine=archive; |
| 103 |
show create table t1; |
| 104 |
Table Create Table |
| 105 |
t1 CREATE TABLE `t1` ( |
| 106 |
`a` int(11) DEFAULT NULL |
| 107 |
) ENGINE=ARCHIVE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
| 108 |
insert into t1 values (1); |
| 109 |
optimize table t1; |
| 110 |
Table Op Msg_type Msg_text |
| 111 |
test.t1 optimize status OK |
| 112 |
flush tables; |
| 113 |
insert into t1 values (2); |
| 114 |
select * from t1 order by a; |
| 115 |
a |
| 116 |
1 |
| 117 |
2 |
| 118 |
show create table t1; |
| 119 |
Table Create Table |
| 120 |
t1 CREATE TABLE `t1` ( |
| 121 |
`a` int(11) DEFAULT NULL |
| 122 |
) ENGINE=ARCHIVE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
| 123 |
drop table t1; |
| 124 |
# |
| 125 |
# BUG#58205 - Valgrind failure in fn_format when called from |
| 126 |
# archive_discover |
| 127 |
# |
| 128 |
create table `a/../`(a int) engine=archive; |
| 129 |
select * from `a/../`; |
| 130 |
a |
| 131 |
flush tables; |
| 132 |
drop table `a/../`; |
| 133 |
create database test1; |
| 134 |
create table test1.t1 (i int) engine=archive; |
| 135 |
drop database test1; |
| 136 |
create table t1 (a int) engine=archive; |
| 137 |
select * from t1; |
| 138 |
a |
| 139 |
flush tables; |
| 140 |
select * from t1; |
| 141 |
ERROR 42S02: Table 'test.t1' doesn't exist |
| 142 |
db.opt |
| 143 |
create table t1 (a int) engine=archive; |
| 144 |
select * from t1; |
| 145 |
a |
| 146 |
flush tables; |
| 147 |
create table t1 (a int) engine=archive; |
| 148 |
flush tables; |
| 149 |
create table t1 (a int) engine=archive; |
| 150 |
ERROR 42S01: Table 't1' already exists |
| 151 |
drop table t1; |
| 152 |
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; |
| 153 |
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; |
| 154 |
DROP TABLE t1; |
| 155 |
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; |
| 156 |
SELECT * FROM t1; |
| 157 |
pk |
| 158 |
DROP TABLE t1; |