mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
ab38b7511b
A read-only storage engine that stores it's data in (aws) S3 To store data in S3 one could use ALTER TABLE: ALTER TABLE table_name ENGINE=S3 libmarias3 integration done by Sergei Golubchik libmarias3 created by Andrew Hutchings
57 lines
1.1 KiB
Text
57 lines
1.1 KiB
Text
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;
|