diff options
Diffstat (limited to 'mysql-test/suite/s3')
-rw-r--r-- | mysql-test/suite/s3/amazon.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/s3/amazon.test | 18 | ||||
-rw-r--r-- | mysql-test/suite/s3/debug.result | 32 | ||||
-rw-r--r-- | mysql-test/suite/s3/debug.test | 34 |
4 files changed, 93 insertions, 1 deletions
diff --git a/mysql-test/suite/s3/amazon.result b/mysql-test/suite/s3/amazon.result index 29075118..b24969ab 100644 --- a/mysql-test/suite/s3/amazon.result +++ b/mysql-test/suite/s3/amazon.result @@ -4,4 +4,14 @@ create table t1 (pk int primary key, a int); insert into t1 values (1,1),(2,2),(3,3),(4,4); alter table t1 engine=S3; drop table t1; +set @@global.s3_protocol_version="Amazon"; +create table t1 (pk int primary key, a int); +insert into t1 values (1,1),(2,2),(3,3),(4,4); +alter table t1 engine=S3; +drop table t1; +set @@global.s3_protocol_version="Domain"; +create table t1 (pk int primary key, a int); +insert into t1 values (1,1),(2,2),(3,3),(4,4); +alter table t1 engine=S3; +drop table t1; set @@global.s3_protocol_version=@save_s3_protocol_version; diff --git a/mysql-test/suite/s3/amazon.test b/mysql-test/suite/s3/amazon.test index 3c64cc28..bc9439ab 100644 --- a/mysql-test/suite/s3/amazon.test +++ b/mysql-test/suite/s3/amazon.test @@ -1,6 +1,6 @@ --source include/have_s3.inc -if (`SELECT @@s3_host_name <> "s3.amazonaws.com"`) +if (`SELECT @@s3_host_name NOT LIKE "%.amazonaws.com"`) { skip Not connected to AWS; } @@ -20,6 +20,22 @@ insert into t1 values (1,1),(2,2),(3,3),(4,4); alter table t1 engine=S3; drop table t1; +set @@global.s3_protocol_version="Amazon"; + +create table t1 (pk int primary key, a int); +insert into t1 values (1,1),(2,2),(3,3),(4,4); +--replace_result $database database +alter table t1 engine=S3; +drop table t1; + +set @@global.s3_protocol_version="Domain"; + +create table t1 (pk int primary key, a int); +insert into t1 values (1,1),(2,2),(3,3),(4,4); +--replace_result $database database +alter table t1 engine=S3; +drop table t1; + # # clean up # diff --git a/mysql-test/suite/s3/debug.result b/mysql-test/suite/s3/debug.result new file mode 100644 index 00000000..2dffcff8 --- /dev/null +++ b/mysql-test/suite/s3/debug.result @@ -0,0 +1,32 @@ +drop table if exists t1; +# +# MDEV-32884 Make s3_debug dynamic +# +create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria; +insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_100; +alter table t1 engine=s3; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` varchar(1000) DEFAULT NULL, + KEY `a` (`a`), + KEY `c` (`c`) +) ENGINE=S3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 +select count(*) from t1; +count(*) +100 +flush table t1; +NOT FOUND /s3_test_/ in mysqld.1.err +set @@global.s3_debug=1; +select count(*) from t1; +count(*) +100 +set @@global.s3_debug=0; +FOUND 6 /s3_test_/ in mysqld.1.err +select count(*) from t1; +count(*) +100 +drop table t1; +FOUND 6 /s3_test_/ in mysqld.1.err diff --git a/mysql-test/suite/s3/debug.test b/mysql-test/suite/s3/debug.test new file mode 100644 index 00000000..67787d72 --- /dev/null +++ b/mysql-test/suite/s3/debug.test @@ -0,0 +1,34 @@ +--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 # MDEV-32884 Make s3_debug dynamic +--echo # + +create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria; +insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_100; +alter table t1 engine=s3; +show create table t1; +select count(*) from t1; +flush table t1; + +--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_PATTERN=s3_test_ +--source include/search_pattern_in_file.inc +set @@global.s3_debug=1; +select count(*) from t1; +set @@global.s3_debug=0; +--source include/search_pattern_in_file.inc +select count(*) from t1; +drop table t1; +--source include/search_pattern_in_file.inc + +--source drop_database.inc |