diff options
author | Monty <monty@mariadb.org> | 2019-06-24 12:13:19 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-06-24 12:13:19 +0300 |
commit | 6aebaafe032e0bda24d5e800b24926813847843a (patch) | |
tree | 8d4592e5b361c3507d32a8df6c0991d84ddff26a /mysql-test/suite/s3 | |
parent | c62eaa7bdf492501c7d7155f8e69d37437f71876 (diff) | |
download | mariadb-git-6aebaafe032e0bda24d5e800b24926813847843a.tar.gz |
Added S3 test case with InnoDB
Diffstat (limited to 'mysql-test/suite/s3')
-rw-r--r-- | mysql-test/suite/s3/innodb.result | 31 | ||||
-rw-r--r-- | mysql-test/suite/s3/innodb.test | 35 |
2 files changed, 66 insertions, 0 deletions
diff --git a/mysql-test/suite/s3/innodb.result b/mysql-test/suite/s3/innodb.result new file mode 100644 index 00000000000..eaa9cf93c86 --- /dev/null +++ b/mysql-test/suite/s3/innodb.result @@ -0,0 +1,31 @@ +drop table if exists t1,t2,t3; +# +# Test ALTER TABLE to and from s3 +# +create table t1 (a int, b int) engine=innodb; +insert into t1 select seq,seq+10 from seq_1_to_1000; +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 +) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +alter table t1 comment="hello"; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello' +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello' +select count(*), sum(a), sum(b) from t1; +count(*) sum(a) sum(b) +1000 500500 510500 +drop table t1; diff --git a/mysql-test/suite/s3/innodb.test b/mysql-test/suite/s3/innodb.test new file mode 100644 index 00000000000..e2687064bdb --- /dev/null +++ b/mysql-test/suite/s3/innodb.test @@ -0,0 +1,35 @@ +--source include/have_s3.inc +--source include/have_sequence.inc +--source include/have_innodb.inc + +# +# Testing converting InnoDB tables to S3 +# + +# +# Create unique database for running the tests +# +--source create_database.inc +--disable_warnings +drop table if exists t1,t2,t3; +--enable_warnings + +--echo # +--echo # Test ALTER TABLE to and from s3 +--echo # + +create table t1 (a int, b int) engine=innodb; +insert into t1 select seq,seq+10 from seq_1_to_1000; +alter table t1 engine=s3; +show create table t1; +alter table t1 comment="hello"; +show create table t1; +alter table t1 engine=innodb; +show create table t1; +select count(*), sum(a), sum(b) from t1; +drop table t1; + +# +# clean up +# +--source drop_database.inc |