mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
--source include/have_s3.inc
|
|
--source include/have_sequence.inc
|
|
|
|
#
|
|
# Create unique database for running the tests
|
|
#
|
|
--source create_database.inc
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
--echo #
|
|
--echo # Test simple create of s3 table
|
|
--echo #
|
|
|
|
create or replace table t1 (a int, b int, key (a)) engine=aria;
|
|
insert into t1 select seq,seq+10 from seq_1_to_10000;
|
|
alter table t1 engine=s3;
|
|
show create table t1;
|
|
|
|
--replace_column 2 # 11 # 15 # 16 # 17 # 23 #
|
|
--replace_result $database database
|
|
--eval select * from information_schema.tables where table_schema="$database" and table_name="t1";
|
|
--replace_column 8 # 12 # 13 # 14 # 19 #
|
|
show table status like "t1";
|
|
select * from t1 limit 10;
|
|
select count(*) from t1;
|
|
select * from t1 where a between 10 and 20;
|
|
--replace_column 9 #
|
|
explain select * from t1 where a between 10 and 20;
|
|
--error ER_OPEN_AS_READONLY
|
|
insert into t1 values (1,1);
|
|
--error ER_OPEN_AS_READONLY
|
|
update t1 set b=100 where a=1;
|
|
--error ER_OPEN_AS_READONLY
|
|
delete from t1 where a>10;
|
|
alter table t1 engine=aria;
|
|
show create table t1;
|
|
select * from t1 limit 10;
|
|
select count(*) from t1;
|
|
delete from t1 where a=1;
|
|
drop table t1;
|
|
|
|
--echo #
|
|
--echo # status
|
|
--echo #
|
|
|
|
--replace_column 2 X
|
|
show variables like "s3%";
|
|
show variables like "s3_slave%";
|
|
show variables like "s3_replicate%";
|
|
|
|
--replace_column 2 X
|
|
show status like "s3%";
|
|
|
|
#
|
|
# clean up
|
|
#
|
|
--source drop_database.inc
|