drop table if exists t1,t2; # # Test discovery of s3 # create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10; alter table t1 engine=s3; # # Check discovery by select # flush tables; select * from t1 limit 1; a b 1 11 # # Check if changes to .frm is copied to S3 # alter table t1 change column b c int not null; flush tables; select * from t1 limit 1; a c 1 11 # # Check if SHOW TABLES finds the S3 tables # create table t2 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10; alter table t2 engine=s3; flush tables; SHOW TABLES; Tables_in_database t1 t2 drop table t2; # # Check if DROP TABLE works with discovery # select count(*) from t1; count(*) 10 flush tables; drop table t1; select count(*), sum(a) from t1; ERROR 42S02: Table 'database.t1' doesn't exist # # Check if S3 detects that the .frm is too old # create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10; alter table t1 engine=s3; alter table t1 add column c int, engine=s3; flush tables; select * from t1 limit 1; a b c 1 11 NULL flush tables; select * from t1 limit 1; a b c 1 11 NULL drop table t1;