Debian Codegraph @

mysql-test/suite/s3/discovery.result

raw
1 drop table if exists t1,t2;
2 #
3 # Test discovery of s3
4 #
5 create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
6 alter table t1 engine=s3;
7 #
8 # Check discovery by select
9 #
10 flush tables;
11 select * from t1 limit 1;
12 a b
13 1 11
14 #
15 # Check if changes to .frm is copied to S3
16 #
17 alter table t1 change column b c int not null;
18 flush tables;
19 select * from t1 limit 1;
20 a c
21 1 11
22 #
23 # Check if SHOW TABLES finds the S3 tables
24 #
25 create table t2 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
26 alter table t2 engine=s3;
27 flush tables;
28 SHOW TABLES;
29 Tables_in_database
30 t1
31 t2
32 drop table t2;
33 #
34 # Check if DROP TABLE works with discovery
35 #
36 select count(*) from t1;
37 count(*)
38 10
39 flush tables;
40 drop table t1;
41 select count(*), sum(a) from t1;
42 ERROR 42S02: Table 'database.t1' doesn't exist
43 #
44 # Check if S3 detects that the .frm is too old
45 #
46 create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
47 alter table t1 engine=s3;
48 alter table t1 add column c int, engine=s3;
49 flush tables;
50 select * from t1 limit 1;
51 a b c
52 1 11 NULL
53 flush tables;
54 select * from t1 limit 1;
55 a b c
56 1 11 NULL
57 drop table t1;