diff --git a/mysql-test/suite/tianmu/r/add_column.result b/mysql-test/suite/tianmu/r/add_column.result index dcaf03860..187307ccc 100644 --- a/mysql-test/suite/tianmu/r/add_column.result +++ b/mysql-test/suite/tianmu/r/add_column.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS add_column_test; +CREATE DATABASE add_column_test; +USE add_column_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -50,3 +53,4 @@ select count(*) from column_type_test; count(*) 100001 drop table column_type_test; +DROP DATABASE add_column_test; diff --git a/mysql-test/suite/tianmu/r/alter_table.result b/mysql-test/suite/tianmu/r/alter_table.result index 9b67ed6d1..1be1faa1e 100644 --- a/mysql-test/suite/tianmu/r/alter_table.result +++ b/mysql-test/suite/tianmu/r/alter_table.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS alter_table_test; +CREATE DATABASE alter_table_test; +USE alter_table_test; DROP TABLE IF EXISTS t_test; CREATE TABLE `t_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -81,3 +84,4 @@ t_test CREATE TABLE `t_test` ( `copy_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=TIANMU DEFAULT CHARSET=utf8 +DROP DATABASE alter_table_test; diff --git a/mysql-test/suite/tianmu/r/alter_table_mix_use.result b/mysql-test/suite/tianmu/r/alter_table_mix_use.result index 8a00f1c29..87413215b 100644 --- a/mysql-test/suite/tianmu/r/alter_table_mix_use.result +++ b/mysql-test/suite/tianmu/r/alter_table_mix_use.result @@ -1,5 +1,6 @@ -create database alter_table_mix; -use alter_table_mix; +DROP DATABASE IF EXISTS alter_table_mix_use_test; +CREATE DATABASE alter_table_mix_use_test; +USE alter_table_mix_use_test; CREATE TABLE `alter_table_mix_test` ( `c_tinyint` tinyint DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint NOT NULL COMMENT 'smallint', @@ -174,3 +175,4 @@ alter_table_rename_drop CREATE TABLE `alter_table_rename_drop` ( `c_blob` blob COMMENT 'blob', `c_text` text COLLATE utf8mb4_unicode_ci COMMENT 'text' ) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci +DROP DATABASE alter_table_mix_use_test; diff --git a/mysql-test/suite/tianmu/r/casewhen.result b/mysql-test/suite/tianmu/r/casewhen.result index 5f7597ce5..4ff513382 100644 --- a/mysql-test/suite/tianmu/r/casewhen.result +++ b/mysql-test/suite/tianmu/r/casewhen.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS casewhen_test; +CREATE DATABASE casewhen_test; +USE casewhen_test; CREATE TABLE `test_case1` ( `id` int(11) DEFAULT NULL, `age` int(11) DEFAULT NULL, @@ -7,3 +9,4 @@ CREATE TABLE `test_case1` ( select id,case age when 2 then '1' else name end from test_case1; id case age when 2 then '1' else name end drop table test_case1; +DROP DATABASE casewhen_test; diff --git a/mysql-test/suite/tianmu/r/concat.result b/mysql-test/suite/tianmu/r/concat.result index a4db1a7c4..a919c15e4 100644 --- a/mysql-test/suite/tianmu/r/concat.result +++ b/mysql-test/suite/tianmu/r/concat.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS concat_test; +CREATE DATABASE concat_test; +USE concat_test; CREATE TABLE `test_case` ( `id` int(11) DEFAULT NULL, `name` text @@ -12,3 +14,4 @@ concat(id,name) NULL 3test3 drop table test_case; +DROP DATABASE concat_test; diff --git a/mysql-test/suite/tianmu/r/create_drop_users.result b/mysql-test/suite/tianmu/r/create_drop_users.result index c3146aeba..664d8d7bb 100644 --- a/mysql-test/suite/tianmu/r/create_drop_users.result +++ b/mysql-test/suite/tianmu/r/create_drop_users.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS create_drop_users_test; +CREATE DATABASE create_drop_users_test; +USE create_drop_users_test; # # Test create and drop users # Author: shiz @@ -27,3 +30,4 @@ DROP USER 'user2'@'%'; DROP USER 'user'@'%'; DROP USER 'user'@'localhost'; DROP USER 'user'@'127.0.0.1'; +DROP DATABASE create_drop_users_test; diff --git a/mysql-test/suite/tianmu/r/create_index.result b/mysql-test/suite/tianmu/r/create_index.result index 89f911701..b0d8e9985 100644 --- a/mysql-test/suite/tianmu/r/create_index.result +++ b/mysql-test/suite/tianmu/r/create_index.result @@ -1,5 +1,9 @@ +DROP DATABASE IF EXISTS create_index_test; +CREATE DATABASE create_index_test; +USE create_index_test; create table t1 (f1 binary(5)) engine=innodb; insert into t1 values ('w'), ('w'); create unique index index_t1 on t1(f1(4)); ERROR 23000: Duplicate entry 'w' for key 'index_t1' drop table t1; +DROP DATABASE create_index_test; diff --git a/mysql-test/suite/tianmu/r/delete.result b/mysql-test/suite/tianmu/r/delete.result index 4f37bf9b0..162248e3b 100644 --- a/mysql-test/suite/tianmu/r/delete.result +++ b/mysql-test/suite/tianmu/r/delete.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS delete_test; +CREATE DATABASE delete_test; +USE delete_test; # # DELETE FROM TABLE_NAME WHERE ... # -use test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -257,7 +259,7 @@ insert into t1 values (3, 3), (7, 7); delete from t1 where a = 3; check table t1; Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check +delete_test.t1 check note The storage engine for the table doesn't support check select * from t1; a b 7 7 @@ -338,8 +340,8 @@ drop table t1 , t2; # drop table if exists tbIn,t1; Warnings: -Note 1051 Unknown table 'test.tbIn' -Note 1051 Unknown table 'test.t1' +Note 1051 Unknown table 'delete_test.tbIn' +Note 1051 Unknown table 'delete_test.t1' create table tbIn(c1 int,c2 varchar(255))engine=InnoDB; insert into tbIn values(3,'hhhb'); insert into tbIn values(2,'hhhb'); @@ -350,3 +352,4 @@ insert into t1 values(2,'hhhb'); insert into t1 values(1,'hhhb'); delete tbIn,t1 from tbIn,t1 where tbIn.c1=t1.c1 and tbIn.c1=1; drop table tbIn,t1; +DROP DATABASE delete_test; diff --git a/mysql-test/suite/tianmu/r/delete_all_rows.result b/mysql-test/suite/tianmu/r/delete_all_rows.result index 8b6fa866e..c20a7a458 100644 --- a/mysql-test/suite/tianmu/r/delete_all_rows.result +++ b/mysql-test/suite/tianmu/r/delete_all_rows.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS delete_all_rows_test; +CREATE DATABASE delete_all_rows_test; +USE delete_all_rows_test; # # DELETE FROM TABLE_NAME # -use test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -169,3 +171,4 @@ SET AUTOCOMMIT=0; DELETE from t1; SET AUTOCOMMIT=1; drop table t1; +DROP DATABASE delete_all_rows_test; diff --git a/mysql-test/suite/tianmu/r/drop_column.result b/mysql-test/suite/tianmu/r/drop_column.result index 746703a6d..60ceca1dc 100644 --- a/mysql-test/suite/tianmu/r/drop_column.result +++ b/mysql-test/suite/tianmu/r/drop_column.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS drop_column_test; +CREATE DATABASE drop_column_test; +USE drop_column_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -40,3 +42,4 @@ column_type_test CREATE TABLE `column_type_test` ( `c_longblob` longblob COMMENT 'longblob' ) ENGINE=TIANMU DEFAULT CHARSET=latin1 drop table column_type_test; +DROP DATABASE drop_column_test; diff --git a/mysql-test/suite/tianmu/r/flow_control_function.result b/mysql-test/suite/tianmu/r/flow_control_function.result index 0ee2838c5..b5c13e1af 100644 --- a/mysql-test/suite/tianmu/r/flow_control_function.result +++ b/mysql-test/suite/tianmu/r/flow_control_function.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS flow_control_function_test; +CREATE DATABASE flow_control_function_test; +USE flow_control_function_test; # # Flow control function,Based on the test # @@ -51,3 +54,4 @@ NULLIF (2,1) SELECT NULLIF (2,2); NULLIF (2,2) NULL +DROP DATABASE flow_control_function_test; diff --git a/mysql-test/suite/tianmu/r/func_math.result b/mysql-test/suite/tianmu/r/func_math.result index 6445c5afb..3b10f5075 100644 --- a/mysql-test/suite/tianmu/r/func_math.result +++ b/mysql-test/suite/tianmu/r/func_math.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS func_math_test; +CREATE DATABASE func_math_test; +USE func_math_test; create table t1 (f1 varchar(32) not null, f2 smallint(5) unsigned not null, @@ -181,17 +184,18 @@ SELECT @a / 0.5 from t1; ERROR 22003: DECIMAL value is out of range in '((@`a`) / 0.5)' drop table if exists t1, t2; Warnings: -Note 1051 Unknown table 'test.t2' +Note 1051 Unknown table 'func_math_test.t2' create table t1(a tinyint zerofill, b int) engine=tianmu; insert into t1 values (11, 22); select a-b from t1; -ERROR 22003: BIGINT UNSIGNED value is out of range in '(`test`.`t1`.`a` - `test`.`t1`.`b`)' +ERROR 22003: BIGINT UNSIGNED value is out of range in '(`func_math_test`.`t1`.`a` - `func_math_test`.`t1`.`b`)' select cast((a-b) as unsigned) from t1; -ERROR 22003: BIGINT UNSIGNED value is out of range in '(`test`.`t1`.`a` - `test`.`t1`.`b`)' +ERROR 22003: BIGINT UNSIGNED value is out of range in '(`func_math_test`.`t1`.`a` - `func_math_test`.`t1`.`b`)' create table t2(a tinyint unsigned, b int) engine=tianmu; insert into t2 values (1, 22); select a-b from t1; -ERROR 22003: BIGINT UNSIGNED value is out of range in '(`test`.`t1`.`a` - `test`.`t1`.`b`)' +ERROR 22003: BIGINT UNSIGNED value is out of range in '(`func_math_test`.`t1`.`a` - `func_math_test`.`t1`.`b`)' select cast((a-b) as unsigned) from t2; -ERROR 22003: BIGINT UNSIGNED value is out of range in '(`test`.`t2`.`a` - `test`.`t2`.`b`)' +ERROR 22003: BIGINT UNSIGNED value is out of range in '(`func_math_test`.`t2`.`a` - `func_math_test`.`t2`.`b`)' drop table t1, t2; +DROP DATABASE func_math_test; diff --git a/mysql-test/suite/tianmu/r/group_concat.result b/mysql-test/suite/tianmu/r/group_concat.result index 24ac935da..6e9a9538f 100644 --- a/mysql-test/suite/tianmu/r/group_concat.result +++ b/mysql-test/suite/tianmu/r/group_concat.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS group_concat_test; +CREATE DATABASE group_concat_test; +USE group_concat_test; CREATE TABLE `test_groupconcat_case` ( `id` int(11) DEFAULT NULL, `name` text @@ -35,3 +37,4 @@ id group_concat(distinct name SEPARATOR ":") 2 test:test2 3 test1 drop table test_groupconcat_case; +DROP DATABASE group_concat_test; diff --git a/mysql-test/suite/tianmu/r/group_concat2.result b/mysql-test/suite/tianmu/r/group_concat2.result index e6a52b486..bd576c27b 100644 --- a/mysql-test/suite/tianmu/r/group_concat2.result +++ b/mysql-test/suite/tianmu/r/group_concat2.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS group_concat2_test; +CREATE DATABASE group_concat2_test; +USE group_concat2_test; CREATE TABLE `test_groupconcat2_case` ( `id` int(11) DEFAULT NULL, `val` int(11) @@ -12,3 +14,4 @@ select id,group_concat(distinct val SEPARATOR ":") from test_groupconcat2_case g id group_concat(distinct val SEPARATOR ":") 1 22:4 drop table test_groupconcat2_case; +DROP DATABASE group_concat2_test; diff --git a/mysql-test/suite/tianmu/r/insert.result b/mysql-test/suite/tianmu/r/insert.result index b8a10296f..bbf25dfe7 100644 --- a/mysql-test/suite/tianmu/r/insert.result +++ b/mysql-test/suite/tianmu/r/insert.result @@ -1,9 +1,9 @@ # #Insert values for different types of fields # -DROP DATABASE IF EXISTS insert_db; -CREATE DATABASE insert_db; -USE insert_db; +DROP DATABASE IF EXISTS insert_test; +CREATE DATABASE insert_test; +USE insert_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -120,12 +120,12 @@ drop table t1; # Test of mysqld crash with fully qualified column names # drop database if exists mysqltest; -create database mysqltest; -use mysqltest; +create database mysqltest_insert_test; +use mysqltest_insert_test; create table t1 (c int); -insert into mysqltest.t1 set mysqltest.t1.c = '1'; -drop database mysqltest; -use test; +insert into mysqltest_insert_test.t1 set mysqltest_insert_test.t1.c = '1'; +drop database mysqltest_insert_test; +use insert_test; # # Test of wrong values for float data # @@ -314,15 +314,15 @@ create view v1 as select * from t1, t2 where f1= f3; insert into t1 values (1,11), (2,22); insert into t2 values (1,12), (2,24); insert into v1 (f1) values (3) on duplicate key update f3= f3 + 10; -ERROR HY000: Can not modify more than one base table through a join view 'test.v1' +ERROR HY000: Can not modify more than one base table through a join view 'insert_test.v1' insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10; -ERROR HY000: Can not modify more than one base table through a join view 'test.v1' +ERROR HY000: Can not modify more than one base table through a join view 'insert_test.v1' select * from t1; f1 f2 1 11 2 22 insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10; -ERROR HY000: Can not modify more than one base table through a join view 'test.v1' +ERROR HY000: Can not modify more than one base table through a join view 'insert_test.v1' select * from t1; f1 f2 1 11 @@ -552,4 +552,4 @@ pk 2 DROP VIEW v1, v2; DROP TABLE t1; -DROP DATABASE insert_db; +DROP DATABASE insert_test; diff --git a/mysql-test/suite/tianmu/r/issue1000.result b/mysql-test/suite/tianmu/r/issue1000.result index e2db506d9..b84040b76 100644 --- a/mysql-test/suite/tianmu/r/issue1000.result +++ b/mysql-test/suite/tianmu/r/issue1000.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue1000_test; +CREATE DATABASE issue1000_test; +USE issue1000_test; # # Test of skip lines syntax # @@ -121,3 +123,4 @@ drop table tmp_loaddata3; drop table tmp_loaddata4; drop table tmp_loaddata5; drop table error_log; +DROP DATABASE issue1000_test; diff --git a/mysql-test/suite/tianmu/r/issue1034.result b/mysql-test/suite/tianmu/r/issue1034.result index 63d561f12..b49d89cd2 100644 --- a/mysql-test/suite/tianmu/r/issue1034.result +++ b/mysql-test/suite/tianmu/r/issue1034.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue1034_test; +CREATE DATABASE issue1034_test; +USE issue1034_test; set global tianmu_index_search=on; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (id int) ENGINE=TIANMU; @@ -365,3 +367,4 @@ CREATE TABLE t1 (id VARCHAR(255)) ENGINE=TIANMU; ALTER TABLE t1 ADD PRIMARY KEY(id) USING HASH, ALGORITHM=INPLACE; ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. DROP TABLE t1; +DROP DATABASE issue1034_test; diff --git a/mysql-test/suite/tianmu/r/issue1054.result b/mysql-test/suite/tianmu/r/issue1054.result index ac3a9b735..a6f11762e 100644 --- a/mysql-test/suite/tianmu/r/issue1054.result +++ b/mysql-test/suite/tianmu/r/issue1054.result @@ -4,8 +4,8 @@ include/master-slave.inc # There are MySQL keywords in the table fields # [on master] -drop table if exists `column_type_test`; -CREATE TABLE `column_type_test` ( +drop table if exists `t_issue1054`; +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -24,48 +24,48 @@ CREATE TABLE `column_type_test` ( `set` text COMMENT 'text', `show` longblob COMMENT 'longblob' ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -drop table column_type_test; +drop table t_issue1054; include/sync_slave_sql_with_master.inc # # Have unique constraints # [on master] -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -85,48 +85,48 @@ CREATE TABLE `column_type_test` ( `show` longblob COMMENT 'longblob', UNIQUE (`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -drop table column_type_test; +drop table t_issue1054; include/sync_slave_sql_with_master.inc # # Has primary key # [on master] -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -146,48 +146,48 @@ CREATE TABLE `column_type_test` ( `show` longblob COMMENT 'longblob', primary key(`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -drop table column_type_test; +drop table t_issue1054; include/sync_slave_sql_with_master.inc # # Validate scenarios where push down fails # [on master] -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -207,48 +207,48 @@ CREATE TABLE `column_type_test` ( `show` longblob COMMENT 'longblob', primary key(`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; usage use update delete select drop create insert database where lefe join engine reset into set show 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -drop table column_type_test; +drop table t_issue1054; include/sync_slave_sql_with_master.inc # # Adds some test cases for unicode. # [on master] -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `abc def` tinyint(4) COMMENT 'tinyint', `пусто` smallint(6) DEFAULT NULL COMMENT 'smallint', `новое` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -267,41 +267,41 @@ CREATE TABLE `column_type_test` ( `set@` text COMMENT 'text', `sho*w` longblob COMMENT 'longblob' ) engine=innodb; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `пусто`=200 where `abc def`=100; -select * from column_type_test; +update t_issue1054 set `пусто`=200 where `abc def`=100; +select * from t_issue1054; abc def пусто новое 你好 to-to0 dr(op cr+eate ins=ert data.base whe]re lef[e joi)n eng&t into# set@ sho*w 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; abc def пусто новое 你好 to-to0 dr(op cr+eate ins=ert data.base whe]re lef[e joi)n eng&t into# set@ sho*w 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -delete from column_type_test where `abc def`=100; -select * from column_type_test; +delete from t_issue1054 where `abc def`=100; +select * from t_issue1054; abc def пусто новое 你好 to-to0 dr(op cr+eate ins=ert data.base whe]re lef[e joi)n eng&t into# set@ sho*w 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on slave] include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; abc def пусто новое 你好 to-to0 dr(op cr+eate ins=ert data.base whe]re lef[e joi)n eng&t into# set@ sho*w 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL [on master] -drop table column_type_test; +drop table t_issue1054; include/sync_slave_sql_with_master.inc stop slave; diff --git a/mysql-test/suite/tianmu/r/issue1065.result b/mysql-test/suite/tianmu/r/issue1065.result index c3d843ac3..ad1a218da 100644 --- a/mysql-test/suite/tianmu/r/issue1065.result +++ b/mysql-test/suite/tianmu/r/issue1065.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue1065_test; +CREATE DATABASE issue1065_test; +USE issue1065_test; set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; drop table if exists t_test; CREATE TABLE t_test( @@ -155,3 +157,4 @@ END WHILE; END // drop PROCEDURE add_user; drop table t_test; +DROP DATABASE issue1065_test; diff --git a/mysql-test/suite/tianmu/r/issue1070.result b/mysql-test/suite/tianmu/r/issue1070.result index 546cae9e3..403ae2569 100644 --- a/mysql-test/suite/tianmu/r/issue1070.result +++ b/mysql-test/suite/tianmu/r/issue1070.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue1070_test; +CREATE DATABASE issue1070_test; +USE issue1070_test; create table t_issue1070(id int,name varchar(5)) engine=tianmu DEFAULT CHARSET=utf8mb4; insert into t_issue1070 values(1,x'E5BCA0E4B889'),(2,x'E69D8EE59B9B'); show create table t_issue1070; @@ -22,3 +24,4 @@ hex(name) E5BCA0E4B889 E69D8EE59B9B drop table t_issue1070; +DROP DATABASE issue1070_test; diff --git a/mysql-test/suite/tianmu/r/issue1090.result b/mysql-test/suite/tianmu/r/issue1090.result index b3993f6ca..421542633 100644 --- a/mysql-test/suite/tianmu/r/issue1090.result +++ b/mysql-test/suite/tianmu/r/issue1090.result @@ -8,10 +8,10 @@ include/master-slave.inc include/sync_slave_sql_with_master.inc set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; [on master] -create table t1(c1 int,c2 varchar(255)); -show create table t1; +create table t_issue1090(c1 int,c2 varchar(255)); +show create table t_issue1090; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue1090 CREATE TABLE `t_issue1090` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -25,17 +25,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t1; +show create table t_issue1090; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue1090 CREATE TABLE `t_issue1090` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t1 add c3 int; -show create table t1; +alter table t_issue1090 add c3 int; +show create table t_issue1090; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue1090 CREATE TABLE `t_issue1090` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL @@ -49,15 +49,15 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t1; +show create table t_issue1090; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue1090 CREATE TABLE `t_issue1090` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t1; +drop table t_issue1090; include/sync_slave_sql_with_master.inc # # sql_mode='MANDATORY_TIANMU' @@ -65,10 +65,10 @@ include/sync_slave_sql_with_master.inc [on slave] set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU'; [on master] -create table t2(c1 int,c2 varchar(255)); -show create table t2; +create table t_issue1090_2(c1 int,c2 varchar(255)); +show create table t_issue1090_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue1090_2 CREATE TABLE `t_issue1090_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -82,17 +82,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t2; +show create table t_issue1090_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue1090_2 CREATE TABLE `t_issue1090_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t2 add c3 int; -show create table t2; +alter table t_issue1090_2 add c3 int; +show create table t_issue1090_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue1090_2 CREATE TABLE `t_issue1090_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL @@ -106,15 +106,15 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t2; +show create table t_issue1090_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue1090_2 CREATE TABLE `t_issue1090_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t2; +drop table t_issue1090_2; include/sync_slave_sql_with_master.inc # # sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' @@ -122,10 +122,10 @@ include/sync_slave_sql_with_master.inc [on slave] set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; [on master] -create table t3(c1 int,c2 varchar(255)); -show create table t3; +create table t_issue1090_3(c1 int,c2 varchar(255)); +show create table t_issue1090_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue1090_3 CREATE TABLE `t_issue1090_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -139,17 +139,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t3; +show create table t_issue1090_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue1090_3 CREATE TABLE `t_issue1090_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t3 add c3 int; -show create table t3; +alter table t_issue1090_3 add c3 int; +show create table t_issue1090_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue1090_3 CREATE TABLE `t_issue1090_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL @@ -163,15 +163,15 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t3; +show create table t_issue1090_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue1090_3 CREATE TABLE `t_issue1090_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL, `c3` int(11) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t3; +drop table t_issue1090_3; include/sync_slave_sql_with_master.inc # # sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU' @@ -179,10 +179,10 @@ include/sync_slave_sql_with_master.inc [on slave] set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU'; [on master] -create table t4(c1 int,c2 varchar(255)); -show create table t4; +create table t_issue1090_4(c1 int,c2 varchar(255)); +show create table t_issue1090_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue1090_4 CREATE TABLE `t_issue1090_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -196,17 +196,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue1090_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue1090_4 CREATE TABLE `t_issue1090_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t4 DROP COLUMN c2; -show create table t4; +alter table t_issue1090_4 DROP COLUMN c2; +show create table t_issue1090_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue1090_4 CREATE TABLE `t_issue1090_4` ( `c1` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 [on slave] @@ -218,12 +218,12 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue1090_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue1090_4 CREATE TABLE `t_issue1090_4` ( `c1` int(11) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t4; +drop table t_issue1090_4; include/sync_slave_sql_with_master.inc stop slave; diff --git a/mysql-test/suite/tianmu/r/issue1107.result b/mysql-test/suite/tianmu/r/issue1107.result index 49ca992d6..ffdc065c7 100644 --- a/mysql-test/suite/tianmu/r/issue1107.result +++ b/mysql-test/suite/tianmu/r/issue1107.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue1107_test; +CREATE DATABASE issue1107_test; +USE issue1107_test; SET @@sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; select @@sql_mode; @@sql_mode @@ -36,3 +38,4 @@ ID UNITSN V1 V2 V3 V4 V5 5 A5 NULL NULL NULL NULL NULL DROP TABLE A; DROP TABLE B; +DROP DATABASE issue1107_test; diff --git a/mysql-test/suite/tianmu/r/issue222.result b/mysql-test/suite/tianmu/r/issue222.result index 5dafdfe83..b04d1475f 100644 --- a/mysql-test/suite/tianmu/r/issue222.result +++ b/mysql-test/suite/tianmu/r/issue222.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue222_test; +CREATE DATABASE issue222_test; +USE issue222_test; create table $tt (a$1 int, $b int, c$ int) engine=tianmu; insert into $tt values (1,2,3); select a$1, $b, c$ from $tt; a$1 $b c$ 1 2 3 drop table $tt; +DROP DATABASE issue222_test; diff --git a/mysql-test/suite/tianmu/r/issue226.result b/mysql-test/suite/tianmu/r/issue226.result index 62ea9e77a..f7135d01a 100644 --- a/mysql-test/suite/tianmu/r/issue226.result +++ b/mysql-test/suite/tianmu/r/issue226.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue226_test; +CREATE DATABASE issue226_test; +USE issue226_test; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (f1 VARCHAR(255) CHARACTER SET utf8) ENGINE=TIANMU; @@ -13,3 +15,4 @@ b c DROP TABLE t1; DROP TABLE t2; +DROP DATABASE issue226_test; diff --git a/mysql-test/suite/tianmu/r/issue228.result b/mysql-test/suite/tianmu/r/issue228.result index a542436d5..3813aff7f 100644 --- a/mysql-test/suite/tianmu/r/issue228.result +++ b/mysql-test/suite/tianmu/r/issue228.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue228_test; +CREATE DATABASE issue228_test; +USE issue228_test; drop table if exists t1; create table t1 (a varchar(112) charset utf8 collate utf8_bin not null,primary key (a)) select 'test' as a ; select a from t1; a test drop table t1; +DROP DATABASE issue228_test; diff --git a/mysql-test/suite/tianmu/r/issue270.result b/mysql-test/suite/tianmu/r/issue270.result index 56e4168d1..dbfd129ce 100644 --- a/mysql-test/suite/tianmu/r/issue270.result +++ b/mysql-test/suite/tianmu/r/issue270.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS issue270_test; +CREATE DATABASE issue270_test; +USE issue270_test; # # Explain select straight_join DISTINCT.The rows in the test result is incorrect (#270) # -use test; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t3; @@ -15,7 +17,8 @@ explain select straight_join DISTINCT t2.a,t2.b, t1.c from t1, t3, t2 where (t1.c=t2.a or (t1.c=t3.a and t2.a=t3.b)) and t1.b=556476786 and t2.b like '%%' order by t2.b limit 0,1; id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ALL b,c NULL NULL NULL 2 100.00 Using where with pushed condition (`test`.`t1`.`b` = 556476786)(t0) Pckrows: 1, susp. 0 (1 empty 0 full). Conditions: 1; Using temporary; Using filesort +1 SIMPLE t1 NULL ALL b,c NULL NULL NULL 2 100.00 Using where with pushed condition (`issue270_test`.`t1`.`b` = 556476786)(t0) Pckrows: 1, susp. 0 (1 empty 0 full). Conditions: 1; Using temporary; Using filesort 1 SIMPLE t3 NULL ALL PRIMARY,a,b NULL NULL NULL 2 100.00 Using join buffer (Block Nested Loop) 1 SIMPLE t2 NULL ALL PRIMARY NULL NULL NULL 2 50.00 Range checked for each record (index map: 0x1) drop table t1,t2,t3; +DROP DATABASE issue270_test; diff --git a/mysql-test/suite/tianmu/r/issue271.result b/mysql-test/suite/tianmu/r/issue271.result index 70973658f..2c2712d0b 100644 --- a/mysql-test/suite/tianmu/r/issue271.result +++ b/mysql-test/suite/tianmu/r/issue271.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue271_test; +CREATE DATABASE issue271_test; +USE issue271_test; DROP TABLE IF EXISTS test1; CREATE TABLE test1(a varchar(100)) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4; INSERT INTO test1 VALUES ('hakan%'), ('hakank'), ("ha%an"); @@ -164,3 +166,4 @@ SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; Variable_name Value sql_mode DROP TABLE test1; +DROP DATABASE issue271_test; diff --git a/mysql-test/suite/tianmu/r/issue281.result b/mysql-test/suite/tianmu/r/issue281.result index 4a58af161..519b3adce 100644 --- a/mysql-test/suite/tianmu/r/issue281.result +++ b/mysql-test/suite/tianmu/r/issue281.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue281_test; +CREATE DATABASE issue281_test; +USE issue281_test; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (f1 INT UNIQUE) ENGINE=TIANMU; INSERT INTO t1 VALUES(1),(2),(NULL),(NULL); @@ -17,3 +19,4 @@ f1 NULL NULL DROP TABLE t1; +DROP DATABASE issue281_test; diff --git a/mysql-test/suite/tianmu/r/issue282.result b/mysql-test/suite/tianmu/r/issue282.result index 4b7d36e17..38a180526 100644 --- a/mysql-test/suite/tianmu/r/issue282.result +++ b/mysql-test/suite/tianmu/r/issue282.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue282_test; +CREATE DATABASE issue282_test; +USE issue282_test; CREATE TABLE issue282_t1 (sku int PRIMARY KEY, pr int)engine=tianmu; CREATE TABLE issue282_t2 (sku int PRIMARY KEY, sppr int, name varchar(255))engine=tianmu; INSERT INTO issue282_t1 VALUES @@ -109,3 +111,4 @@ issue282_t2.sppr=issue282_t1.sku)); sku sppr name sku pr 20 10 bbb 10 10 drop table issue282_t1 ,issue282_t2; +DROP DATABASE issue282_test; diff --git a/mysql-test/suite/tianmu/r/issue301.result b/mysql-test/suite/tianmu/r/issue301.result index 6b60547e5..d5ddd8a32 100644 --- a/mysql-test/suite/tianmu/r/issue301.result +++ b/mysql-test/suite/tianmu/r/issue301.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue301_test; +CREATE DATABASE issue301_test; +USE issue301_test; drop table if exists t1; CREATE TABLE t1 (a INT NOT NULL, b INT)engine=tianmu; INSERT INTO t1 VALUES (1, 1),(1,2),(1,3); @@ -496,3 +498,4 @@ NULL 100 DROP TABLE t1; DROP TABLE t2; +DROP DATABASE issue301_test; diff --git a/mysql-test/suite/tianmu/r/issue342.result b/mysql-test/suite/tianmu/r/issue342.result index fc905eaf8..6eafcb384 100644 --- a/mysql-test/suite/tianmu/r/issue342.result +++ b/mysql-test/suite/tianmu/r/issue342.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue342_test; +CREATE DATABASE issue342_test; +USE issue342_test; CREATE TABLE `lineitem_i342` ( `l_orderkey` int(11) NOT NULL, `l_partkey` int(11) NOT NULL, @@ -47,3 +49,4 @@ supplier_no total_revenue 99271 18210.2270 DROP VIEW revenue_i342; DROP TABLE lineitem_i342; +DROP DATABASE issue342_test; diff --git a/mysql-test/suite/tianmu/r/issue362.result b/mysql-test/suite/tianmu/r/issue362.result index 044de85f1..d34d647e7 100644 --- a/mysql-test/suite/tianmu/r/issue362.result +++ b/mysql-test/suite/tianmu/r/issue362.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue362_test; +CREATE DATABASE issue362_test; +USE issue362_test; CREATE TABLE `abcÿdef` (i int)engine=tianmu; INSERT INTO `abcÿdef` VALUES (1); INSERT INTO abcÿdef VALUES (2); @@ -11,3 +13,4 @@ i 1 2 DROP TABLE `abcÿdef`; +DROP DATABASE issue362_test; diff --git a/mysql-test/suite/tianmu/r/issue364.result b/mysql-test/suite/tianmu/r/issue364.result index 6fc7ed89d..0c3bcb88d 100644 --- a/mysql-test/suite/tianmu/r/issue364.result +++ b/mysql-test/suite/tianmu/r/issue364.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue364_test; +CREATE DATABASE issue364_test; +USE issue364_test; CREATE TABLE `t_test1`( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(10) NOT NULL, @@ -28,3 +30,4 @@ id DROP TRIGGER insert_trigger_t_test2; DROP TABLE t_test2; DROP TABLE t_test1; +DROP DATABASE issue364_test; diff --git a/mysql-test/suite/tianmu/r/issue405.result b/mysql-test/suite/tianmu/r/issue405.result index 63b37bce3..f989e44ae 100644 --- a/mysql-test/suite/tianmu/r/issue405.result +++ b/mysql-test/suite/tianmu/r/issue405.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue405_test; +CREATE DATABASE issue405_test; +USE issue405_test; create table timehi (val time) ENGINE=TIANMU; insert into timehi values ('00:00:00'), ('01:15:39'), ('09:11:12'), ('20:30:29'); select * from timehi where val >= '08:02:45'; @@ -6,3 +8,4 @@ val 09:11:12 20:30:29 drop table timehi; +DROP DATABASE issue405_test; diff --git a/mysql-test/suite/tianmu/r/issue415.result b/mysql-test/suite/tianmu/r/issue415.result index 1fda9d870..6067b2937 100644 --- a/mysql-test/suite/tianmu/r/issue415.result +++ b/mysql-test/suite/tianmu/r/issue415.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS issue415_test; +CREATE DATABASE issue415_test; +USE issue415_test; # # fix issue415 # -use test; CREATE TABLE `select_base_with_primary_key` ( `pk` bigint(11) NOT NULL AUTO_INCREMENT, `varchar_test` varchar(255) DEFAULT NULL, @@ -28,3 +30,4 @@ aa 0 1 0 Warnings: Warning 1287 'GROUP BY with ASC/DESC' is deprecated and will be removed in a future release. Please use GROUP BY ... ORDER BY ... ASC/DESC instead drop table select_base_with_primary_key; +DROP DATABASE issue415_test; diff --git a/mysql-test/suite/tianmu/r/issue417.result b/mysql-test/suite/tianmu/r/issue417.result index 3047e8070..ebf28eceb 100644 --- a/mysql-test/suite/tianmu/r/issue417.result +++ b/mysql-test/suite/tianmu/r/issue417.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue417_test; +CREATE DATABASE issue417_test; +USE issue417_test; create table ttime (val time) ENGINE=TIANMU; insert into ttime values ('12:15:03'), ('18:30:20'); select (val between '12:00:00' and '12:30:00') as agval from ttime; @@ -6,3 +8,4 @@ agval 1 0 drop table ttime; +DROP DATABASE issue417_test; diff --git a/mysql-test/suite/tianmu/r/issue429.result b/mysql-test/suite/tianmu/r/issue429.result index 463c665c9..07095effb 100644 --- a/mysql-test/suite/tianmu/r/issue429.result +++ b/mysql-test/suite/tianmu/r/issue429.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue429_test; +CREATE DATABASE issue429_test; +USE issue429_test; create table tt (val time) ENGINE=TIANMU; insert into tt values ('06:34:12'), ('13:23:33'); select * from tt where DATE(TIMESTAMP(val)) = CURDATE(); @@ -9,3 +11,4 @@ select * from tt where DATE(TIMESTAMP(val, val)) = CURDATE(); val 06:34:12 drop table tt; +DROP DATABASE issue429_test; diff --git a/mysql-test/suite/tianmu/r/issue430.result b/mysql-test/suite/tianmu/r/issue430.result index 55a59010d..3d7ffe4f9 100644 --- a/mysql-test/suite/tianmu/r/issue430.result +++ b/mysql-test/suite/tianmu/r/issue430.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue430_test; +CREATE DATABASE issue430_test; +USE issue430_test; create table tt2 (a tinyint(4), b smallint(6), c bigint(20)) ENGINE=TIANMU; insert into tt2 values (15, 20, 18), (1, 6, 4); select (a/b)/c as agf from tt2 group by agf; agf 0.04166667 drop table tt2; +DROP DATABASE issue430_test; diff --git a/mysql-test/suite/tianmu/r/issue431.result b/mysql-test/suite/tianmu/r/issue431.result index f4be4aa8c..29951d59c 100644 --- a/mysql-test/suite/tianmu/r/issue431.result +++ b/mysql-test/suite/tianmu/r/issue431.result @@ -1,6 +1,9 @@ -use test; +DROP DATABASE IF EXISTS issue431_test; +CREATE DATABASE issue431_test; +USE issue431_test; create table tt(a int, b int) ENGINE=TIANMU; insert into tt values (3, 4); select * from tt where (a >= 3) AND (b = 5 AND a > 2 OR 0); a b drop table tt; +DROP DATABASE issue431_test; diff --git a/mysql-test/suite/tianmu/r/issue441.result b/mysql-test/suite/tianmu/r/issue441.result index dd5ebac69..8d0b10c31 100644 --- a/mysql-test/suite/tianmu/r/issue441.result +++ b/mysql-test/suite/tianmu/r/issue441.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue441_test; +CREATE DATABASE issue441_test; +USE issue441_test; CREATE TEMPORARY TABLE `t_test1`( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(10) NOT NULL, @@ -13,3 +15,4 @@ SELECT id FROM t_test1; id 1 DROP TABLE t_test1; +DROP DATABASE issue441_test; diff --git a/mysql-test/suite/tianmu/r/issue464.result b/mysql-test/suite/tianmu/r/issue464.result index 27c4fb78f..cd85ba213 100644 --- a/mysql-test/suite/tianmu/r/issue464.result +++ b/mysql-test/suite/tianmu/r/issue464.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue464_test; +CREATE DATABASE issue464_test; +USE issue464_test; create table tt (date_test DATE, time_test TIME, datetime_test DATETIME, timestamp_test TIMESTAMP, year_test YEAR) ENGINE=TIANMU; insert into tt values ('2017-12-07', '02:03:04', '2017-12-08 05:06:07', '2018-11-08 09:10:11', '2020'); select DATE(date_test) from tt; @@ -95,3 +97,4 @@ select YEAR(date_test) from tt; YEAR(date_test) 2017 drop table tt; +DROP DATABASE issue464_test; diff --git a/mysql-test/suite/tianmu/r/issue467.result b/mysql-test/suite/tianmu/r/issue467.result index 2aab8ef3d..53da13b25 100644 --- a/mysql-test/suite/tianmu/r/issue467.result +++ b/mysql-test/suite/tianmu/r/issue467.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue467_test; +CREATE DATABASE issue467_test; +USE issue467_test; create table tt (date_test date) ENGINE=TIANMU; insert into tt values ('2010-02-22'); select * from tt where (date_test<='2003-04-05')AND (date_test>='2011-06-22')OR (date_test<='2012-12-13' ); date_test 2010-02-22 drop table tt; +DROP DATABASE issue467_test; diff --git a/mysql-test/suite/tianmu/r/issue468.result b/mysql-test/suite/tianmu/r/issue468.result index a13652b75..c4558e5d3 100644 --- a/mysql-test/suite/tianmu/r/issue468.result +++ b/mysql-test/suite/tianmu/r/issue468.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue468_test; +CREATE DATABASE issue468_test; +USE issue468_test; create table tt (e1 int, e2 int, e3 int, e4 int, e5 int, e6 int, e7 int, e8 int, e9 int) ENGINE=TIANMU; insert into tt values (1,1,1,0,0,0,0,1,0); select * from tt where (e1 AND ((e2 AND e3 AND (e4 OR e5)) OR e6) OR (e7 AND e8 AND e9)); @@ -6,3 +8,4 @@ e1 e2 e3 e4 e5 e6 e7 e8 e9 select * from tt where (e1 AND ((e2 AND e3 AND (e4 OR e5)) OR 0) OR (e7 AND e8 AND e9)); e1 e2 e3 e4 e5 e6 e7 e8 e9 drop table tt; +DROP DATABASE issue468_test; diff --git a/mysql-test/suite/tianmu/r/issue469.result b/mysql-test/suite/tianmu/r/issue469.result index 28154df90..f8e61fc81 100644 --- a/mysql-test/suite/tianmu/r/issue469.result +++ b/mysql-test/suite/tianmu/r/issue469.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue469_test; +CREATE DATABASE issue469_test; +USE issue469_test; create table tt (v1 int, v2 int, v3 int) ENGINE=TIANMU; insert into tt values (20, 30, 40); select * from tt where (v1 = 20) OR ((v1 <=> 80) OR (v2 = 70) AND (v3 = 60)) AND (1); v1 v2 v3 20 30 40 drop table tt; +DROP DATABASE issue469_test; diff --git a/mysql-test/suite/tianmu/r/issue475.result b/mysql-test/suite/tianmu/r/issue475.result index 79111d600..81e98b2e8 100644 --- a/mysql-test/suite/tianmu/r/issue475.result +++ b/mysql-test/suite/tianmu/r/issue475.result @@ -1,7 +1,10 @@ -use test; +DROP DATABASE IF EXISTS issue475_test; +CREATE DATABASE issue475_test; +USE issue475_test; create table jl (date_test date) ENGINE=TIANMU; insert into jl values ('2015-11-12'); select ADDTIME(date_test, '1 1:1:1.00002') from jl; ADDTIME(date_test, '1 1:1:1.00002') 2015-11-13 01:01:01.000020 drop table jl; +DROP DATABASE issue475_test; diff --git a/mysql-test/suite/tianmu/r/issue487.result b/mysql-test/suite/tianmu/r/issue487.result index 3dc56825e..ddfb37f59 100644 --- a/mysql-test/suite/tianmu/r/issue487.result +++ b/mysql-test/suite/tianmu/r/issue487.result @@ -1,3 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue487_test; +CREATE DATABASE issue487_test; +USE issue487_test; create table `#mysql50#q.q` (f1 int primary key) engine=tianmu; ERROR HY000: Got error 1103 from storage engine +DROP DATABASE issue487_test; diff --git a/mysql-test/suite/tianmu/r/issue496.result b/mysql-test/suite/tianmu/r/issue496.result index 54423501f..673ae5dd5 100644 --- a/mysql-test/suite/tianmu/r/issue496.result +++ b/mysql-test/suite/tianmu/r/issue496.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue496_test; +CREATE DATABASE issue496_test; +USE issue496_test; create table t1 (id int, name varchar(10) comment "LOOKUP") ENGINE=TIANMU; insert into t1 values (1, 'one'); insert into t1 values (2, 'one'); @@ -12,3 +14,4 @@ id name 3 one 4 one drop table t1; +DROP DATABASE issue496_test; diff --git a/mysql-test/suite/tianmu/r/issue502.result b/mysql-test/suite/tianmu/r/issue502.result index 935e1a397..307c481f8 100644 --- a/mysql-test/suite/tianmu/r/issue502.result +++ b/mysql-test/suite/tianmu/r/issue502.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue502_test; +CREATE DATABASE issue502_test; +USE issue502_test; CREATE TABLE `auto_20` ( `pk` bigint(11) NOT NULL AUTO_INCREMENT, `varchar_test` varchar(255) DEFAULT NULL, @@ -13,3 +15,4 @@ pk varchar_test 2 aaaa 3 bbb drop table auto_20; +DROP DATABASE issue502_test; diff --git a/mysql-test/suite/tianmu/r/issue515.result b/mysql-test/suite/tianmu/r/issue515.result index 5d51f2a55..d5373dcb6 100644 --- a/mysql-test/suite/tianmu/r/issue515.result +++ b/mysql-test/suite/tianmu/r/issue515.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue515_test; +CREATE DATABASE issue515_test; +USE issue515_test; create table timetest (val timestamp) ENGINE=TIANMU; insert into timetest values ('2010-02-22 18:35:23'); select val not between '2010-02-22 18:35:23' and '2015-11-23 08:02:45' from (select * from timetest) as A; @@ -8,3 +10,4 @@ select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A; val val >= '2010-02-22 18:35:23' 2010-02-22 18:35:23 1 drop table timetest; +DROP DATABASE issue515_test; diff --git a/mysql-test/suite/tianmu/r/issue538.result b/mysql-test/suite/tianmu/r/issue538.result index d5b06af0b..8bd84b691 100644 --- a/mysql-test/suite/tianmu/r/issue538.result +++ b/mysql-test/suite/tianmu/r/issue538.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS issue538_test; +CREATE DATABASE issue538_test; +USE issue538_test; # # issue 538 test for user defined function of tianmu # -use test; DROP TABLE IF EXISTS employees; CREATE TABLE `employees` ( `employee_id` int(11) NOT NULL , @@ -238,3 +240,4 @@ sfunc(2) 3 DROP TABLE tf; DROP FUNCTION sfunc; +DROP DATABASE issue538_test; diff --git a/mysql-test/suite/tianmu/r/issue581.result b/mysql-test/suite/tianmu/r/issue581.result index 2a4020cd4..c0fbdf748 100644 --- a/mysql-test/suite/tianmu/r/issue581.result +++ b/mysql-test/suite/tianmu/r/issue581.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue581_test; +CREATE DATABASE issue581_test; +USE issue581_test; DROP TABLE IF EXISTS t1,t2; CREATE TABLE t1 (id INT PRIMARY KEY, copy INT) ENGINE=TIANMU; CREATE TABLE t2 (id INT PRIMARY KEY, data INT) ENGINE=TIANMU; @@ -44,3 +46,4 @@ id data 1 1 2 2 DROP TABLE IF EXISTS t1,t2; +DROP DATABASE issue581_test; diff --git a/mysql-test/suite/tianmu/r/issue656.result b/mysql-test/suite/tianmu/r/issue656.result index 2cc9ecd2d..a0d43931d 100644 --- a/mysql-test/suite/tianmu/r/issue656.result +++ b/mysql-test/suite/tianmu/r/issue656.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue656_test; +CREATE DATABASE issue656_test; +USE issue656_test; CREATE TABLE `test` ( `id` int(11) DEFAULT NULL, `t` timestamp NULL DEFAULT NULL @@ -12,3 +14,4 @@ Level Code Message Warning 1292 Incorrect datetime value: '2056-08-22 11:24:49' for column 't' at row 2 Warning 1292 Incorrect datetime value: '2056-08-22 12:24:49' for column 't' at row 3 drop table test; +DROP DATABASE issue656_test; diff --git a/mysql-test/suite/tianmu/r/issue663.result b/mysql-test/suite/tianmu/r/issue663.result index fcfe9c522..620b3c789 100644 --- a/mysql-test/suite/tianmu/r/issue663.result +++ b/mysql-test/suite/tianmu/r/issue663.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS issue663_test; +CREATE DATABASE issue663_test; +USE issue663_test; create table t11 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t12 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; insert into t11 values (0, 10),(1, 11),(2, 12); @@ -87,3 +90,4 @@ t1.sku=10 AND t2.sppr=t1.sku)); sku sppr name sku pr drop table t1,t2; +DROP DATABASE issue663_test; diff --git a/mysql-test/suite/tianmu/r/issue669.result b/mysql-test/suite/tianmu/r/issue669.result index 4c0afef9b..f3e30c845 100644 --- a/mysql-test/suite/tianmu/r/issue669.result +++ b/mysql-test/suite/tianmu/r/issue669.result @@ -1,7 +1,9 @@ +DROP DATABASE IF EXISTS issue669_test; +CREATE DATABASE issue669_test; +USE issue669_test; # # Fix assertion errors caused by syntax optimization of the tianmu engine #669 # -use test; create table t11 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t12 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t2 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; @@ -10,3 +12,4 @@ insert into t12 values (33, 10),(0, 11),(2, 12); insert into t2 values (1, 21),(2, 12),(3, 23); delete from t11 where t11.b not in (select b from t2 where t11.a < t2.a); drop table t11,t12,t2; +DROP DATABASE issue669_test; diff --git a/mysql-test/suite/tianmu/r/issue682.result b/mysql-test/suite/tianmu/r/issue682.result index 1e4e7b477..48586a6a3 100644 --- a/mysql-test/suite/tianmu/r/issue682.result +++ b/mysql-test/suite/tianmu/r/issue682.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue682_test; +CREATE DATABASE issue682_test; +USE issue682_test; set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Warnings: Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. @@ -227,3 +229,4 @@ Warnings: Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1 Warning 1292 Incorrect date value: '0000-00-00' for column 'a' at row 1 drop table t1; +DROP DATABASE issue682_test; diff --git a/mysql-test/suite/tianmu/r/issue703.result b/mysql-test/suite/tianmu/r/issue703.result index 1ba075e72..d6033b8eb 100644 --- a/mysql-test/suite/tianmu/r/issue703.result +++ b/mysql-test/suite/tianmu/r/issue703.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS issue703_test; +CREATE DATABASE issue703_test; +USE issue703_test; show status like "Tianmu%"; Variable_name Value Tianmu_delay_buffer_usage # @@ -44,3 +47,4 @@ Tianmu_query_total # Tianmu_row_store_usage # Tianmu_update_per_minute # Tianmu_update_total # +DROP DATABASE issue703_test; diff --git a/mysql-test/suite/tianmu/r/issue736.result b/mysql-test/suite/tianmu/r/issue736.result index 3c8252029..f313c2819 100644 --- a/mysql-test/suite/tianmu/r/issue736.result +++ b/mysql-test/suite/tianmu/r/issue736.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue736_test; +CREATE DATABASE issue736_test; +USE issue736_test; CREATE TABLE t1(col1 INT, col2 CHAR(5))ENGINE=tianmu; INSERT INTO t1 VALUES(NULL,''),(1,'a'),(1,'b'),(1,'c'),(2,'dd'),(3,'eee'); INSERT INTO t1 VALUES(8,UNHEX('CEB2')); @@ -9,3 +11,4 @@ SELECT COUNT(DISTINCT col1) FROM t1; COUNT(DISTINCT col1) 4 DROP TABLE t1; +DROP DATABASE issue736_test; diff --git a/mysql-test/suite/tianmu/r/issue767.result b/mysql-test/suite/tianmu/r/issue767.result index 5f62a2344..4c40e33f5 100644 --- a/mysql-test/suite/tianmu/r/issue767.result +++ b/mysql-test/suite/tianmu/r/issue767.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue767_test; +CREATE DATABASE issue767_test; +USE issue767_test; create table t1(val int) ENGINE=tianmu; create table t2(val2 int) ENGINE=tianmu; insert into t1 values(0); @@ -150,3 +152,4 @@ val 43 drop table t1; drop table t2; +DROP DATABASE issue767_test; diff --git a/mysql-test/suite/tianmu/r/issue781.result b/mysql-test/suite/tianmu/r/issue781.result index 13ee37050..21de7c024 100644 --- a/mysql-test/suite/tianmu/r/issue781.result +++ b/mysql-test/suite/tianmu/r/issue781.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue781_test; +CREATE DATABASE issue781_test; +USE issue781_test; DROP TABLE IF EXISTS cs1; DROP TABLE IF EXISTS cs2; CREATE TABLE cs1 (d1 int, d2 int) ENGINE=TIANMU; @@ -2672,3 +2674,4 @@ DROP TABLE cs1; DROP TABLE cs2; CREATE TABLE cs1 (c1 JSON, c2 INT) ENGINE=TIANMU; ERROR HY000: Unsupported data type[json] +DROP DATABASE issue781_test; diff --git a/mysql-test/suite/tianmu/r/issue819.result b/mysql-test/suite/tianmu/r/issue819.result index 1ea17e69b..f8954180b 100644 --- a/mysql-test/suite/tianmu/r/issue819.result +++ b/mysql-test/suite/tianmu/r/issue819.result @@ -5,56 +5,56 @@ include/master-slave.inc # [on master] use test; -create table ttt(id int primary key,name varchar(5))engine=innodb; -insert into ttt values(1,'AAA'); -delete from ttt where id=1; -insert into ttt values(1,'aaa'); -select * from ttt; +create table t_issue819(id int primary key,name varchar(5))engine=innodb; +insert into t_issue819 values(1,'AAA'); +delete from t_issue819 where id=1; +insert into t_issue819 values(1,'aaa'); +select * from t_issue819; id name 1 aaa [on slave] include/sync_slave_sql_with_master.inc -select * from ttt; +select * from t_issue819; id name 1 aaa [on master] -drop table ttt; +drop table t_issue819; include/sync_slave_sql_with_master.inc [on master] -CREATE TABLE t1 (a int not null,b int not null)engine=innodb; -CREATE TABLE t2 (a int not null, b int not null, primary key (a,b))engine=innodb; -CREATE TABLE t3 (a int not null, b int not null, primary key (a,b))engine=innodb; -insert into t1 values (1,1),(2,1),(1,3); -insert into t2 values (1,1),(2,2),(3,3); -insert into t3 values (1,1),(2,1),(1,3); -delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; -select * from t1; +CREATE TABLE t_issue819_1 (a int not null,b int not null)engine=innodb; +CREATE TABLE t_issue819_2 (a int not null, b int not null, primary key (a,b))engine=innodb; +CREATE TABLE t_issue819_3 (a int not null, b int not null, primary key (a,b))engine=innodb; +insert into t_issue819_1 values (1,1),(2,1),(1,3); +insert into t_issue819_2 values (1,1),(2,2),(3,3); +insert into t_issue819_3 values (1,1),(2,1),(1,3); +delete t_issue819_2.*,t_issue819_3.* from t_issue819_1,t_issue819_2,t_issue819_3 where t_issue819_1.a=t_issue819_2.a AND t_issue819_2.b=t_issue819_3.a and t_issue819_1.b=t_issue819_3.b; +select * from t_issue819_1; a b 1 1 2 1 1 3 -select * from t2; +select * from t_issue819_2; a b 3 3 -select * from t3; +select * from t_issue819_3; a b [on slave] include/sync_slave_sql_with_master.inc -select * from t1; +select * from t_issue819_1; a b 1 1 2 1 1 3 -select * from t2; +select * from t_issue819_2; a b 3 3 -select * from t3; +select * from t_issue819_3; a b [on master] -drop table t1,t2,t3; +drop table t_issue819_1,t_issue819_2,t_issue819_3; include/sync_slave_sql_with_master.inc [on master] -CREATE TABLE t1 +CREATE TABLE t_issue819_1 ( place_id int (10), shows int(10), @@ -66,88 +66,88 @@ uclicks int(10), ts timestamp, PRIMARY KEY (place_id,ts) )engine=innodb; -INSERT INTO t1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) +INSERT INTO t_issue819_1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) VALUES (1,0,0,0,0,0,0,20000928174434); -UPDATE t1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; -select place_id,shows from t1; +UPDATE t_issue819_1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; +select place_id,shows from t_issue819_1; place_id shows 1 1 [on slave] include/sync_slave_sql_with_master.inc -select place_id,shows from t1; +select place_id,shows from t_issue819_1; place_id shows 1 1 [on master] -drop table t1; +drop table t_issue819_1; include/sync_slave_sql_with_master.inc # # Test the master-slave function of tianmu # [on master] use test; -create table ttt(id int primary key,name varchar(5))engine=tianmu; -insert into ttt values(1,'AAA'); -update ttt set name='hhhh' where id=1; -select * from ttt; +create table t_issue819(id int primary key,name varchar(5))engine=tianmu; +insert into t_issue819 values(1,'AAA'); +update t_issue819 set name='hhhh' where id=1; +select * from t_issue819; id name 1 hhhh [on slave] include/sync_slave_sql_with_master.inc -select * from ttt; +select * from t_issue819; id name 1 hhhh [on master] -drop table ttt; +drop table t_issue819; include/sync_slave_sql_with_master.inc [on master] -create table t1(id int primary key,name varchar(5))engine=tianmu; -insert into t1 values(1,'AAA'); -delete from t1 where id=1; -insert into t1 values(1,'aaa'); -select * from t1; +create table t_issue819_1(id int primary key,name varchar(5))engine=tianmu; +insert into t_issue819_1 values(1,'AAA'); +delete from t_issue819_1 where id=1; +insert into t_issue819_1 values(1,'aaa'); +select * from t_issue819_1; id name 1 aaa [on slave] include/sync_slave_sql_with_master.inc -select * from t1; +select * from t_issue819_1; id name 1 aaa [on master] -drop table t1; -CREATE TABLE t1 (a int not null,b int not null)engine=tianmu; -CREATE TABLE t2 (a int not null, b int not null, primary key (a,b))engine=tianmu; -CREATE TABLE t3 (a int not null, b int not null, primary key (a,b))engine=tianmu; -insert into t1 values (1,1),(2,1),(1,3); -insert into t2 values (1,1),(2,2),(3,3); -insert into t3 values (1,1),(2,1),(1,3); -delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; -select * from t1; +drop table t_issue819_1; +CREATE TABLE t_issue819_1 (a int not null,b int not null)engine=tianmu; +CREATE TABLE t_issue819_2 (a int not null, b int not null, primary key (a,b))engine=tianmu; +CREATE TABLE t_issue819_3 (a int not null, b int not null, primary key (a,b))engine=tianmu; +insert into t_issue819_1 values (1,1),(2,1),(1,3); +insert into t_issue819_2 values (1,1),(2,2),(3,3); +insert into t_issue819_3 values (1,1),(2,1),(1,3); +delete t_issue819_2.*,t_issue819_3.* from t_issue819_1,t_issue819_2,t_issue819_3 where t_issue819_1.a=t_issue819_2.a AND t_issue819_2.b=t_issue819_3.a and t_issue819_1.b=t_issue819_3.b; +select * from t_issue819_1; a b 1 1 2 1 1 3 -select * from t2; +select * from t_issue819_2; a b 3 3 -select * from t3; +select * from t_issue819_3; a b [on slave] include/sync_slave_sql_with_master.inc -select * from t1; +select * from t_issue819_1; a b 1 1 2 1 1 3 -select * from t2; +select * from t_issue819_2; a b 3 3 -select * from t3; +select * from t_issue819_3; a b [on master] -drop table t1,t2,t3; +drop table t_issue819_1,t_issue819_2,t_issue819_3; include/sync_slave_sql_with_master.inc [on master] -CREATE TABLE t1 +CREATE TABLE t_issue819_1 ( place_id int (10), shows int(10), @@ -159,24 +159,24 @@ uclicks int(10), ts timestamp, PRIMARY KEY (place_id,ts) )engine=tianmu; -INSERT INTO t1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) +INSERT INTO t_issue819_1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) VALUES (1,0,0,0,0,0,0,20000928174434); -UPDATE t1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; -select place_id,shows from t1; +UPDATE t_issue819_1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; +select place_id,shows from t_issue819_1; place_id shows 1 1 [on slave] include/sync_slave_sql_with_master.inc -select place_id,shows from t1; +select place_id,shows from t_issue819_1; place_id shows 1 1 [on master] -drop table t1; -create table t1 (s1 int); -create table t2 (s2 int); -insert into t1 values (1), (2); -insert into t2 values (2), (3); -create view v1 as select * from t1,t2 union all select * from t1,t2; +drop table t_issue819_1; +create table t_issue819_1 (s1 int); +create table t_issue819_2 (s2 int); +insert into t_issue819_1 values (1), (2); +insert into t_issue819_2 values (2), (3); +create view v1 as select * from t_issue819_1,t_issue819_2 union all select * from t_issue819_1,t_issue819_2; select * from v1; s1 s2 1 2 @@ -201,11 +201,11 @@ s1 s2 2 3 [on master] drop view v1; -drop tables t1, t2; -create table t1 (col1 int); -insert into t1 values (1); -create view v1 as select count(*) from t1; -insert into t1 values (null); +drop tables t_issue819_1, t_issue819_2; +create table t_issue819_1 (col1 int); +insert into t_issue819_1 values (1); +create view v1 as select count(*) from t_issue819_1; +insert into t_issue819_1 values (null); select * from v1; count(*) 2 @@ -216,21 +216,21 @@ count(*) 2 [on master] drop view v1; -drop table t1; -create table t1 (a int); -create table t2 (a int); -create view v1 as select a from t1; -create view v2 as select a from t2 where a in (select a from v1); +drop table t_issue819_1; +create table t_issue819_1 (a int); +create table t_issue819_2 (a int); +create view v1 as select a from t_issue819_1; +create view v2 as select a from t_issue819_2 where a in (select a from v1); show create view v2; View Create View character_set_client collation_connection -v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a` from `t2` where `t2`.`a` in (select `v1`.`a` from `v1`) latin1 latin1_swedish_ci +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t_issue819_2`.`a` AS `a` from `t_issue819_2` where `t_issue819_2`.`a` in (select `v1`.`a` from `v1`) latin1 latin1_swedish_ci [on slave] include/sync_slave_sql_with_master.inc show create view v2; View Create View character_set_client collation_connection -v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t2`.`a` AS `a` from `t2` where `t2`.`a` in (select `v1`.`a` from `v1`) latin1 latin1_swedish_ci +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t_issue819_2`.`a` AS `a` from `t_issue819_2` where `t_issue819_2`.`a` in (select `v1`.`a` from `v1`) latin1 latin1_swedish_ci [on master] drop view v2, v1; -drop table t1, t2; +drop table t_issue819_1, t_issue819_2; include/sync_slave_sql_with_master.inc stop slave; diff --git a/mysql-test/suite/tianmu/r/issue829.result b/mysql-test/suite/tianmu/r/issue829.result index 39f99b075..b7f7feb2f 100644 --- a/mysql-test/suite/tianmu/r/issue829.result +++ b/mysql-test/suite/tianmu/r/issue829.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS issue829_test; +CREATE DATABASE issue829_test; +USE issue829_test; CREATE TABLE t1 ( t1_tinyint TINYINT DEFAULT 0, @@ -72,3 +75,4 @@ t1_tinyint t1_int t1_bigint t1_decimal t1_text t1_char t1_varchar t1_datetime t1 1 -123456 -987654321 -122.32 zzzzzzzzzzzzzzzzzzzz bbb aaaaaaaaaaaaaaaaaaaa 1111-11-11 11:11:11 1 -123456 -987654321 -122.32 zzzzzzzzzzzzzzzzzzzz bbb aaaaaaaaaaaaaaaaaaaa 1111-11-13 11:11:11 0 -1023456 -887654321 -222.32 xxxxxxxxxxxxxxxxxxxx bbb bbbbbbbbbbbbbbbbbbbb 1111-11-11 11:11:11 1 -123456 -987654321 -122.32 zzzzzzzzzzzzzzzzzzzz bbb aaaaaaaaaaaaaaaaaaaa 1111-11-13 11:11:11 drop table t1 ,t2; +DROP DATABASE issue829_test; diff --git a/mysql-test/suite/tianmu/r/issue845.result b/mysql-test/suite/tianmu/r/issue845.result index e8f977544..fe4b447ac 100644 --- a/mysql-test/suite/tianmu/r/issue845.result +++ b/mysql-test/suite/tianmu/r/issue845.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue845_test; +CREATE DATABASE issue845_test; +USE issue845_test; DROP TABLE IF EXISTS test_timestamp; CREATE TABLE test_timestamp (t timestamp); INSERT INTO test_timestamp VALUES ('2019-01-02 00:01:02'), @@ -30,3 +32,4 @@ SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.000123'); EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.000123') 123 DROP TABLE test_timestamp; +DROP DATABASE issue845_test; diff --git a/mysql-test/suite/tianmu/r/issue852.result b/mysql-test/suite/tianmu/r/issue852.result index c2c6b9454..538781cc6 100644 --- a/mysql-test/suite/tianmu/r/issue852.result +++ b/mysql-test/suite/tianmu/r/issue852.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue852_test; +CREATE DATABASE issue852_test; +USE issue852_test; CREATE TABLE IF NOT EXISTS `lineorder_flat` ( `LO_ORDERDATE` date NOT NULL COMMENT '', `LO_ORDERKEY` int(11) NOT NULL COMMENT '', @@ -45,3 +47,4 @@ LO_ORDERDATE LO_ORDERKEY LO_LINENUMBER LO_CUSTKEY LO_PARTKEY LO_SUPPKEY LO_ORDER 1998-07-21 34 1 12202 88362 727 3-MEDIUM 0 13 1755468 5894967 0 1755468 81021 7 1998-09-14 REG AIR Customer#000012202 crWpqvyx4fOpC3IP JAPAN 5 JAPAN ASIA 22-437-209-5615 FURNITURE Supplier#000000727 HO,lDAVvCDTthJs3oYHW BRAZIL 4 BRAZIL AMERICA 12-815-316-3525 dim thistle MFGR#2 MFGR#23 MFGR#236 seashell ECONOMY POLISHED STEEL 39 WRAP BAG 1998-07-21 34 1 12202 88362 727 3-MEDIUM 0 13 1755468 5894967 0 1755468 81021 7 1998-09-14 REG AIR Customer#000012203 crWpqvyx4fOpC3IP JAPAN 5 JAPAN ASIA 22-437-209-5615 FURNITURE Supplier#000000727 HO,XDAVvCDTthJs3oYHW BRAZIL 4 BRAZIL AMERICA 12-815-316-3525 dim thistle MFGR#2 MFGR#23 MFGR#236 seashell ECONOMY POLISHED STEEL 49 WRAP BAG drop table lineorder_flat; +DROP DATABASE issue852_test; diff --git a/mysql-test/suite/tianmu/r/issue887.result b/mysql-test/suite/tianmu/r/issue887.result index 84201258d..6b899b36a 100644 --- a/mysql-test/suite/tianmu/r/issue887.result +++ b/mysql-test/suite/tianmu/r/issue887.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue887_test; +CREATE DATABASE issue887_test; +USE issue887_test; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 (a INT) ENGINE=TIANMU; CREATE TABLE t2 (a INT) ENGINE=TIANMU; @@ -514,3 +516,4 @@ a a a 4 4 3 4 4 4 DROP TABLE t1,t2,t3; +DROP DATABASE issue887_test; diff --git a/mysql-test/suite/tianmu/r/issue889.result b/mysql-test/suite/tianmu/r/issue889.result index 918a96eed..c0b23cf57 100644 --- a/mysql-test/suite/tianmu/r/issue889.result +++ b/mysql-test/suite/tianmu/r/issue889.result @@ -4,7 +4,7 @@ include/master-slave.inc # Multiple types # # connection master -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue889` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', `c_mediumint` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -23,41 +23,41 @@ CREATE TABLE `column_type_test` ( `c_text` text COMMENT 'text', `c_longblob` longblob COMMENT 'longblob' ) ENGINE=TIANMU; -insert into column_type_test +insert into t_issue889 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue889 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue889 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set c_smallint=200 where c_tinyint=100; -select * from column_type_test; +update t_issue889 set c_smallint=200 where c_tinyint=100; +select * from t_issue889; c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_date c_datetime c_timestamp c_time c_char c_varchar c_blob c_text c_longblob 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL # connection slave include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue889; c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_date c_datetime c_timestamp c_time c_char c_varchar c_blob c_text c_longblob 100 200 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL # connection master -delete from column_type_test where c_tinyint=100; -select * from column_type_test; +delete from t_issue889 where c_tinyint=100; +select * from t_issue889; c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_date c_datetime c_timestamp c_time c_char c_varchar c_blob c_text c_longblob 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL # connection slave include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue889; c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_date c_datetime c_timestamp c_time c_char c_varchar c_blob c_text c_longblob 101 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 102 100 100 100 100 5.2 10.88 100.08300 2016-02-25 2016-02-25 10:20:01 2007-04-23 08:12:49 10:20:01 stoneatom hello NULL bcdefghijklmn NULL # connection master -drop table column_type_test; +drop table t_issue889; include/sync_slave_sql_with_master.inc stop slave; diff --git a/mysql-test/suite/tianmu/r/issue906.result b/mysql-test/suite/tianmu/r/issue906.result index 3fe28c8db..5fe88b7c9 100644 --- a/mysql-test/suite/tianmu/r/issue906.result +++ b/mysql-test/suite/tianmu/r/issue906.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue906_test; +CREATE DATABASE issue906_test; +USE issue906_test; DROP TABLE IF EXISTS shop; CREATE TABLE shop ( article INT DEFAULT '0000' NOT NULL, @@ -116,3 +118,4 @@ article dealer price 3 D 1.25 4 D 19.95 DROP TABLE shop; +DROP DATABASE issue906_test; diff --git a/mysql-test/suite/tianmu/r/issue938.result b/mysql-test/suite/tianmu/r/issue938.result index d774a302c..37369b411 100644 --- a/mysql-test/suite/tianmu/r/issue938.result +++ b/mysql-test/suite/tianmu/r/issue938.result @@ -1,6 +1,10 @@ +DROP DATABASE IF EXISTS issue938_test; +CREATE DATABASE issue938_test; +USE issue938_test; SELECT group_concat(d1 ORDER BY d1) FROM (SELECT d1 FROM tb) a1; group_concat(d1 ORDER BY d1) 1234,56789012,1234567890123 SELECT group_concat(d1 ORDER BY d1) FROM tb; group_concat(d1 ORDER BY d1) 1234,56789012,1234567890123 +DROP DATABASE issue938_test; diff --git a/mysql-test/suite/tianmu/r/issue947.result b/mysql-test/suite/tianmu/r/issue947.result index d2d6b25e9..14dd5c529 100644 --- a/mysql-test/suite/tianmu/r/issue947.result +++ b/mysql-test/suite/tianmu/r/issue947.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue947_test; +CREATE DATABASE issue947_test; +USE issue947_test; DROP TABLE IF EXISTS test1,test2; CREATE TABLE test1 (a int) ENGINE=TIANMU; CREATE TABLE test2 (b int, c int) ENGINE=TIANMU; @@ -44,3 +46,4 @@ a SELECT * FROM test1 WHERE a IN ( SELECT b FROM test2 WHERE b NOT IN ( SELECT a FROM test1)); a DROP TABLE test1,test2; +DROP DATABASE issue947_test; diff --git a/mysql-test/suite/tianmu/r/issue956.result b/mysql-test/suite/tianmu/r/issue956.result index f3b4b401d..f37926828 100644 --- a/mysql-test/suite/tianmu/r/issue956.result +++ b/mysql-test/suite/tianmu/r/issue956.result @@ -9,10 +9,10 @@ include/sync_slave_sql_with_master.inc set global default_storage_engine=innodb; set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; [on master] -create table t1(c1 int,c2 varchar(255))engine=InnoDB; -show create table t1; +create table t_issue956(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue956 CREATE TABLE `t_issue956` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -26,17 +26,17 @@ Variable_name Value default_storage_engine InnoDB default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t1; +show create table t_issue956; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue956 CREATE TABLE `t_issue956` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 [on master] -alter table t1 engine=MyISAM; -show create table t1; +alter table t_issue956 engine=MyISAM; +show create table t_issue956; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue956 CREATE TABLE `t_issue956` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -49,14 +49,14 @@ Variable_name Value default_storage_engine InnoDB default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t1; +show create table t_issue956; Table Create Table -t1 CREATE TABLE `t1` ( +t_issue956 CREATE TABLE `t_issue956` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 [on master] -drop table t1; +drop table t_issue956; include/sync_slave_sql_with_master.inc # # sql_mode='MANDATORY_TIANMU' @@ -66,10 +66,10 @@ include/sync_slave_sql_with_master.inc set global default_storage_engine=innodb; set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU'; [on master] -create table t2(c1 int,c2 varchar(255))engine=InnoDB; -show create table t2; +create table t_issue956_2(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue956_2 CREATE TABLE `t_issue956_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -83,17 +83,17 @@ Variable_name Value default_storage_engine InnoDB default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t2; +show create table t_issue956_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue956_2 CREATE TABLE `t_issue956_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t2 engine=MyISAM; -show create table t2; +alter table t_issue956_2 engine=MyISAM; +show create table t_issue956_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue956_2 CREATE TABLE `t_issue956_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -106,14 +106,14 @@ Variable_name Value default_storage_engine InnoDB default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t2; +show create table t_issue956_2; Table Create Table -t2 CREATE TABLE `t2` ( +t_issue956_2 CREATE TABLE `t_issue956_2` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t2; +drop table t_issue956_2; include/sync_slave_sql_with_master.inc # # sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' @@ -123,10 +123,10 @@ include/sync_slave_sql_with_master.inc set global default_storage_engine=tianmu; set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; [on master] -create table t3(c1 int,c2 varchar(255))engine=InnoDB; -show create table t3; +create table t_issue956_3(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue956_3 CREATE TABLE `t_issue956_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -140,17 +140,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t3; +show create table t_issue956_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue956_3 CREATE TABLE `t_issue956_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t3 engine=MyISAM; -show create table t3; +alter table t_issue956_3 engine=MyISAM; +show create table t_issue956_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue956_3 CREATE TABLE `t_issue956_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -163,14 +163,14 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t3; +show create table t_issue956_3; Table Create Table -t3 CREATE TABLE `t3` ( +t_issue956_3 CREATE TABLE `t_issue956_3` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t3; +drop table t_issue956_3; include/sync_slave_sql_with_master.inc # # sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU' @@ -180,10 +180,10 @@ include/sync_slave_sql_with_master.inc set global default_storage_engine=tianmu; set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU'; [on master] -create table t4(c1 int,c2 varchar(255))engine=InnoDB; -show create table t4; +create table t_issue956_4(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -197,17 +197,17 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -alter table t4 engine=MyISAM; -show create table t4; +alter table t_issue956_4 engine=MyISAM; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -220,14 +220,14 @@ Variable_name Value default_storage_engine TIANMU default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=TIANMU DEFAULT CHARSET=latin1 [on master] -drop table t4; +drop table t_issue956_4; include/sync_slave_sql_with_master.inc # # sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' @@ -237,10 +237,10 @@ include/sync_slave_sql_with_master.inc set global default_storage_engine=MyISAM; set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; [on master] -create table t4(c1 int,c2 varchar(255))engine=InnoDB; -show create table t4; +create table t_issue956_4(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -254,17 +254,17 @@ Variable_name Value default_storage_engine MyISAM default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 [on master] -alter table t4 engine=MyISAM; -show create table t4; +alter table t_issue956_4 engine=MyISAM; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -277,13 +277,13 @@ Variable_name Value default_storage_engine MyISAM default_tmp_storage_engine InnoDB internal_tmp_disk_storage_engine InnoDB -show create table t4; +show create table t_issue956_4; Table Create Table -t4 CREATE TABLE `t4` ( +t_issue956_4 CREATE TABLE `t_issue956_4` ( `c1` int(11) DEFAULT NULL, `c2` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 [on master] -drop table t4; +drop table t_issue956_4; include/sync_slave_sql_with_master.inc stop slave; diff --git a/mysql-test/suite/tianmu/r/issue959.result b/mysql-test/suite/tianmu/r/issue959.result index 5eda282bb..9e52dee69 100644 --- a/mysql-test/suite/tianmu/r/issue959.result +++ b/mysql-test/suite/tianmu/r/issue959.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue959_test; +CREATE DATABASE issue959_test; +USE issue959_test; DROP TABLE IF EXISTS device_delta_collect; CREATE TABLE device_delta_collect ( @@ -409,3 +411,4 @@ reportTime deviceId multiple deltaJgs 2022-08-22 22:33:58 +0 1 1 2022-08-22 22:33:58 -0 1 1 DROP TABLE device_delta_collect; +DROP DATABASE issue959_test; diff --git a/mysql-test/suite/tianmu/r/issue964.result b/mysql-test/suite/tianmu/r/issue964.result index 731491277..6505e9a49 100644 --- a/mysql-test/suite/tianmu/r/issue964.result +++ b/mysql-test/suite/tianmu/r/issue964.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue964_test; +CREATE DATABASE issue964_test; +USE issue964_test; DROP TABLE IF EXISTS t1,t2; CREATE TABLE `t1` ( `id` int(11) DEFAULT NULL, @@ -26,3 +28,4 @@ t1.name IN ('abc'); id name id name 1 abc NULL NULL DROP TABLE t1,t2; +DROP DATABASE issue964_test; diff --git a/mysql-test/suite/tianmu/r/issue971.result b/mysql-test/suite/tianmu/r/issue971.result index 4d46bf381..a39eff2e8 100644 --- a/mysql-test/suite/tianmu/r/issue971.result +++ b/mysql-test/suite/tianmu/r/issue971.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue971_test; +CREATE DATABASE issue971_test; +USE issue971_test; set global tianmu_index_search=on; DROP TABLE IF EXISTS tt1,tt2; CREATE TABLE tt1(id INT PRIMARY KEY,name VARCHAR(5),copy_id INT) ENGINE=TIANMU; @@ -43,3 +45,4 @@ id name copy_id 5 CCC 5 set global tianmu_index_search=off; DROP TABLE tt1,tt2; +DROP DATABASE issue971_test; diff --git a/mysql-test/suite/tianmu/r/issue975.result b/mysql-test/suite/tianmu/r/issue975.result index 69f2259e1..ce68726d5 100644 --- a/mysql-test/suite/tianmu/r/issue975.result +++ b/mysql-test/suite/tianmu/r/issue975.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue975_test; +CREATE DATABASE issue975_test; +USE issue975_test; CREATE TABLE t1 (date CHAR(30), format CHAR(30)) engine=tianmu default CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO t1 VALUES ('10:20:10', '%H:%i:%s'), @@ -25,3 +27,4 @@ show variables like '%sql_mode%'; Variable_name Value sql_mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION drop table t1; +DROP DATABASE issue975_test; diff --git a/mysql-test/suite/tianmu/r/issue985.result b/mysql-test/suite/tianmu/r/issue985.result index f36166cbc..3c93b90db 100644 --- a/mysql-test/suite/tianmu/r/issue985.result +++ b/mysql-test/suite/tianmu/r/issue985.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issue985_test; +CREATE DATABASE issue985_test; +USE issue985_test; create table t1(a int not null,b int not null) default CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; insert into t1 values (1,2); show create table t1; @@ -22,3 +24,4 @@ t1 CREATE TABLE `t1` ( `b` int(11) NOT NULL ) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='测试表' drop table t1; +DROP DATABASE issue985_test; diff --git a/mysql-test/suite/tianmu/r/issue995.result b/mysql-test/suite/tianmu/r/issue995.result index 1e2079a0e..f2e54b829 100644 --- a/mysql-test/suite/tianmu/r/issue995.result +++ b/mysql-test/suite/tianmu/r/issue995.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue995_test; +CREATE DATABASE issue995_test; +USE issue995_test; CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE); INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL), ('a', 12, '1212-12-12', 1.19691E+100), @@ -13,3 +15,4 @@ CONVERT(c, TIME) 00:00:00 15:15:15 DROP TABLE t1; +DROP DATABASE issue995_test; diff --git a/mysql-test/suite/tianmu/r/issue998.result b/mysql-test/suite/tianmu/r/issue998.result index ca39b0c54..b9edfe8ae 100644 --- a/mysql-test/suite/tianmu/r/issue998.result +++ b/mysql-test/suite/tianmu/r/issue998.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue998_test; +CREATE DATABASE issue998_test; +USE issue998_test; DROP TABLE IF EXISTS t1,t2; CREATE TABLE t1 (t1_int INT, t1_char CHAR(5)) ENGINE=TIANMU; CREATE TABLE t2 (t2_int INT, t2_char CHAR(5)) ENGINE=TIANMU; @@ -141,3 +143,4 @@ NULL aaa DROP TABLE t1,t2; +DROP DATABASE issue998_test; diff --git a/mysql-test/suite/tianmu/r/issue_566.result b/mysql-test/suite/tianmu/r/issue_566.result index 6388ccfb7..85a48421f 100644 --- a/mysql-test/suite/tianmu/r/issue_566.result +++ b/mysql-test/suite/tianmu/r/issue_566.result @@ -1,4 +1,6 @@ -USE test; +DROP DATABASE IF EXISTS issue_566_test; +CREATE DATABASE issue_566_test; +USE issue_566_test; CREATE TABLE `lineitem_i342` ( `l_orderkey` int(11) NOT NULL, `l_partkey` int(11) NOT NULL, @@ -47,3 +49,4 @@ supplier_no total_revenue 99271 18210.2270 drop view revenue_i05; drop table lineitem_i342; +DROP DATABASE issue_566_test; diff --git a/mysql-test/suite/tianmu/r/issues_tx417.result b/mysql-test/suite/tianmu/r/issues_tx417.result index 1f17375a4..7d3a3b19f 100644 --- a/mysql-test/suite/tianmu/r/issues_tx417.result +++ b/mysql-test/suite/tianmu/r/issues_tx417.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS issues_tx417_test; +CREATE DATABASE issues_tx417_test; +USE issues_tx417_test; show variables like 'tianmu_insert_delayed'; Variable_name Value tianmu_insert_delayed OFF @@ -25,3 +27,4 @@ id 1 2 DROP TABLE t_test; +DROP DATABASE issues_tx417_test; diff --git a/mysql-test/suite/tianmu/r/lz4.result b/mysql-test/suite/tianmu/r/lz4.result index c5cc10278..151838b8e 100644 --- a/mysql-test/suite/tianmu/r/lz4.result +++ b/mysql-test/suite/tianmu/r/lz4.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS lz4_test; +CREATE DATABASE lz4_test; +USE lz4_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'lz4', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'lz4', @@ -36,3 +38,4 @@ c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_dat 103 103 103 103 103 5.2 10.88 103.08300 2016-02-25 2016-02-25 10:20:01 2016-02-25 05:20:01 10:20:01 stoneatom hello NULL bcdefghijklmn NULL 104 104 104 104 104 5.2 10.88 104.08300 2016-02-25 2016-02-25 10:20:01 2016-02-25 05:20:01 10:20:01 stoneatom hello NULL bcdefghijklmn NULL drop table column_type_test; +DROP DATABASE lz4_test; diff --git a/mysql-test/suite/tianmu/r/orquery.result b/mysql-test/suite/tianmu/r/orquery.result index 6ee2cf116..24ef807db 100644 --- a/mysql-test/suite/tianmu/r/orquery.result +++ b/mysql-test/suite/tianmu/r/orquery.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS orquery_test; +CREATE DATABASE orquery_test; +USE orquery_test; CREATE TABLE `test_or` ( `id` int(11) DEFAULT NULL, `age` int(11) DEFAULT NULL @@ -9,3 +11,4 @@ select count(*) from test_or where id=1 or age=2; count(*) 2 drop table test_or; +DROP DATABASE orquery_test; diff --git a/mysql-test/suite/tianmu/r/orquery1.result b/mysql-test/suite/tianmu/r/orquery1.result index 60ab0c03f..5b3b7d948 100644 --- a/mysql-test/suite/tianmu/r/orquery1.result +++ b/mysql-test/suite/tianmu/r/orquery1.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS orquery1_test; +CREATE DATABASE orquery1_test; +USE orquery1_test; CREATE TABLE `test_or` ( `id` int(11) DEFAULT NULL, `name` varchar(11) DEFAULT NULL @@ -9,3 +11,4 @@ select count(*) from test_or where id=1 or name='2'; count(*) 2 drop table test_or; +DROP DATABASE orquery1_test; diff --git a/mysql-test/suite/tianmu/r/replace.result b/mysql-test/suite/tianmu/r/replace.result index 2ca904ea6..ee6adb2e1 100644 --- a/mysql-test/suite/tianmu/r/replace.result +++ b/mysql-test/suite/tianmu/r/replace.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS replace_test; +CREATE DATABASE replace_test; +USE replace_test; drop table if exists test1; CREATE TABLE test1 ( id INT NOT NULL AUTO_INCREMENT, @@ -54,3 +57,4 @@ id data ts 2 Old 2014-08-20 18:47:00 1 NewNewNew 2014-08-20 18:55:55 drop table test1; +DROP DATABASE replace_test; diff --git a/mysql-test/suite/tianmu/r/select_from.result b/mysql-test/suite/tianmu/r/select_from.result index c927cf3ac..f63b23323 100644 --- a/mysql-test/suite/tianmu/r/select_from.result +++ b/mysql-test/suite/tianmu/r/select_from.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS select_from_test; +CREATE DATABASE select_from_test; +USE select_from_test; # # Test select from # @@ -79,7 +82,7 @@ id c1 c2 c3 3 NULL NULL 2001-05-03 drop table if exists t2_test; Warnings: -Note 1051 Unknown table 'test.t2_test' +Note 1051 Unknown table 'select_from_test.t2_test' create table t2_test ( idx int, i1 int, @@ -205,3 +208,4 @@ q10 9 q10 10 drop table t2_test; drop table t1_test; +DROP DATABASE select_from_test; diff --git a/mysql-test/suite/tianmu/r/temporary.result b/mysql-test/suite/tianmu/r/temporary.result index 47c6ade1c..07814c39e 100644 --- a/mysql-test/suite/tianmu/r/temporary.result +++ b/mysql-test/suite/tianmu/r/temporary.result @@ -1,3 +1,6 @@ +DROP DATABASE IF EXISTS temporary_test; +CREATE DATABASE temporary_test; +USE temporary_test; # #create temporary...like... # @@ -62,3 +65,4 @@ ALTER TABLE `@0023sql2` RENAME `#sql2`; INSERT INTO `#sql2` VALUES (2); DROP TABLE `#sql2`; CREATE TEMPORARY TABLE `tt+1` (c1 INT)engine=tianmu; +DROP DATABASE temporary_test; diff --git a/mysql-test/suite/tianmu/r/truncate.result b/mysql-test/suite/tianmu/r/truncate.result index b2a6ddffb..6c5398398 100644 --- a/mysql-test/suite/tianmu/r/truncate.result +++ b/mysql-test/suite/tianmu/r/truncate.result @@ -1,4 +1,6 @@ -use test; +DROP DATABASE IF EXISTS truncate_test; +CREATE DATABASE truncate_test; +USE truncate_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -50,3 +52,4 @@ select * from column_type_test; c_tinyint c_smallint c_mediumint c_int c_bigint c_float c_double c_decimal c_date c_datetime c_timestamp c_time c_char c_varchar c_blob c_text c_longblob 105 105 105 105 105 5.2 10.88 105.08300 2016-02-25 2016-02-25 10:20:01 2016-02-25 05:20:01 10:20:01 stoneatom hello NULL bcdefghijklmn NULL drop table column_type_test; +DROP DATABASE truncate_test; diff --git a/mysql-test/suite/tianmu/t/add_column.test b/mysql-test/suite/tianmu/t/add_column.test index dde7f9d9a..c7071e6c1 100644 --- a/mysql-test/suite/tianmu/t/add_column.test +++ b/mysql-test/suite/tianmu/t/add_column.test @@ -1,3 +1,12 @@ +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS add_column_test; +--enable_warnings + +CREATE DATABASE add_column_test; + +USE add_column_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', @@ -28,3 +37,5 @@ insert into column_type_test(c_tinyint,c_smallint,c_mediumint,c_int,c_bigint,c_f values(105,105,105,105,105,5.2,10.88,105.083,'2016-02-25','2016-02-25 10:20:01','2016-02-25 05:20:01','10:20:01','stoneatom','hello','bcdefghijklmn',105); select count(*) from column_type_test; drop table column_type_test; + +DROP DATABASE add_column_test; diff --git a/mysql-test/suite/tianmu/t/alter_table.test b/mysql-test/suite/tianmu/t/alter_table.test index fefe4147b..a407f068a 100644 --- a/mysql-test/suite/tianmu/t/alter_table.test +++ b/mysql-test/suite/tianmu/t/alter_table.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS alter_table_test; +--enable_warnings + +CREATE DATABASE alter_table_test; + +USE alter_table_test; + # #ALTER TABLE table_name MODIFY ... # @@ -54,3 +62,5 @@ show create table t_test; alter table t_test modify sex smallint(5); show create table t_test; + +DROP DATABASE alter_table_test; diff --git a/mysql-test/suite/tianmu/t/alter_table_mix_use.test b/mysql-test/suite/tianmu/t/alter_table_mix_use.test index 8e66f49dd..0ba236267 100644 --- a/mysql-test/suite/tianmu/t/alter_table_mix_use.test +++ b/mysql-test/suite/tianmu/t/alter_table_mix_use.test @@ -1,10 +1,16 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS alter_table_mix_use_test; +--enable_warnings + +CREATE DATABASE alter_table_mix_use_test; + +USE alter_table_mix_use_test; + # #ALTER TABLE table_name NOT NULL to NULL or NULL to NOT NULL ... # -create database alter_table_mix; -use alter_table_mix; CREATE TABLE `alter_table_mix_test` ( `c_tinyint` tinyint DEFAULT NULL COMMENT 'tinyint', @@ -82,3 +88,4 @@ values(105,105,105,105,105,5.2,10.88,105.083,'2016-02-25','2016-02-25 10:20:01', show create table alter_table_rename_drop; +DROP DATABASE alter_table_mix_use_test; diff --git a/mysql-test/suite/tianmu/t/casewhen.test b/mysql-test/suite/tianmu/t/casewhen.test index 1e236dc87..8b74524d5 100644 --- a/mysql-test/suite/tianmu/t/casewhen.test +++ b/mysql-test/suite/tianmu/t/casewhen.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS casewhen_test; +--enable_warnings + +CREATE DATABASE casewhen_test; + +USE casewhen_test; + CREATE TABLE `test_case1` ( `id` int(11) DEFAULT NULL, `age` int(11) DEFAULT NULL, @@ -7,3 +16,4 @@ CREATE TABLE `test_case1` ( select id,case age when 2 then '1' else name end from test_case1; drop table test_case1; +DROP DATABASE casewhen_test; diff --git a/mysql-test/suite/tianmu/t/concat.test b/mysql-test/suite/tianmu/t/concat.test index 9d222a0f1..dacd88355 100644 --- a/mysql-test/suite/tianmu/t/concat.test +++ b/mysql-test/suite/tianmu/t/concat.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS concat_test; +--enable_warnings + +CREATE DATABASE concat_test; + +USE concat_test; + CREATE TABLE `test_case` ( `id` int(11) DEFAULT NULL, `name` text @@ -9,3 +18,4 @@ insert into test_case values(3,'test3'); select concat(id,name) from test_case; drop table test_case; +DROP DATABASE concat_test; diff --git a/mysql-test/suite/tianmu/t/create_drop_users.test b/mysql-test/suite/tianmu/t/create_drop_users.test index e581fa8aa..c682bcfcc 100644 --- a/mysql-test/suite/tianmu/t/create_drop_users.test +++ b/mysql-test/suite/tianmu/t/create_drop_users.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS create_drop_users_test; +--enable_warnings + +CREATE DATABASE create_drop_users_test; + +USE create_drop_users_test; + --echo # --echo # Test create and drop users --echo # Author: shiz @@ -41,3 +49,4 @@ DROP USER 'user'@'%'; DROP USER 'user'@'localhost'; DROP USER 'user'@'127.0.0.1'; +DROP DATABASE create_drop_users_test; diff --git a/mysql-test/suite/tianmu/t/create_index.test b/mysql-test/suite/tianmu/t/create_index.test index a65a18ed3..f07d34fa5 100644 --- a/mysql-test/suite/tianmu/t/create_index.test +++ b/mysql-test/suite/tianmu/t/create_index.test @@ -1,7 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS create_index_test; +--enable_warnings + +CREATE DATABASE create_index_test; + +USE create_index_test; + create table t1 (f1 binary(5)) engine=innodb; insert into t1 values ('w'), ('w'); --error ER_DUP_ENTRY create unique index index_t1 on t1(f1(4)); drop table t1; + +DROP DATABASE create_index_test; diff --git a/mysql-test/suite/tianmu/t/delete.test b/mysql-test/suite/tianmu/t/delete.test index 6a40c88d0..c6d4db5ee 100644 --- a/mysql-test/suite/tianmu/t/delete.test +++ b/mysql-test/suite/tianmu/t/delete.test @@ -1,10 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS delete_test; +--enable_warnings + +CREATE DATABASE delete_test; + +USE delete_test; + --echo # --echo # DELETE FROM TABLE_NAME WHERE ... --echo # -use test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -225,7 +232,6 @@ delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; select * from t3; drop table t1,t2,t3; - # # deleting '0000-00-00' values using IS NULL # @@ -293,3 +299,5 @@ insert into t1 values(1,'hhhb'); delete tbIn,t1 from tbIn,t1 where tbIn.c1=t1.c1 and tbIn.c1=1; drop table tbIn,t1; + +DROP DATABASE delete_test; diff --git a/mysql-test/suite/tianmu/t/delete_all_rows.test b/mysql-test/suite/tianmu/t/delete_all_rows.test index bf0ac9ff8..27a2170e5 100644 --- a/mysql-test/suite/tianmu/t/delete_all_rows.test +++ b/mysql-test/suite/tianmu/t/delete_all_rows.test @@ -1,10 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS delete_all_rows_test; +--enable_warnings + +CREATE DATABASE delete_all_rows_test; + +USE delete_all_rows_test; + --echo # --echo # DELETE FROM TABLE_NAME --echo # -use test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -99,7 +106,6 @@ DELETE from t1; SET AUTOCOMMIT=1; drop table t1; - --echo # --echo # Adds some test cases for unicode. such as insert unicode chars, in values, table name, or etc. --echo # @@ -120,3 +126,5 @@ SET AUTOCOMMIT=0; DELETE from t1; SET AUTOCOMMIT=1; drop table t1; + +DROP DATABASE delete_all_rows_test; diff --git a/mysql-test/suite/tianmu/t/drop_column.test b/mysql-test/suite/tianmu/t/drop_column.test index 994d75435..58dfab0cc 100644 --- a/mysql-test/suite/tianmu/t/drop_column.test +++ b/mysql-test/suite/tianmu/t/drop_column.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS drop_column_test; +--enable_warnings + +CREATE DATABASE drop_column_test; + +USE drop_column_test; + CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -22,3 +31,4 @@ alter table column_type_test drop column c_char; show create table column_type_test; drop table column_type_test; +DROP DATABASE drop_column_test; diff --git a/mysql-test/suite/tianmu/t/flow_control_function.test b/mysql-test/suite/tianmu/t/flow_control_function.test index 542af7588..c542dca6e 100644 --- a/mysql-test/suite/tianmu/t/flow_control_function.test +++ b/mysql-test/suite/tianmu/t/flow_control_function.test @@ -1,3 +1,13 @@ +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS flow_control_function_test; +--enable_warnings + +CREATE DATABASE flow_control_function_test; + +USE flow_control_function_test; + --echo # --echo # Flow control function,Based on the test --echo # @@ -32,3 +42,5 @@ SELECT IFNULL(1,0); --echo #nullif SELECT NULLIF (2,1); SELECT NULLIF (2,2); + +DROP DATABASE flow_control_function_test; diff --git a/mysql-test/suite/tianmu/t/func_math.test b/mysql-test/suite/tianmu/t/func_math.test index dd233ed22..f4468ba52 100644 --- a/mysql-test/suite/tianmu/t/func_math.test +++ b/mysql-test/suite/tianmu/t/func_math.test @@ -1,4 +1,13 @@ --source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS func_math_test; +--enable_warnings + +CREATE DATABASE func_math_test; + +USE func_math_test; + create table t1 (f1 varchar(32) not null, f2 smallint(5) unsigned not null, @@ -163,3 +172,5 @@ select a-b from t1; --error 1690 select cast((a-b) as unsigned) from t2; drop table t1, t2; + +DROP DATABASE func_math_test; diff --git a/mysql-test/suite/tianmu/t/group_concat.test b/mysql-test/suite/tianmu/t/group_concat.test index d4564bc8a..5629f3b71 100644 --- a/mysql-test/suite/tianmu/t/group_concat.test +++ b/mysql-test/suite/tianmu/t/group_concat.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS group_concat_test; +--enable_warnings + +CREATE DATABASE group_concat_test; + +USE group_concat_test; + CREATE TABLE `test_groupconcat_case` ( `id` int(11) DEFAULT NULL, `name` text @@ -16,3 +25,4 @@ select id,group_concat(name order by name desc SEPARATOR ":") from test_groupcon select id,group_concat(distinct name SEPARATOR ":") from test_groupconcat_case group by id; drop table test_groupconcat_case; +DROP DATABASE group_concat_test; diff --git a/mysql-test/suite/tianmu/t/group_concat2.test b/mysql-test/suite/tianmu/t/group_concat2.test index 6fa54bf0c..c0fb355f3 100644 --- a/mysql-test/suite/tianmu/t/group_concat2.test +++ b/mysql-test/suite/tianmu/t/group_concat2.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS group_concat2_test; +--enable_warnings + +CREATE DATABASE group_concat2_test; + +USE group_concat2_test; + CREATE TABLE `test_groupconcat2_case` ( `id` int(11) DEFAULT NULL, `val` int(11) @@ -7,4 +16,6 @@ insert into test_groupconcat2_case values(1, 22); insert into test_groupconcat2_case values(1, 4); select id,group_concat(val order by val desc SEPARATOR " ") from test_groupconcat2_case group by id; select id,group_concat(distinct val SEPARATOR ":") from test_groupconcat2_case group by id; -drop table test_groupconcat2_case; \ No newline at end of file +drop table test_groupconcat2_case; + +DROP DATABASE group_concat2_test; diff --git a/mysql-test/suite/tianmu/t/insert.test b/mysql-test/suite/tianmu/t/insert.test index 9d1a01831..d54f3b8a2 100644 --- a/mysql-test/suite/tianmu/t/insert.test +++ b/mysql-test/suite/tianmu/t/insert.test @@ -4,11 +4,11 @@ --echo #Insert values for different types of fields --echo # --disable_warnings -DROP DATABASE IF EXISTS insert_db; +DROP DATABASE IF EXISTS insert_test; --enable_warnings -CREATE DATABASE insert_db; -USE insert_db; +CREATE DATABASE insert_test; +USE insert_test; CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -111,13 +111,13 @@ drop table t1; --disable_warnings drop database if exists mysqltest; --enable_warnings -create database mysqltest; -use mysqltest; +create database mysqltest_insert_test; +use mysqltest_insert_test; create table t1 (c int); -insert into mysqltest.t1 set mysqltest.t1.c = '1'; -drop database mysqltest; -use test; +insert into mysqltest_insert_test.t1 set mysqltest_insert_test.t1.c = '1'; +drop database mysqltest_insert_test; +use insert_test; --echo # --echo # Test of wrong values for float data @@ -472,4 +472,4 @@ SELECT * FROM t1; DROP VIEW v1, v2; DROP TABLE t1; # Clean UP -DROP DATABASE insert_db; +DROP DATABASE insert_test; diff --git a/mysql-test/suite/tianmu/t/issue1000.test b/mysql-test/suite/tianmu/t/issue1000.test index 96bc2e57a..a9568cb12 100644 --- a/mysql-test/suite/tianmu/t/issue1000.test +++ b/mysql-test/suite/tianmu/t/issue1000.test @@ -1,103 +1,112 @@ ---source include/have_tianmu.inc - -use test; ---echo # ---echo # Test of skip lines syntax ---echo # -CREATE TABLE `tmp_loaddata` ( -`id` int(11) NOT NULL, -`name` varchar(100) DEFAULT NULL, -PRIMARY KEY (`id`) -) ENGINE=tianmu; - ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 1 lines; -select * from tmp_loaddata; -truncate table tmp_loaddata; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 2 lines; -select * from tmp_loaddata; -truncate table tmp_loaddata; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 3 lines; -select * from tmp_loaddata; -truncate table tmp_loaddata; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 4 lines; -select * from tmp_loaddata; - ---echo # ---echo # Test of specified syntax ---echo # -CREATE TABLE `tmp_loaddata2` ( -`id1` int(11) NOT NULL, -`id2` int(11) NOT NULL, -PRIMARY KEY (`id1`) -) ENGINE=tianmu; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata2 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata2 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); - -select * from tmp_loaddata2; ---echo # ---echo # Test of set syntax ---echo # -CREATE TABLE `tmp_loaddata3` ( -`id1` int(11) NOT NULL, -`id2` int(11) NOT NULL, -PRIMARY KEY (`id1`) -) ENGINE=tianmu; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata3 FIELDS TERMINATED BY ',' ignore 1 lines(id1,@var1) set id2 = @var1 +100 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata3 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); -select * from tmp_loaddata3; - ---echo # ---echo # Test of default ---echo # -CREATE TABLE `tmp_loaddata4` ( -`id1` int(11) NOT NULL, -`id2` int(11) NOT NULL, -`id3` int(11) default 9, -PRIMARY KEY (`id1`) -) ENGINE=tianmu; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata4 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata4 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); -select * from tmp_loaddata4; - ---echo # ---echo # Test of auto-increment ---echo # -CREATE TABLE `tmp_loaddata5` ( -`id` int auto_increment primary key, -`id1` int NOT NULL, -`id2` int NOT NULL, -`id3` int default 6 -) ENGINE=tianmu; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata5 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata5 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); -select * from tmp_loaddata5; - ---echo # ---echo # Test of this case ---echo # -create temporary table error_log (row int auto_increment primary key, suspicious int default 1, file_name varchar(255), line varchar(1024) default null )engine=tianmu; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data infile '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000.txt' into table error_log fields terminated by 'xykls37' escaped by '' ignore 1 lines (line) set file_name='/home/Code/GitHub/stonedb/build/install/mysql-test/var/log/mysqld.2.err'; -select * from error_log; - ---echo # ---echo # Clean Resource ---echo # -drop table tmp_loaddata; -drop table tmp_loaddata2; -drop table tmp_loaddata3; -drop table tmp_loaddata4; -drop table tmp_loaddata5; -drop table error_log; \ No newline at end of file +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue1000_test; +--enable_warnings + +CREATE DATABASE issue1000_test; + +USE issue1000_test; + +--echo # +--echo # Test of skip lines syntax +--echo # +CREATE TABLE `tmp_loaddata` ( +`id` int(11) NOT NULL, +`name` varchar(100) DEFAULT NULL, +PRIMARY KEY (`id`) +) ENGINE=tianmu; + +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 1 lines; +select * from tmp_loaddata; +truncate table tmp_loaddata; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 2 lines; +select * from tmp_loaddata; +truncate table tmp_loaddata; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 3 lines; +select * from tmp_loaddata; +truncate table tmp_loaddata; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-1.txt' Into TABLE tmp_loaddata FIELDS TERMINATED BY ',' ignore 4 lines; +select * from tmp_loaddata; + +--echo # +--echo # Test of specified syntax +--echo # +CREATE TABLE `tmp_loaddata2` ( +`id1` int(11) NOT NULL, +`id2` int(11) NOT NULL, +PRIMARY KEY (`id1`) +) ENGINE=tianmu; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata2 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata2 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); + +select * from tmp_loaddata2; +--echo # +--echo # Test of set syntax +--echo # +CREATE TABLE `tmp_loaddata3` ( +`id1` int(11) NOT NULL, +`id2` int(11) NOT NULL, +PRIMARY KEY (`id1`) +) ENGINE=tianmu; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata3 FIELDS TERMINATED BY ',' ignore 1 lines(id1,@var1) set id2 = @var1 +100 ; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata3 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); +select * from tmp_loaddata3; + +--echo # +--echo # Test of default +--echo # +CREATE TABLE `tmp_loaddata4` ( +`id1` int(11) NOT NULL, +`id2` int(11) NOT NULL, +`id3` int(11) default 9, +PRIMARY KEY (`id1`) +) ENGINE=tianmu; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata4 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata4 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); +select * from tmp_loaddata4; + +--echo # +--echo # Test of auto-increment +--echo # +CREATE TABLE `tmp_loaddata5` ( +`id` int auto_increment primary key, +`id1` int NOT NULL, +`id2` int NOT NULL, +`id3` int default 6 +) ENGINE=tianmu; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata5 FIELDS TERMINATED BY ',' ignore 1 lines(id1,id2); +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000-2.txt' Into TABLE tmp_loaddata5 FIELDS TERMINATED BY ',' ignore 1 lines(id2,id1); +select * from tmp_loaddata5; + +--echo # +--echo # Test of this case +--echo # +create temporary table error_log (row int auto_increment primary key, suspicious int default 1, file_name varchar(255), line varchar(1024) default null )engine=tianmu; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval load data infile '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue1000.txt' into table error_log fields terminated by 'xykls37' escaped by '' ignore 1 lines (line) set file_name='/home/Code/GitHub/stonedb/build/install/mysql-test/var/log/mysqld.2.err'; +select * from error_log; + +--echo # +--echo # Clean Resource +--echo # +drop table tmp_loaddata; +drop table tmp_loaddata2; +drop table tmp_loaddata3; +drop table tmp_loaddata4; +drop table tmp_loaddata5; +drop table error_log; + +DROP DATABASE issue1000_test; diff --git a/mysql-test/suite/tianmu/t/issue1034.test b/mysql-test/suite/tianmu/t/issue1034.test index c3a3b1a96..17bfbf1f7 100644 --- a/mysql-test/suite/tianmu/t/issue1034.test +++ b/mysql-test/suite/tianmu/t/issue1034.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue1034_test; +--enable_warnings + +CREATE DATABASE issue1034_test; + +USE issue1034_test; --disable_warnings @@ -184,7 +190,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id int, name VARCHAR(255), age int) ENGINE=TIANMU; @@ -203,7 +208,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id int) ENGINE=TIANMU; @@ -213,7 +217,6 @@ ALTER TABLE t1 ADD PRIMARY KEY(id), ALGORITHM=INPLACE; DROP TABLE t1; - ## test with enable the tianmu PRIMARY KEY index set global tianmu_index_search=on; @@ -394,7 +397,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id int, name VARCHAR(255), age int) ENGINE=TIANMU; @@ -413,7 +415,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id int) ENGINE=TIANMU; @@ -423,7 +424,6 @@ ALTER TABLE t1 ADD PRIMARY KEY(id) USING BTREE, ALGORITHM=INPLACE; DROP TABLE t1; - ## test with enable the tianmu PRIMARY KEY index set global tianmu_index_search=on; @@ -604,7 +604,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id int, name VARCHAR(255), age int) ENGINE=TIANMU; @@ -623,7 +622,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id int) ENGINE=TIANMU; @@ -633,7 +631,6 @@ ALTER TABLE t1 ADD PRIMARY KEY(id) USING HASH, ALGORITHM=INPLACE; DROP TABLE t1; - ## test with enable the tianmu PRIMARY KEY index set global tianmu_index_search=on; @@ -814,7 +811,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id VARCHAR(255), name VARCHAR(255), age int) ENGINE=TIANMU; @@ -833,7 +829,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id VARCHAR(255)) ENGINE=TIANMU; @@ -843,7 +838,6 @@ ALTER TABLE t1 ADD PRIMARY KEY(id), ALGORITHM=INPLACE; DROP TABLE t1; - ## test with enable the tianmu PRIMARY KEY index set global tianmu_index_search=on; @@ -1024,7 +1018,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id VARCHAR(255), name VARCHAR(255), age int) ENGINE=TIANMU; @@ -1043,7 +1036,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id VARCHAR(255)) ENGINE=TIANMU; @@ -1053,7 +1045,6 @@ ALTER TABLE t1 ADD PRIMARY KEY(id) USING BTREE, ALGORITHM=INPLACE; DROP TABLE t1; - ## test with enable the tianmu PRIMARY KEY index set global tianmu_index_search=on; @@ -1234,7 +1225,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## multi primary key CREATE TABLE t1 (id VARCHAR(255), name VARCHAR(255), age int) ENGINE=TIANMU; @@ -1253,7 +1243,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=COPY; DROP TABLE t1; - ## ERROR for ALGORITHM=INPLACE CREATE TABLE t1 (id VARCHAR(255)) ENGINE=TIANMU; @@ -1263,3 +1252,4 @@ ALTER TABLE t1 ADD PRIMARY KEY(id) USING HASH, ALGORITHM=INPLACE; DROP TABLE t1; +DROP DATABASE issue1034_test; diff --git a/mysql-test/suite/tianmu/t/issue1054.test b/mysql-test/suite/tianmu/t/issue1054.test index 86d1e9892..5229471bd 100644 --- a/mysql-test/suite/tianmu/t/issue1054.test +++ b/mysql-test/suite/tianmu/t/issue1054.test @@ -9,10 +9,10 @@ --echo [on master] connection master; --disable_warnings -drop table if exists `column_type_test`; +drop table if exists `t_issue1054`; --enable_warnings -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -32,32 +32,32 @@ CREATE TABLE `column_type_test` ( `show` longblob COMMENT 'longblob' ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -drop table column_type_test; +drop table t_issue1054; --source include/sync_slave_sql_with_master.inc @@ -69,7 +69,7 @@ drop table column_type_test; --echo [on master] connection master; -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -90,32 +90,32 @@ CREATE TABLE `column_type_test` ( UNIQUE (`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -drop table column_type_test; +drop table t_issue1054; --source include/sync_slave_sql_with_master.inc @@ -126,7 +126,7 @@ drop table column_type_test; --echo [on master] connection master; -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -147,32 +147,32 @@ CREATE TABLE `column_type_test` ( primary key(`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -drop table column_type_test; +drop table t_issue1054; --source include/sync_slave_sql_with_master.inc --echo # @@ -190,7 +190,7 @@ if (`show variables like "debug"`) --echo [on master] connection master; -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `usage` tinyint(4) COMMENT 'tinyint', `use` smallint(6) DEFAULT NULL COMMENT 'smallint', `update` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -211,32 +211,32 @@ CREATE TABLE `column_type_test` ( primary key(`usage`) ) engine=tianmu; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `use`=200 where `usage`=100; -select * from column_type_test; +update t_issue1054 set `use`=200 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -delete from column_type_test where `usage`=100; -select * from column_type_test; +delete from t_issue1054 where `usage`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -drop table column_type_test; +drop table t_issue1054; --source include/sync_slave_sql_with_master.inc --echo # @@ -246,7 +246,7 @@ drop table column_type_test; --echo [on master] connection master; -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue1054` ( `abc def` tinyint(4) COMMENT 'tinyint', `пусто` smallint(6) DEFAULT NULL COMMENT 'smallint', `новое` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -266,32 +266,32 @@ CREATE TABLE `column_type_test` ( `sho*w` longblob COMMENT 'longblob' ) engine=innodb; -insert into column_type_test +insert into t_issue1054 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue1054 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set `пусто`=200 where `abc def`=100; -select * from column_type_test; +update t_issue1054 set `пусто`=200 where `abc def`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -delete from column_type_test where `abc def`=100; -select * from column_type_test; +delete from t_issue1054 where `abc def`=100; +select * from t_issue1054; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue1054; --echo [on master] connection master; -drop table column_type_test; +drop table t_issue1054; --source include/sync_slave_sql_with_master.inc stop slave; \ No newline at end of file diff --git a/mysql-test/suite/tianmu/t/issue1065.test b/mysql-test/suite/tianmu/t/issue1065.test index 539913d6a..e6bafaa48 100644 --- a/mysql-test/suite/tianmu/t/issue1065.test +++ b/mysql-test/suite/tianmu/t/issue1065.test @@ -1,6 +1,13 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue1065_test; +--enable_warnings + +CREATE DATABASE issue1065_test; + +USE issue1065_test; + --disable_warnings set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; --enable_warnings @@ -18,7 +25,6 @@ CREATE TABLE t_test( PRIMARY KEY (`id`) ) engine=tianmu; - DELIMITER //; create PROCEDURE add_user(in num INT) BEGIN @@ -49,7 +55,6 @@ DELIMITER ;// drop PROCEDURE add_user; - --disable_warnings set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU'; --enable_warnings @@ -120,7 +125,6 @@ drop PROCEDURE add_user; drop table t_test; - CREATE TABLE t_test( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(10) NOT NULL, @@ -200,3 +204,5 @@ DELIMITER ;// drop PROCEDURE add_user; drop table t_test; + +DROP DATABASE issue1065_test; diff --git a/mysql-test/suite/tianmu/t/issue1070.test b/mysql-test/suite/tianmu/t/issue1070.test index 6e999bc61..9f2351708 100644 --- a/mysql-test/suite/tianmu/t/issue1070.test +++ b/mysql-test/suite/tianmu/t/issue1070.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue1070_test; +--enable_warnings + +CREATE DATABASE issue1070_test; + +USE issue1070_test; create table t_issue1070(id int,name varchar(5)) engine=tianmu DEFAULT CHARSET=utf8mb4; insert into t_issue1070 values(1,x'E5BCA0E4B889'),(2,x'E69D8EE59B9B'); @@ -11,3 +17,5 @@ select hex(name) from t_issue1070; alter table t_issue1070 convert to character set utf8mb4; select hex(name) from t_issue1070; drop table t_issue1070; + +DROP DATABASE issue1070_test; diff --git a/mysql-test/suite/tianmu/t/issue1090.test b/mysql-test/suite/tianmu/t/issue1090.test index 66088141c..2394db5f4 100644 --- a/mysql-test/suite/tianmu/t/issue1090.test +++ b/mysql-test/suite/tianmu/t/issue1090.test @@ -16,26 +16,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t1(c1 int,c2 varchar(255)); -show create table t1; +create table t_issue1090(c1 int,c2 varchar(255)); +show create table t_issue1090; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show variables like '%_engine'; -show create table t1; +show create table t_issue1090; --echo [on master] connection master; -alter table t1 add c3 int; -show create table t1; +alter table t_issue1090 add c3 int; +show create table t_issue1090; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t1; +show create table t_issue1090; --echo [on master] connection master; -drop table t1; +drop table t_issue1090; --source include/sync_slave_sql_with_master.inc @@ -49,26 +49,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t2(c1 int,c2 varchar(255)); -show create table t2; +create table t_issue1090_2(c1 int,c2 varchar(255)); +show create table t_issue1090_2; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show variables like '%_engine'; -show create table t2; +show create table t_issue1090_2; --echo [on master] connection master; -alter table t2 add c3 int; -show create table t2; +alter table t_issue1090_2 add c3 int; +show create table t_issue1090_2; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t2; +show create table t_issue1090_2; --echo [on master] connection master; -drop table t2; +drop table t_issue1090_2; --source include/sync_slave_sql_with_master.inc --echo # @@ -82,26 +82,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t3(c1 int,c2 varchar(255)); -show create table t3; +create table t_issue1090_3(c1 int,c2 varchar(255)); +show create table t_issue1090_3; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t3; +show create table t_issue1090_3; --echo [on master] connection master; -alter table t3 add c3 int; -show create table t3; +alter table t_issue1090_3 add c3 int; +show create table t_issue1090_3; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t3; +show create table t_issue1090_3; --echo [on master] connection master; -drop table t3; +drop table t_issue1090_3; --source include/sync_slave_sql_with_master.inc --echo # @@ -117,25 +117,25 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t4(c1 int,c2 varchar(255)); -show create table t4; +create table t_issue1090_4(c1 int,c2 varchar(255)); +show create table t_issue1090_4; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue1090_4; --echo [on master] connection master; -alter table t4 DROP COLUMN c2; -show create table t4; +alter table t_issue1090_4 DROP COLUMN c2; +show create table t_issue1090_4; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue1090_4; --echo [on master] connection master; -drop table t4; +drop table t_issue1090_4; --source include/sync_slave_sql_with_master.inc stop slave; \ No newline at end of file diff --git a/mysql-test/suite/tianmu/t/issue1107.test b/mysql-test/suite/tianmu/t/issue1107.test index ffa0399bc..2f5476a43 100644 --- a/mysql-test/suite/tianmu/t/issue1107.test +++ b/mysql-test/suite/tianmu/t/issue1107.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue1107_test; +--enable_warnings + +CREATE DATABASE issue1107_test; + +USE issue1107_test; --disable_warnings @@ -52,3 +58,4 @@ select a.ID, DROP TABLE A; DROP TABLE B; +DROP DATABASE issue1107_test; diff --git a/mysql-test/suite/tianmu/t/issue222.test b/mysql-test/suite/tianmu/t/issue222.test index 07992dec8..9cc604da9 100644 --- a/mysql-test/suite/tianmu/t/issue222.test +++ b/mysql-test/suite/tianmu/t/issue222.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue222_test; +--enable_warnings + +CREATE DATABASE issue222_test; + +USE issue222_test; + create table $tt (a$1 int, $b int, c$ int) engine=tianmu; insert into $tt values (1,2,3); select a$1, $b, c$ from $tt; drop table $tt; + +DROP DATABASE issue222_test; diff --git a/mysql-test/suite/tianmu/t/issue226.test b/mysql-test/suite/tianmu/t/issue226.test index 67d92158e..7017a449c 100644 --- a/mysql-test/suite/tianmu/t/issue226.test +++ b/mysql-test/suite/tianmu/t/issue226.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue226_test; +--enable_warnings + +CREATE DATABASE issue226_test; + +USE issue226_test; + --disable_warnings DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; @@ -11,3 +20,5 @@ INSERT INTO t2 VALUES ('c'); SELECT * FROM t2; DROP TABLE t1; DROP TABLE t2; + +DROP DATABASE issue226_test; diff --git a/mysql-test/suite/tianmu/t/issue228.test b/mysql-test/suite/tianmu/t/issue228.test index e29d80a75..311f446ed 100644 --- a/mysql-test/suite/tianmu/t/issue228.test +++ b/mysql-test/suite/tianmu/t/issue228.test @@ -1,4 +1,12 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue228_test; +--enable_warnings + +CREATE DATABASE issue228_test; + +USE issue228_test; --disable_warnings drop table if exists t1; @@ -7,3 +15,5 @@ drop table if exists t1; create table t1 (a varchar(112) charset utf8 collate utf8_bin not null,primary key (a)) select 'test' as a ; select a from t1; drop table t1; + +DROP DATABASE issue228_test; diff --git a/mysql-test/suite/tianmu/t/issue270.test b/mysql-test/suite/tianmu/t/issue270.test index 330006f3d..f654eb357 100644 --- a/mysql-test/suite/tianmu/t/issue270.test +++ b/mysql-test/suite/tianmu/t/issue270.test @@ -1,10 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue270_test; +--enable_warnings + +CREATE DATABASE issue270_test; + +USE issue270_test; + --echo # --echo # Explain select straight_join DISTINCT.The rows in the test result is incorrect (#270) --echo # -use test; --disable_warnings DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; @@ -25,3 +32,4 @@ t2.b like '%%' order by t2.b limit 0,1; drop table t1,t2,t3; +DROP DATABASE issue270_test; diff --git a/mysql-test/suite/tianmu/t/issue271.test b/mysql-test/suite/tianmu/t/issue271.test index 0fd37fa15..f250b1d32 100644 --- a/mysql-test/suite/tianmu/t/issue271.test +++ b/mysql-test/suite/tianmu/t/issue271.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue271_test; +--enable_warnings + +CREATE DATABASE issue271_test; + +USE issue271_test; --disable_warnings @@ -66,7 +72,6 @@ SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; DROP TABLE test1; - # CHARACTER ascii ## DDL @@ -127,7 +132,6 @@ SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; DROP TABLE test1; - # CHARACTER gb18030 ## DDL @@ -188,7 +192,6 @@ SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; DROP TABLE test1; - # CHARACTER gdk ## DDL @@ -249,3 +252,4 @@ SHOW LOCAL VARIABLES LIKE 'SQL_MODE'; DROP TABLE test1; +DROP DATABASE issue271_test; diff --git a/mysql-test/suite/tianmu/t/issue281.test b/mysql-test/suite/tianmu/t/issue281.test index 2e2ecc934..c0634b40a 100644 --- a/mysql-test/suite/tianmu/t/issue281.test +++ b/mysql-test/suite/tianmu/t/issue281.test @@ -1,4 +1,12 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue281_test; +--enable_warnings + +CREATE DATABASE issue281_test; + +USE issue281_test; --disable_warnings @@ -9,3 +17,5 @@ SELECT * FROM t1 WHERE f1 IS NULL; SELECT * FROM t1 WHERE f1 IS NOT NULL; SELECT * FROM t1; DROP TABLE t1; + +DROP DATABASE issue281_test; diff --git a/mysql-test/suite/tianmu/t/issue282.test b/mysql-test/suite/tianmu/t/issue282.test index 1b865e30a..44bacacb6 100644 --- a/mysql-test/suite/tianmu/t/issue282.test +++ b/mysql-test/suite/tianmu/t/issue282.test @@ -1,6 +1,13 @@ --source include/have_tianmu.inc -use test; +--disable_warnings +DROP DATABASE IF EXISTS issue282_test; +--enable_warnings + +CREATE DATABASE issue282_test; + +USE issue282_test; + CREATE TABLE issue282_t1 (sku int PRIMARY KEY, pr int)engine=tianmu; CREATE TABLE issue282_t2 (sku int PRIMARY KEY, sppr int, name varchar(255))engine=tianmu; @@ -53,4 +60,6 @@ SELECT issue282_t2.sku, issue282_t2.sppr, issue282_t2.name, issue282_t1.sku, iss (issue282_t2.sku=issue282_t1.sku OR issue282_t2.sppr=issue282_t1.sku)); -drop table issue282_t1 ,issue282_t2; \ No newline at end of file +drop table issue282_t1 ,issue282_t2; + +DROP DATABASE issue282_test; diff --git a/mysql-test/suite/tianmu/t/issue301.test b/mysql-test/suite/tianmu/t/issue301.test index 9209fc0bd..9b350bfec 100644 --- a/mysql-test/suite/tianmu/t/issue301.test +++ b/mysql-test/suite/tianmu/t/issue301.test @@ -1,4 +1,12 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue301_test; +--enable_warnings + +CREATE DATABASE issue301_test; + +USE issue301_test; --disable_warnings drop table if exists t1; @@ -45,14 +53,12 @@ select * from t1 where ((((1=2) or (3=3)) and (3!=1)) or ((1>1) and (5=a))); drop table t1; - CREATE TABLE t1 (a INT NOT NULL, b INT)engine=tianmu; INSERT INTO t1 VALUES (1, 1); SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2; drop table t1; - create table t1 (id int, value int) engine=tianmu; create table t2 (id int, value int) engine=tianmu; @@ -66,7 +72,6 @@ select * from t1 where id <=> value or value<=>id; drop table t1,t2; - SET NAMES utf8; CREATE TABLE diaries ( created_at datetime, @@ -88,7 +93,6 @@ SELECT * DROP TABLE diaries; - CREATE TABLE tags ( name VARCHAR(16) NOT NULL, KEY index_name (name) @@ -111,7 +115,6 @@ SELECT * FROM tags WHERE 1 = 1 and name != ""; DROP TABLE tags; - CREATE TABLE t1(c1 VARCHAR(10), c2 VARCHAR(10), c3 TINYINT) engine=tianmu; INSERT INTO t1 VALUES ('a','b',0), ('a','b',1), ('a','b',2), ('a','b',3), ('a','b',4), ('a','b',5), ('a','b',6), ('a','b',7), ('a','b',8), ('a','b',9); SELECT c1,c2,c3 FROM t1 ORDER BY c3 DESC LIMIT 1; @@ -155,7 +158,6 @@ SELECT c1,c2,c3 FROM t1 WHERE c3=(SELECT MAX(c3) FROM t1); SELECT c1,c2,c3 FROM t1 WHERE c3=(SELECT MAX(t11.c3) FROM t1 AS t11 WHERE t1.c1 = t11.c1); DROP TABLE t1; - CREATE TABLE t1 (t1_int INT, t1_char CHAR(5)) ENGINE=TIANMU; CREATE TABLE t2 (t2_int INT, t2_char CHAR(5)) ENGINE=TIANMU; CREATE TABLE t3 (t3_int INT, t3_char CHAR(5)) ENGINE=TIANMU; @@ -184,7 +186,6 @@ SELECT t4_int FROM t4 WHERE NOT EXISTS (SELECT t2_int FROM t2 WHERE t4.t4_int = DROP TABLE t1,t2,t3,t4; - CREATE TABLE t1 (c1 INT, c2 CHAR(100)) ENGINE=TIANMU; INSERT INTO t1 VALUES (null,null); INSERT INTO t1 VALUES (1,''); @@ -238,5 +239,4 @@ t2.c2); DROP TABLE t1; DROP TABLE t2; - - +DROP DATABASE issue301_test; diff --git a/mysql-test/suite/tianmu/t/issue342.test b/mysql-test/suite/tianmu/t/issue342.test index 103c3caa6..e09ef02b7 100644 --- a/mysql-test/suite/tianmu/t/issue342.test +++ b/mysql-test/suite/tianmu/t/issue342.test @@ -1,4 +1,13 @@ -USE test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue342_test; +--enable_warnings + +CREATE DATABASE issue342_test; + +USE issue342_test; + CREATE TABLE `lineitem_i342` ( `l_orderkey` int(11) NOT NULL, `l_partkey` int(11) NOT NULL, @@ -34,3 +43,5 @@ CREATE VIEW revenue_i342 AS SELECT l_suppkey AS supplier_no, sum(l_extendedprice SELECT * FROM revenue_i342 ORDER BY supplier_no; DROP VIEW revenue_i342; DROP TABLE lineitem_i342; + +DROP DATABASE issue342_test; diff --git a/mysql-test/suite/tianmu/t/issue362.test b/mysql-test/suite/tianmu/t/issue362.test index 7254a31c1..6963b4cc4 100644 --- a/mysql-test/suite/tianmu/t/issue362.test +++ b/mysql-test/suite/tianmu/t/issue362.test @@ -1,7 +1,18 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue362_test; +--enable_warnings + +CREATE DATABASE issue362_test; + +USE issue362_test; + CREATE TABLE `abcÿdef` (i int)engine=tianmu; INSERT INTO `abcÿdef` VALUES (1); INSERT INTO abcÿdef VALUES (2); SELECT * FROM `abcÿdef`; SELECT * FROM abcÿdef; DROP TABLE `abcÿdef`; + +DROP DATABASE issue362_test; diff --git a/mysql-test/suite/tianmu/t/issue364.test b/mysql-test/suite/tianmu/t/issue364.test index ed87bc1ed..55a018411 100644 --- a/mysql-test/suite/tianmu/t/issue364.test +++ b/mysql-test/suite/tianmu/t/issue364.test @@ -1,4 +1,13 @@ -USE test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue364_test; +--enable_warnings + +CREATE DATABASE issue364_test; + +USE issue364_test; + CREATE TABLE `t_test1`( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(10) NOT NULL, @@ -28,3 +37,5 @@ SELECT id FROM t_test2; DROP TRIGGER insert_trigger_t_test2; DROP TABLE t_test2; DROP TABLE t_test1; + +DROP DATABASE issue364_test; diff --git a/mysql-test/suite/tianmu/t/issue405.test b/mysql-test/suite/tianmu/t/issue405.test index 004b4b573..7521f1d44 100644 --- a/mysql-test/suite/tianmu/t/issue405.test +++ b/mysql-test/suite/tianmu/t/issue405.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue405_test; +--enable_warnings + +CREATE DATABASE issue405_test; + +USE issue405_test; + create table timehi (val time) ENGINE=TIANMU; insert into timehi values ('00:00:00'), ('01:15:39'), ('09:11:12'), ('20:30:29'); select * from timehi where val >= '08:02:45'; drop table timehi; + +DROP DATABASE issue405_test; diff --git a/mysql-test/suite/tianmu/t/issue415.test b/mysql-test/suite/tianmu/t/issue415.test index 9b477acaf..0fdaba24a 100644 --- a/mysql-test/suite/tianmu/t/issue415.test +++ b/mysql-test/suite/tianmu/t/issue415.test @@ -1,10 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue415_test; +--enable_warnings + +CREATE DATABASE issue415_test; + +USE issue415_test; + --echo # --echo # fix issue415 --echo # -use test; CREATE TABLE `select_base_with_primary_key` ( `pk` bigint(11) NOT NULL AUTO_INCREMENT, `varchar_test` varchar(255) DEFAULT NULL, @@ -27,3 +34,5 @@ CREATE TABLE `select_base_with_primary_key` ( insert into select_base_with_primary_key values (11, 'abcde', 123, 'char', 3, 1, 23, 32, 332, 1.4, 25, '2017-11-11', '11:11:11', '2017-11-11 11:11:11','2017-11-11 11:11:11', 2017); select 'aa' as ag_column1, !( tinyint_1bit_test )as ag_column2, 1 as ag_column3,min((smallint_test + smallint_test) =11)as ag_column_fun from select_base_with_primary_key GROUP BY ag_column1,ag_column2 asc,ag_column3 having ag_column_fun<= 37 order by ag_column1 ,ag_column2 asc,ag_column3 asc,ag_column_fun; drop table select_base_with_primary_key; + +DROP DATABASE issue415_test; diff --git a/mysql-test/suite/tianmu/t/issue417.test b/mysql-test/suite/tianmu/t/issue417.test index 5eab37e46..d7ce4ec2c 100644 --- a/mysql-test/suite/tianmu/t/issue417.test +++ b/mysql-test/suite/tianmu/t/issue417.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue417_test; +--enable_warnings + +CREATE DATABASE issue417_test; + +USE issue417_test; + create table ttime (val time) ENGINE=TIANMU; insert into ttime values ('12:15:03'), ('18:30:20'); select (val between '12:00:00' and '12:30:00') as agval from ttime; drop table ttime; + +DROP DATABASE issue417_test; diff --git a/mysql-test/suite/tianmu/t/issue429.test b/mysql-test/suite/tianmu/t/issue429.test index 74b331505..6ecdeb2a9 100644 --- a/mysql-test/suite/tianmu/t/issue429.test +++ b/mysql-test/suite/tianmu/t/issue429.test @@ -1,6 +1,17 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue429_test; +--enable_warnings + +CREATE DATABASE issue429_test; + +USE issue429_test; + create table tt (val time) ENGINE=TIANMU; insert into tt values ('06:34:12'), ('13:23:33'); select * from tt where DATE(TIMESTAMP(val)) = CURDATE(); select * from tt where DATE(TIMESTAMP(val, val)) = CURDATE(); drop table tt; + +DROP DATABASE issue429_test; diff --git a/mysql-test/suite/tianmu/t/issue430.test b/mysql-test/suite/tianmu/t/issue430.test index 90a88cd82..2dfd76884 100644 --- a/mysql-test/suite/tianmu/t/issue430.test +++ b/mysql-test/suite/tianmu/t/issue430.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue430_test; +--enable_warnings + +CREATE DATABASE issue430_test; + +USE issue430_test; + create table tt2 (a tinyint(4), b smallint(6), c bigint(20)) ENGINE=TIANMU; insert into tt2 values (15, 20, 18), (1, 6, 4); select (a/b)/c as agf from tt2 group by agf; drop table tt2; + +DROP DATABASE issue430_test; diff --git a/mysql-test/suite/tianmu/t/issue431.test b/mysql-test/suite/tianmu/t/issue431.test index 6e5adba64..a6ab5c33e 100644 --- a/mysql-test/suite/tianmu/t/issue431.test +++ b/mysql-test/suite/tianmu/t/issue431.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue431_test; +--enable_warnings + +CREATE DATABASE issue431_test; + +USE issue431_test; + create table tt(a int, b int) ENGINE=TIANMU; insert into tt values (3, 4); select * from tt where (a >= 3) AND (b = 5 AND a > 2 OR 0); drop table tt; + +DROP DATABASE issue431_test; diff --git a/mysql-test/suite/tianmu/t/issue441.test b/mysql-test/suite/tianmu/t/issue441.test index 9d0eda2eb..315ba3d27 100644 --- a/mysql-test/suite/tianmu/t/issue441.test +++ b/mysql-test/suite/tianmu/t/issue441.test @@ -1,4 +1,13 @@ -USE test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue441_test; +--enable_warnings + +CREATE DATABASE issue441_test; + +USE issue441_test; + CREATE TEMPORARY TABLE `t_test1`( `id` INT NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(10) NOT NULL, @@ -11,3 +20,5 @@ PRIMARY KEY (`id`) INSERT INTO t_test1 values(1,'张','三','1',100,1); SELECT id FROM t_test1; DROP TABLE t_test1; + +DROP DATABASE issue441_test; diff --git a/mysql-test/suite/tianmu/t/issue464.test b/mysql-test/suite/tianmu/t/issue464.test index 56d0b7cef..fe5909392 100644 --- a/mysql-test/suite/tianmu/t/issue464.test +++ b/mysql-test/suite/tianmu/t/issue464.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue464_test; +--enable_warnings + +CREATE DATABASE issue464_test; + +USE issue464_test; + create table tt (date_test DATE, time_test TIME, datetime_test DATETIME, timestamp_test TIMESTAMP, year_test YEAR) ENGINE=TIANMU; insert into tt values ('2017-12-07', '02:03:04', '2017-12-08 05:06:07', '2018-11-08 09:10:11', '2020'); select DATE(date_test) from tt; @@ -33,3 +42,5 @@ select TIME_TO_SEC(time_test), TO_DAYS(date_test) from tt; select TO_SECONDS(date_test), TO_SECONDS(datetime_test) from tt; select YEAR(date_test) from tt; drop table tt; + +DROP DATABASE issue464_test; diff --git a/mysql-test/suite/tianmu/t/issue467.test b/mysql-test/suite/tianmu/t/issue467.test index 8f3565935..db64395a9 100644 --- a/mysql-test/suite/tianmu/t/issue467.test +++ b/mysql-test/suite/tianmu/t/issue467.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue467_test; +--enable_warnings + +CREATE DATABASE issue467_test; + +USE issue467_test; + create table tt (date_test date) ENGINE=TIANMU; insert into tt values ('2010-02-22'); select * from tt where (date_test<='2003-04-05')AND (date_test>='2011-06-22')OR (date_test<='2012-12-13' ); drop table tt; + +DROP DATABASE issue467_test; diff --git a/mysql-test/suite/tianmu/t/issue468.test b/mysql-test/suite/tianmu/t/issue468.test index 90da1e423..30a763100 100644 --- a/mysql-test/suite/tianmu/t/issue468.test +++ b/mysql-test/suite/tianmu/t/issue468.test @@ -1,6 +1,17 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue468_test; +--enable_warnings + +CREATE DATABASE issue468_test; + +USE issue468_test; + create table tt (e1 int, e2 int, e3 int, e4 int, e5 int, e6 int, e7 int, e8 int, e9 int) ENGINE=TIANMU; insert into tt values (1,1,1,0,0,0,0,1,0); select * from tt where (e1 AND ((e2 AND e3 AND (e4 OR e5)) OR e6) OR (e7 AND e8 AND e9)); select * from tt where (e1 AND ((e2 AND e3 AND (e4 OR e5)) OR 0) OR (e7 AND e8 AND e9)); drop table tt; + +DROP DATABASE issue468_test; diff --git a/mysql-test/suite/tianmu/t/issue469.test b/mysql-test/suite/tianmu/t/issue469.test index 813f4418c..4cbb12c20 100644 --- a/mysql-test/suite/tianmu/t/issue469.test +++ b/mysql-test/suite/tianmu/t/issue469.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue469_test; +--enable_warnings + +CREATE DATABASE issue469_test; + +USE issue469_test; + create table tt (v1 int, v2 int, v3 int) ENGINE=TIANMU; insert into tt values (20, 30, 40); select * from tt where (v1 = 20) OR ((v1 <=> 80) OR (v2 = 70) AND (v3 = 60)) AND (1); drop table tt; + +DROP DATABASE issue469_test; diff --git a/mysql-test/suite/tianmu/t/issue475.test b/mysql-test/suite/tianmu/t/issue475.test index a30fbf6ec..e05981d51 100644 --- a/mysql-test/suite/tianmu/t/issue475.test +++ b/mysql-test/suite/tianmu/t/issue475.test @@ -1,5 +1,16 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue475_test; +--enable_warnings + +CREATE DATABASE issue475_test; + +USE issue475_test; + create table jl (date_test date) ENGINE=TIANMU; insert into jl values ('2015-11-12'); select ADDTIME(date_test, '1 1:1:1.00002') from jl; drop table jl; + +DROP DATABASE issue475_test; diff --git a/mysql-test/suite/tianmu/t/issue487.test b/mysql-test/suite/tianmu/t/issue487.test index ac83d5eb7..4eaea39fb 100644 --- a/mysql-test/suite/tianmu/t/issue487.test +++ b/mysql-test/suite/tianmu/t/issue487.test @@ -1,4 +1,14 @@ --source include/have_tianmu.inc -use test; + +--disable_warnings +DROP DATABASE IF EXISTS issue487_test; +--enable_warnings + +CREATE DATABASE issue487_test; + +USE issue487_test; + -- error 1030 create table `#mysql50#q.q` (f1 int primary key) engine=tianmu; + +DROP DATABASE issue487_test; diff --git a/mysql-test/suite/tianmu/t/issue496.test b/mysql-test/suite/tianmu/t/issue496.test index ead66a2d1..e23b46711 100644 --- a/mysql-test/suite/tianmu/t/issue496.test +++ b/mysql-test/suite/tianmu/t/issue496.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue496_test; +--enable_warnings + +CREATE DATABASE issue496_test; + +USE issue496_test; + create table t1 (id int, name varchar(10) comment "LOOKUP") ENGINE=TIANMU; insert into t1 values (1, 'one'); insert into t1 values (2, 'one'); @@ -7,3 +16,5 @@ insert into t1 values (4, 'one'); update t1 set name='two' where id=2; select * from t1; drop table t1; + +DROP DATABASE issue496_test; diff --git a/mysql-test/suite/tianmu/t/issue502.test b/mysql-test/suite/tianmu/t/issue502.test index 99b2727d0..529671a93 100644 --- a/mysql-test/suite/tianmu/t/issue502.test +++ b/mysql-test/suite/tianmu/t/issue502.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue502_test; +--enable_warnings + +CREATE DATABASE issue502_test; + +USE issue502_test; + CREATE TABLE `auto_20` ( `pk` bigint(11) NOT NULL AUTO_INCREMENT, `varchar_test` varchar(255) DEFAULT NULL, @@ -9,3 +18,5 @@ insert into auto_20(varchar_test) values('aaaa'); insert into auto_20(varchar_test) values('bbb'); select * from auto_20; drop table auto_20; + +DROP DATABASE issue502_test; diff --git a/mysql-test/suite/tianmu/t/issue515.test b/mysql-test/suite/tianmu/t/issue515.test index c916ad5e5..fb14f794b 100644 --- a/mysql-test/suite/tianmu/t/issue515.test +++ b/mysql-test/suite/tianmu/t/issue515.test @@ -1,6 +1,17 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue515_test; +--enable_warnings + +CREATE DATABASE issue515_test; + +USE issue515_test; + create table timetest (val timestamp) ENGINE=TIANMU; insert into timetest values ('2010-02-22 18:35:23'); select val not between '2010-02-22 18:35:23' and '2015-11-23 08:02:45' from (select * from timetest) as A; select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A; drop table timetest; + +DROP DATABASE issue515_test; diff --git a/mysql-test/suite/tianmu/t/issue538.test b/mysql-test/suite/tianmu/t/issue538.test index dbd906d85..d778851ba 100644 --- a/mysql-test/suite/tianmu/t/issue538.test +++ b/mysql-test/suite/tianmu/t/issue538.test @@ -1,9 +1,17 @@ +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue538_test; +--enable_warnings + +CREATE DATABASE issue538_test; + +USE issue538_test; + --echo # --echo # issue 538 test for user defined function of tianmu --echo # -use test; - --disable_warnings # User-defined function parameter table data query @@ -253,3 +261,5 @@ SELECT sfunc(2); DROP TABLE tf; DROP FUNCTION sfunc; + +DROP DATABASE issue538_test; diff --git a/mysql-test/suite/tianmu/t/issue581.test b/mysql-test/suite/tianmu/t/issue581.test index 88fef0f13..aa3d54432 100644 --- a/mysql-test/suite/tianmu/t/issue581.test +++ b/mysql-test/suite/tianmu/t/issue581.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue581_test; +--enable_warnings + +CREATE DATABASE issue581_test; + +USE issue581_test; --disable_warnings @@ -52,5 +58,4 @@ SELECT * FROM t2; DROP TABLE IF EXISTS t1,t2; - - +DROP DATABASE issue581_test; diff --git a/mysql-test/suite/tianmu/t/issue656.test b/mysql-test/suite/tianmu/t/issue656.test index bf3ff9122..259006957 100644 --- a/mysql-test/suite/tianmu/t/issue656.test +++ b/mysql-test/suite/tianmu/t/issue656.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -use test; +--disable_warnings +DROP DATABASE IF EXISTS issue656_test; +--enable_warnings + +CREATE DATABASE issue656_test; + +USE issue656_test; CREATE TABLE `test` ( `id` int(11) DEFAULT NULL, @@ -12,3 +18,5 @@ eval load data local infile '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue656.txt' show warnings; drop table test; + +DROP DATABASE issue656_test; diff --git a/mysql-test/suite/tianmu/t/issue663.test b/mysql-test/suite/tianmu/t/issue663.test index 87085f8f9..82e16360a 100644 --- a/mysql-test/suite/tianmu/t/issue663.test +++ b/mysql-test/suite/tianmu/t/issue663.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue663_test; +--enable_warnings + +CREATE DATABASE issue663_test; + +USE issue663_test; + create table t11 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t12 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; insert into t11 values (0, 10),(1, 11),(2, 12); @@ -33,7 +41,6 @@ select * from t3; drop table t1,t2,t3; - CREATE TABLE t1 (sku int PRIMARY KEY, pr int)engine=tianmu; CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255))engine=tianmu; @@ -86,4 +93,6 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr (t2.sku=t1.sku OR t2.sppr=t1.sku)); -drop table t1,t2; \ No newline at end of file +drop table t1,t2; + +DROP DATABASE issue663_test; diff --git a/mysql-test/suite/tianmu/t/issue669.test b/mysql-test/suite/tianmu/t/issue669.test index 1f91bd5b7..cc1dca2ef 100644 --- a/mysql-test/suite/tianmu/t/issue669.test +++ b/mysql-test/suite/tianmu/t/issue669.test @@ -1,10 +1,17 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue669_test; +--enable_warnings + +CREATE DATABASE issue669_test; + +USE issue669_test; + --echo # --echo # Fix assertion errors caused by syntax optimization of the tianmu engine #669 --echo # -use test; create table t11 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t12 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; create table t2 (a int NOT NULL, b int, primary key (a))ENGINE=TIANMU; @@ -14,4 +21,6 @@ insert into t2 values (1, 21),(2, 12),(3, 23); delete from t11 where t11.b not in (select b from t2 where t11.a < t2.a); -drop table t11,t12,t2; \ No newline at end of file +drop table t11,t12,t2; + +DROP DATABASE issue669_test; diff --git a/mysql-test/suite/tianmu/t/issue682.test b/mysql-test/suite/tianmu/t/issue682.test index 389411ab1..1498aa0ae 100644 --- a/mysql-test/suite/tianmu/t/issue682.test +++ b/mysql-test/suite/tianmu/t/issue682.test @@ -1,6 +1,13 @@ --source include/have_tianmu.inc -use test; +--disable_warnings +DROP DATABASE IF EXISTS issue682_test; +--enable_warnings + +CREATE DATABASE issue682_test; + +USE issue682_test; + set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; create table t1(a date not null); insert ignore into t1 values (0); @@ -19,7 +26,6 @@ delete from t1 where a ='20221020'; select * from t1; drop table t1; - create table t1(a date); insert ignore into t1 values (0); insert into t1 values (0); @@ -52,7 +58,6 @@ delete from t1 where a ='20221020'; select * from t1; drop table t1; - create table t1(a TIME not null); insert ignore into t1 values (0); insert into t1 values (0); @@ -70,7 +75,6 @@ delete from t1 where a ='12:13:14'; select * from t1; drop table t1; - CREATE TABLE t1 (a varchar(10)); CREATE TABLE t2 (a varchar(10), b date not null); CREATE TABLE t3 (a varchar(10), b TIME not null); @@ -92,7 +96,6 @@ FROM t1 LEFT JOIN t2 WHERE t1.a = 'test1' or t2.b is null; - SELECT * FROM t1 LEFT JOIN t3 ON t3.a = 'test1' @@ -128,8 +131,4 @@ delete from t1 where a ='20221020'; select * from t1; drop table t1; - - - - - +DROP DATABASE issue682_test; diff --git a/mysql-test/suite/tianmu/t/issue703.test b/mysql-test/suite/tianmu/t/issue703.test index 403e01ad6..3b6dc2e61 100644 --- a/mysql-test/suite/tianmu/t/issue703.test +++ b/mysql-test/suite/tianmu/t/issue703.test @@ -1,2 +1,14 @@ +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue703_test; +--enable_warnings + +CREATE DATABASE issue703_test; + +USE issue703_test; + --replace_column 2 # show status like "Tianmu%"; + +DROP DATABASE issue703_test; diff --git a/mysql-test/suite/tianmu/t/issue736.test b/mysql-test/suite/tianmu/t/issue736.test index ee1217d00..ccdd8542e 100644 --- a/mysql-test/suite/tianmu/t/issue736.test +++ b/mysql-test/suite/tianmu/t/issue736.test @@ -1,8 +1,18 @@ --source include/have_tianmu.inc -use test; + +--disable_warnings +DROP DATABASE IF EXISTS issue736_test; +--enable_warnings + +CREATE DATABASE issue736_test; + +USE issue736_test; + CREATE TABLE t1(col1 INT, col2 CHAR(5))ENGINE=tianmu; INSERT INTO t1 VALUES(NULL,''),(1,'a'),(1,'b'),(1,'c'),(2,'dd'),(3,'eee'); INSERT INTO t1 VALUES(8,UNHEX('CEB2')); SELECT COUNT(DISTINCT col2) FROM t1; SELECT COUNT(DISTINCT col1) FROM t1; DROP TABLE t1; + +DROP DATABASE issue736_test; diff --git a/mysql-test/suite/tianmu/t/issue767.test b/mysql-test/suite/tianmu/t/issue767.test index f4e29c309..9ce3442e5 100644 --- a/mysql-test/suite/tianmu/t/issue767.test +++ b/mysql-test/suite/tianmu/t/issue767.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc -use test; + +--disable_warnings +DROP DATABASE IF EXISTS issue767_test; +--enable_warnings + +CREATE DATABASE issue767_test; + +USE issue767_test; + create table t1(val int) ENGINE=tianmu; create table t2(val2 int) ENGINE=tianmu; @@ -47,3 +55,5 @@ select * from t1 where val not in (select * from t2 where val2 > t1.val); drop table t1; drop table t2; + +DROP DATABASE issue767_test; diff --git a/mysql-test/suite/tianmu/t/issue781.test b/mysql-test/suite/tianmu/t/issue781.test index 2080e1ac6..86d5c8ad5 100644 --- a/mysql-test/suite/tianmu/t/issue781.test +++ b/mysql-test/suite/tianmu/t/issue781.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue781_test; +--enable_warnings + +CREATE DATABASE issue781_test; + +USE issue781_test; --disable_warnings @@ -341,7 +347,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # test with primary key ## default safe mode @@ -679,7 +684,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # not safe mode set sql_safe_updates=0; @@ -1019,7 +1023,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # test with primary key ## DDL @@ -1355,11 +1358,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - - - - - # test with primary key ## safe mode @@ -1717,7 +1715,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # not safe mode set sql_safe_updates=0; @@ -2074,11 +2071,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - - - - - # not safe mode set sql_safe_updates=0; @@ -2424,7 +2416,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # test with primary key ## DDL @@ -2766,9 +2757,6 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - - - # test with primary key ## not safe mode @@ -3108,8 +3096,9 @@ SELECT * FROM cs1; DROP TABLE cs1; DROP TABLE cs2; - # test with json type --error 6 CREATE TABLE cs1 (c1 JSON, c2 INT) ENGINE=TIANMU; + +DROP DATABASE issue781_test; diff --git a/mysql-test/suite/tianmu/t/issue819.test b/mysql-test/suite/tianmu/t/issue819.test index eca9b96b3..9a7b81463 100644 --- a/mysql-test/suite/tianmu/t/issue819.test +++ b/mysql-test/suite/tianmu/t/issue819.test @@ -10,51 +10,51 @@ --echo [on master] connection master; use test; -create table ttt(id int primary key,name varchar(5))engine=innodb; -insert into ttt values(1,'AAA'); -delete from ttt where id=1; -insert into ttt values(1,'aaa'); -select * from ttt; +create table t_issue819(id int primary key,name varchar(5))engine=innodb; +insert into t_issue819 values(1,'AAA'); +delete from t_issue819 where id=1; +insert into t_issue819 values(1,'aaa'); +select * from t_issue819; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from ttt; +select * from t_issue819; --echo [on master] connection master; -drop table ttt; +drop table t_issue819; --source include/sync_slave_sql_with_master.inc --echo [on master] connection master; -CREATE TABLE t1 (a int not null,b int not null)engine=innodb; -CREATE TABLE t2 (a int not null, b int not null, primary key (a,b))engine=innodb; -CREATE TABLE t3 (a int not null, b int not null, primary key (a,b))engine=innodb; -insert into t1 values (1,1),(2,1),(1,3); -insert into t2 values (1,1),(2,2),(3,3); -insert into t3 values (1,1),(2,1),(1,3); -delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; +CREATE TABLE t_issue819_1 (a int not null,b int not null)engine=innodb; +CREATE TABLE t_issue819_2 (a int not null, b int not null, primary key (a,b))engine=innodb; +CREATE TABLE t_issue819_3 (a int not null, b int not null, primary key (a,b))engine=innodb; +insert into t_issue819_1 values (1,1),(2,1),(1,3); +insert into t_issue819_2 values (1,1),(2,2),(3,3); +insert into t_issue819_3 values (1,1),(2,1),(1,3); +delete t_issue819_2.*,t_issue819_3.* from t_issue819_1,t_issue819_2,t_issue819_3 where t_issue819_1.a=t_issue819_2.a AND t_issue819_2.b=t_issue819_3.a and t_issue819_1.b=t_issue819_3.b; -select * from t1; -select * from t2; -select * from t3; +select * from t_issue819_1; +select * from t_issue819_2; +select * from t_issue819_3; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from t1; -select * from t2; -select * from t3; +select * from t_issue819_1; +select * from t_issue819_2; +select * from t_issue819_3; --echo [on master] connection master; -drop table t1,t2,t3; +drop table t_issue819_1,t_issue819_2,t_issue819_3; --source include/sync_slave_sql_with_master.inc --echo [on master] connection master; -CREATE TABLE t1 +CREATE TABLE t_issue819_1 ( place_id int (10), shows int(10), @@ -67,18 +67,18 @@ CREATE TABLE t1 PRIMARY KEY (place_id,ts) )engine=innodb; -INSERT INTO t1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) +INSERT INTO t_issue819_1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) VALUES (1,0,0,0,0,0,0,20000928174434); -UPDATE t1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; -select place_id,shows from t1; +UPDATE t_issue819_1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; +select place_id,shows from t_issue819_1; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select place_id,shows from t1; +select place_id,shows from t_issue819_1; --echo [on master] connection master; -drop table t1; +drop table t_issue819_1; --source include/sync_slave_sql_with_master.inc --echo # @@ -88,64 +88,64 @@ drop table t1; --echo [on master] connection master; use test; -create table ttt(id int primary key,name varchar(5))engine=tianmu; -insert into ttt values(1,'AAA'); -update ttt set name='hhhh' where id=1; -select * from ttt; +create table t_issue819(id int primary key,name varchar(5))engine=tianmu; +insert into t_issue819 values(1,'AAA'); +update t_issue819 set name='hhhh' where id=1; +select * from t_issue819; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from ttt; +select * from t_issue819; --echo [on master] connection master; -drop table ttt; +drop table t_issue819; --source include/sync_slave_sql_with_master.inc --echo [on master] connection master; -create table t1(id int primary key,name varchar(5))engine=tianmu; -insert into t1 values(1,'AAA'); -delete from t1 where id=1; -insert into t1 values(1,'aaa'); -select * from t1; +create table t_issue819_1(id int primary key,name varchar(5))engine=tianmu; +insert into t_issue819_1 values(1,'AAA'); +delete from t_issue819_1 where id=1; +insert into t_issue819_1 values(1,'aaa'); +select * from t_issue819_1; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from t1; +select * from t_issue819_1; --echo [on master] connection master; -drop table t1; +drop table t_issue819_1; -CREATE TABLE t1 (a int not null,b int not null)engine=tianmu; -CREATE TABLE t2 (a int not null, b int not null, primary key (a,b))engine=tianmu; -CREATE TABLE t3 (a int not null, b int not null, primary key (a,b))engine=tianmu; -insert into t1 values (1,1),(2,1),(1,3); -insert into t2 values (1,1),(2,2),(3,3); -insert into t3 values (1,1),(2,1),(1,3); -delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; +CREATE TABLE t_issue819_1 (a int not null,b int not null)engine=tianmu; +CREATE TABLE t_issue819_2 (a int not null, b int not null, primary key (a,b))engine=tianmu; +CREATE TABLE t_issue819_3 (a int not null, b int not null, primary key (a,b))engine=tianmu; +insert into t_issue819_1 values (1,1),(2,1),(1,3); +insert into t_issue819_2 values (1,1),(2,2),(3,3); +insert into t_issue819_3 values (1,1),(2,1),(1,3); +delete t_issue819_2.*,t_issue819_3.* from t_issue819_1,t_issue819_2,t_issue819_3 where t_issue819_1.a=t_issue819_2.a AND t_issue819_2.b=t_issue819_3.a and t_issue819_1.b=t_issue819_3.b; -select * from t1; -select * from t2; -select * from t3; +select * from t_issue819_1; +select * from t_issue819_2; +select * from t_issue819_3; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select * from t1; -select * from t2; -select * from t3; +select * from t_issue819_1; +select * from t_issue819_2; +select * from t_issue819_3; --echo [on master] connection master; -drop table t1,t2,t3; +drop table t_issue819_1,t_issue819_2,t_issue819_3; --source include/sync_slave_sql_with_master.inc --echo [on master] connection master; -CREATE TABLE t1 +CREATE TABLE t_issue819_1 ( place_id int (10), shows int(10), @@ -158,27 +158,27 @@ CREATE TABLE t1 PRIMARY KEY (place_id,ts) )engine=tianmu; -INSERT INTO t1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) +INSERT INTO t_issue819_1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) VALUES (1,0,0,0,0,0,0,20000928174434); -UPDATE t1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; -select place_id,shows from t1; +UPDATE t_issue819_1 SET shows=shows+1,ishows=ishows+1,ushows=ushows+1,clicks=clicks+1,iclicks=iclicks+1,uclicks=uclicks+1 WHERE place_id=1 AND ts>="2000-09-28 00:00:00"; +select place_id,shows from t_issue819_1; --echo [on slave] --source include/sync_slave_sql_with_master.inc -select place_id,shows from t1; +select place_id,shows from t_issue819_1; --echo [on master] connection master; -drop table t1; +drop table t_issue819_1; # # VIEW built over UNION # -create table t1 (s1 int); -create table t2 (s2 int); -insert into t1 values (1), (2); -insert into t2 values (2), (3); -create view v1 as select * from t1,t2 union all select * from t1,t2; +create table t_issue819_1 (s1 int); +create table t_issue819_2 (s2 int); +insert into t_issue819_1 values (1), (2); +insert into t_issue819_2 values (2), (3); +create view v1 as select * from t_issue819_1,t_issue819_2 union all select * from t_issue819_1,t_issue819_2; select * from v1; --echo [on slave] --source include/sync_slave_sql_with_master.inc @@ -186,15 +186,15 @@ select * from v1; --echo [on master] connection master; drop view v1; -drop tables t1, t2; +drop tables t_issue819_1, t_issue819_2; # # Aggregate functions in view list # -create table t1 (col1 int); -insert into t1 values (1); -create view v1 as select count(*) from t1; -insert into t1 values (null); +create table t_issue819_1 (col1 int); +insert into t_issue819_1 values (1); +create view v1 as select count(*) from t_issue819_1; +insert into t_issue819_1 values (null); select * from v1; --echo [on slave] --source include/sync_slave_sql_with_master.inc @@ -202,15 +202,15 @@ select * from v1; --echo [on master] connection master; drop view v1; -drop table t1; +drop table t_issue819_1; # # Showing VIEW with VIEWs in subquery # -create table t1 (a int); -create table t2 (a int); -create view v1 as select a from t1; -create view v2 as select a from t2 where a in (select a from v1); +create table t_issue819_1 (a int); +create table t_issue819_2 (a int); +create view v1 as select a from t_issue819_1; +create view v2 as select a from t_issue819_2 where a in (select a from v1); show create view v2; --echo [on slave] --source include/sync_slave_sql_with_master.inc @@ -218,6 +218,6 @@ show create view v2; --echo [on master] connection master; drop view v2, v1; -drop table t1, t2; +drop table t_issue819_1, t_issue819_2; --source include/sync_slave_sql_with_master.inc stop slave; \ No newline at end of file diff --git a/mysql-test/suite/tianmu/t/issue829.test b/mysql-test/suite/tianmu/t/issue829.test index 8626b724d..855aa33d5 100644 --- a/mysql-test/suite/tianmu/t/issue829.test +++ b/mysql-test/suite/tianmu/t/issue829.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue829_test; +--enable_warnings + +CREATE DATABASE issue829_test; + +USE issue829_test; + CREATE TABLE t1 ( t1_tinyint TINYINT DEFAULT 0, @@ -31,7 +39,6 @@ SELECT * FROM t1 WHERE t1_datetime > '1111-11-13 0:0:0'; SELECT * FROM t1 WHERE t1_datetime > '1111-11-10 0:0:0'; - CREATE TABLE t2 ( t1_tinyint TINYINT DEFAULT 0, @@ -57,5 +64,6 @@ SELECT * FROM t1,t2 WHERE t1.t1_datetime IN ('1111-11-11 11:11:11','1111-11-13 0:0:0') and t2.t1_datetime IN ('1111-11-11 0:0:0','1111-11-13 11:11:11'); +drop table t1 ,t2; -drop table t1 ,t2; \ No newline at end of file +DROP DATABASE issue829_test; diff --git a/mysql-test/suite/tianmu/t/issue845.test b/mysql-test/suite/tianmu/t/issue845.test index c9de8e561..9c95ca2b7 100644 --- a/mysql-test/suite/tianmu/t/issue845.test +++ b/mysql-test/suite/tianmu/t/issue845.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue845_test; +--enable_warnings + +CREATE DATABASE issue845_test; + +USE issue845_test; --disable_warnings @@ -24,7 +30,6 @@ CREATE TABLE test_timestamp (t timestamp); SELECT EXTRACT(DAY_HOUR FROM t), EXTRACT(MINUTE_SECOND FROM t) FROM test_timestamp; - #EXTRACT SELECT WITHOUT TABLE SELECT EXTRACT(YEAR FROM '2019-07-02'); @@ -35,7 +40,8 @@ SELECT EXTRACT(DAY_MINUTE FROM '2019-07-02 01:02:03'); SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.000123'); - #DROP TABLE DROP TABLE test_timestamp; + +DROP DATABASE issue845_test; diff --git a/mysql-test/suite/tianmu/t/issue852.test b/mysql-test/suite/tianmu/t/issue852.test index 71bc558d1..8eb76f443 100644 --- a/mysql-test/suite/tianmu/t/issue852.test +++ b/mysql-test/suite/tianmu/t/issue852.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue852_test; +--enable_warnings + +CREATE DATABASE issue852_test; + +USE issue852_test; CREATE TABLE IF NOT EXISTS `lineorder_flat` ( `LO_ORDERDATE` date NOT NULL COMMENT '', @@ -46,4 +52,6 @@ CREATE TABLE IF NOT EXISTS `lineorder_flat` ( --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/tianmu/std_data/issue852.txt' Into TABLE lineorder_flat FIELDS TERMINATED BY ',' enclosed by '"' ; select * from lineorder_flat; -drop table lineorder_flat; \ No newline at end of file +drop table lineorder_flat; + +DROP DATABASE issue852_test; diff --git a/mysql-test/suite/tianmu/t/issue887.test b/mysql-test/suite/tianmu/t/issue887.test index e1a9654a1..92f529337 100644 --- a/mysql-test/suite/tianmu/t/issue887.test +++ b/mysql-test/suite/tianmu/t/issue887.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue887_test; +--enable_warnings + +CREATE DATABASE issue887_test; + +USE issue887_test; --disable_warnings @@ -384,3 +390,5 @@ ORDER BY ## clear test table of this issue DROP TABLE t1,t2,t3; + +DROP DATABASE issue887_test; diff --git a/mysql-test/suite/tianmu/t/issue889.test b/mysql-test/suite/tianmu/t/issue889.test index f5d929e2c..1a90d1f5d 100644 --- a/mysql-test/suite/tianmu/t/issue889.test +++ b/mysql-test/suite/tianmu/t/issue889.test @@ -9,7 +9,7 @@ --echo # connection master connection master; -CREATE TABLE `column_type_test` ( +CREATE TABLE `t_issue889` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', `c_mediumint` mediumint(9) DEFAULT NULL COMMENT 'mediumint', @@ -29,31 +29,31 @@ CREATE TABLE `column_type_test` ( `c_longblob` longblob COMMENT 'longblob' ) ENGINE=TIANMU; -insert into column_type_test +insert into t_issue889 values(100,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue889 values(101,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -insert into column_type_test +insert into t_issue889 values(102,100,100,100,100,5.2,10.88,100.08300,'2016-02-25','2016-02-25 10:20:01', '2007-04-23 08:12:49','10:20:01','stoneatom','hello',NULL,'bcdefghijklmn',NULL); -update column_type_test set c_smallint=200 where c_tinyint=100; -select * from column_type_test; +update t_issue889 set c_smallint=200 where c_tinyint=100; +select * from t_issue889; --echo # connection slave --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue889; --echo # connection master connection master; -delete from column_type_test where c_tinyint=100; -select * from column_type_test; +delete from t_issue889 where c_tinyint=100; +select * from t_issue889; --echo # connection slave --source include/sync_slave_sql_with_master.inc -select * from column_type_test; +select * from t_issue889; --echo # connection master connection master; -drop table column_type_test; +drop table t_issue889; --source include/sync_slave_sql_with_master.inc stop slave; \ No newline at end of file diff --git a/mysql-test/suite/tianmu/t/issue906.test b/mysql-test/suite/tianmu/t/issue906.test index 30450cc4f..c68a35afc 100644 --- a/mysql-test/suite/tianmu/t/issue906.test +++ b/mysql-test/suite/tianmu/t/issue906.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue906_test; +--enable_warnings + +CREATE DATABASE issue906_test; + +USE issue906_test; --disable_warnings @@ -116,3 +122,4 @@ WHERE DROP TABLE shop; +DROP DATABASE issue906_test; diff --git a/mysql-test/suite/tianmu/t/issue938.test b/mysql-test/suite/tianmu/t/issue938.test index 7371949ec..c1c2452f8 100644 --- a/mysql-test/suite/tianmu/t/issue938.test +++ b/mysql-test/suite/tianmu/t/issue938.test @@ -1,7 +1,14 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS issue938_test; +--enable_warnings + +CREATE DATABASE issue938_test; + +USE issue938_test; + --disable_query_log -USE test; CREATE TABLE tb (d1 DECIMAL(17)) ENGINE=TIANMU; INSERT INTO tb VALUES @@ -17,3 +24,5 @@ SELECT group_concat(d1 ORDER BY d1) FROM tb; --disable_query_log DROP TABLE tb; --enable_query_log + +DROP DATABASE issue938_test; diff --git a/mysql-test/suite/tianmu/t/issue947.test b/mysql-test/suite/tianmu/t/issue947.test index a5b74eff4..8c525cc40 100644 --- a/mysql-test/suite/tianmu/t/issue947.test +++ b/mysql-test/suite/tianmu/t/issue947.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue947_test; +--enable_warnings + +CREATE DATABASE issue947_test; + +USE issue947_test; --disable_warnings @@ -50,3 +56,5 @@ SELECT * FROM test1 WHERE a IN ( SELECT b FROM test2 WHERE b NOT IN ( SELECT a F ## clean test table DROP TABLE test1,test2; + +DROP DATABASE issue947_test; diff --git a/mysql-test/suite/tianmu/t/issue956.test b/mysql-test/suite/tianmu/t/issue956.test index 15262ea1d..9994c8fb7 100644 --- a/mysql-test/suite/tianmu/t/issue956.test +++ b/mysql-test/suite/tianmu/t/issue956.test @@ -17,26 +17,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t1(c1 int,c2 varchar(255))engine=InnoDB; -show create table t1; +create table t_issue956(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t1; +show create table t_issue956; --echo [on master] connection master; -alter table t1 engine=MyISAM; -show create table t1; +alter table t_issue956 engine=MyISAM; +show create table t_issue956; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t1; +show create table t_issue956; --echo [on master] connection master; -drop table t1; +drop table t_issue956; --source include/sync_slave_sql_with_master.inc @@ -52,26 +52,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t2(c1 int,c2 varchar(255))engine=InnoDB; -show create table t2; +create table t_issue956_2(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_2; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t2; +show create table t_issue956_2; --echo [on master] connection master; -alter table t2 engine=MyISAM; -show create table t2; +alter table t_issue956_2 engine=MyISAM; +show create table t_issue956_2; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t2; +show create table t_issue956_2; --echo [on master] connection master; -drop table t2; +drop table t_issue956_2; --source include/sync_slave_sql_with_master.inc --echo # @@ -87,26 +87,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t3(c1 int,c2 varchar(255))engine=InnoDB; -show create table t3; +create table t_issue956_3(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_3; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t3; +show create table t_issue956_3; --echo [on master] connection master; -alter table t3 engine=MyISAM; -show create table t3; +alter table t_issue956_3 engine=MyISAM; +show create table t_issue956_3; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t3; +show create table t_issue956_3; --echo [on master] connection master; -drop table t3; +drop table t_issue956_3; --source include/sync_slave_sql_with_master.inc --echo # @@ -123,26 +123,26 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t4(c1 int,c2 varchar(255))engine=InnoDB; -show create table t4; +create table t_issue956_4(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_4; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue956_4; --echo [on master] connection master; -alter table t4 engine=MyISAM; -show create table t4; +alter table t_issue956_4 engine=MyISAM; +show create table t_issue956_4; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue956_4; --echo [on master] connection master; -drop table t4; +drop table t_issue956_4; --source include/sync_slave_sql_with_master.inc --echo # @@ -158,25 +158,25 @@ set global sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT --echo [on master] connection master; -create table t4(c1 int,c2 varchar(255))engine=InnoDB; -show create table t4; +create table t_issue956_4(c1 int,c2 varchar(255))engine=InnoDB; +show create table t_issue956_4; --echo [on slave] --source include/sync_slave_sql_with_master.inc show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue956_4; --echo [on master] connection master; -alter table t4 engine=MyISAM; -show create table t4; +alter table t_issue956_4 engine=MyISAM; +show create table t_issue956_4; --echo [on slave] connection slave; sleep 1; show global variables like 'sql_mode'; show global variables like '%_engine'; -show create table t4; +show create table t_issue956_4; --echo [on master] connection master; -drop table t4; +drop table t_issue956_4; --source include/sync_slave_sql_with_master.inc stop slave; \ No newline at end of file diff --git a/mysql-test/suite/tianmu/t/issue959.test b/mysql-test/suite/tianmu/t/issue959.test index 3dc613222..0e0e9f625 100644 --- a/mysql-test/suite/tianmu/t/issue959.test +++ b/mysql-test/suite/tianmu/t/issue959.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue959_test; +--enable_warnings + +CREATE DATABASE issue959_test; + +USE issue959_test; --disable_warnings @@ -144,3 +150,4 @@ SELECT * FROM device_delta_collect a WHERE a.deviceId NOT BETWEEN '14.9' AND '15 DROP TABLE device_delta_collect; +DROP DATABASE issue959_test; diff --git a/mysql-test/suite/tianmu/t/issue964.test b/mysql-test/suite/tianmu/t/issue964.test index 34537449f..71704d4d9 100644 --- a/mysql-test/suite/tianmu/t/issue964.test +++ b/mysql-test/suite/tianmu/t/issue964.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue964_test; +--enable_warnings + +CREATE DATABASE issue964_test; + +USE issue964_test; --disable_warnings @@ -41,4 +47,6 @@ WHERE ## clear tables -DROP TABLE t1,t2; \ No newline at end of file +DROP TABLE t1,t2; + +DROP DATABASE issue964_test; diff --git a/mysql-test/suite/tianmu/t/issue971.test b/mysql-test/suite/tianmu/t/issue971.test index 91e2094bc..62c33c094 100644 --- a/mysql-test/suite/tianmu/t/issue971.test +++ b/mysql-test/suite/tianmu/t/issue971.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue971_test; +--enable_warnings + +CREATE DATABASE issue971_test; + +USE issue971_test; --disable_warnings @@ -48,3 +54,4 @@ set global tianmu_index_search=off; DROP TABLE tt1,tt2; +DROP DATABASE issue971_test; diff --git a/mysql-test/suite/tianmu/t/issue975.test b/mysql-test/suite/tianmu/t/issue975.test index 33d03672f..98ac002ba 100644 --- a/mysql-test/suite/tianmu/t/issue975.test +++ b/mysql-test/suite/tianmu/t/issue975.test @@ -1,5 +1,13 @@ --- source include/have_tianmu.inc -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue975_test; +--enable_warnings + +CREATE DATABASE issue975_test; + +USE issue975_test; + CREATE TABLE t1 (date CHAR(30), format CHAR(30)) engine=tianmu default CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO t1 VALUES ('10:20:10', '%H:%i:%s'), @@ -14,3 +22,5 @@ INSERT INTO t1 VALUES SELECT date, format, STR_TO_DATE(date, format) as str_to_date FROM t1; show variables like '%sql_mode%'; drop table t1; + +DROP DATABASE issue975_test; diff --git a/mysql-test/suite/tianmu/t/issue985.test b/mysql-test/suite/tianmu/t/issue985.test index 88982f94c..d9c8cd2b4 100644 --- a/mysql-test/suite/tianmu/t/issue985.test +++ b/mysql-test/suite/tianmu/t/issue985.test @@ -1,5 +1,13 @@ --- source include/have_tianmu.inc -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issue985_test; +--enable_warnings + +CREATE DATABASE issue985_test; + +USE issue985_test; + create table t1(a int not null,b int not null) default CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; insert into t1 values (1,2); show create table t1; @@ -8,3 +16,5 @@ show create table t1; alter table t1 comment '测试表'; show create table t1; drop table t1; + +DROP DATABASE issue985_test; diff --git a/mysql-test/suite/tianmu/t/issue995.test b/mysql-test/suite/tianmu/t/issue995.test index a971d5c32..92c060488 100644 --- a/mysql-test/suite/tianmu/t/issue995.test +++ b/mysql-test/suite/tianmu/t/issue995.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue995_test; +--enable_warnings + +CREATE DATABASE issue995_test; + +USE issue995_test; CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE); @@ -11,4 +17,6 @@ INSERT INTO t1 VALUES ('', NULL, '0-0-0', NULL), ('d', 15, '2015-5-15 15:15:15', 1.971917); SELECT CONVERT(c, TIME) FROM t1; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; + +DROP DATABASE issue995_test; diff --git a/mysql-test/suite/tianmu/t/issue998.test b/mysql-test/suite/tianmu/t/issue998.test index 8ed8c609f..64556bde0 100644 --- a/mysql-test/suite/tianmu/t/issue998.test +++ b/mysql-test/suite/tianmu/t/issue998.test @@ -1,6 +1,12 @@ --source include/have_tianmu.inc -USE test; +--disable_warnings +DROP DATABASE IF EXISTS issue998_test; +--enable_warnings + +CREATE DATABASE issue998_test; + +USE issue998_test; --disable_warnings @@ -28,7 +34,6 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; DROP TABLE t1,t2; - # type big int ## DDL @@ -51,7 +56,6 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; DROP TABLE t1,t2; - # type char ## DDL @@ -76,7 +80,6 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; DROP TABLE t1,t2; - # type datetime, default precision ## DDL @@ -99,7 +102,6 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; DROP TABLE t1,t2; - # type datetime, default precision of 3 ## DDL @@ -122,7 +124,6 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; DROP TABLE t1,t2; - # type datetime, default precision of 4 ## DDL @@ -144,3 +145,5 @@ SELECT t2_int FROM t2 UNION SELECT t1_char FROM t1; ## clean test table DROP TABLE t1,t2; + +DROP DATABASE issue998_test; diff --git a/mysql-test/suite/tianmu/t/issue_566.test b/mysql-test/suite/tianmu/t/issue_566.test index 93f689c35..1196d58a9 100644 --- a/mysql-test/suite/tianmu/t/issue_566.test +++ b/mysql-test/suite/tianmu/t/issue_566.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc -USE test; + +--disable_warnings +DROP DATABASE IF EXISTS issue_566_test; +--enable_warnings + +CREATE DATABASE issue_566_test; + +USE issue_566_test; + CREATE TABLE `lineitem_i342` ( `l_orderkey` int(11) NOT NULL, `l_partkey` int(11) NOT NULL, @@ -35,3 +43,5 @@ CREATE VIEW revenue_i05 AS SELECT l_suppkey AS supplier_no, sum(l_extendedprice SELECT * FROM revenue_i05 order by supplier_no; drop view revenue_i05; drop table lineitem_i342; + +DROP DATABASE issue_566_test; diff --git a/mysql-test/suite/tianmu/t/issues_tx417.test b/mysql-test/suite/tianmu/t/issues_tx417.test index 28416d8b6..73bc9035b 100644 --- a/mysql-test/suite/tianmu/t/issues_tx417.test +++ b/mysql-test/suite/tianmu/t/issues_tx417.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS issues_tx417_test; +--enable_warnings + +CREATE DATABASE issues_tx417_test; + +USE issues_tx417_test; + show variables like 'tianmu_insert_delayed'; CREATE TABLE `t_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -19,3 +28,5 @@ INSERT INTO t_test values(2,'tom','jerry',1,57,0); ROLLBACK; SELECT id FROM t_test; DROP TABLE t_test; + +DROP DATABASE issues_tx417_test; diff --git a/mysql-test/suite/tianmu/t/lz4.test b/mysql-test/suite/tianmu/t/lz4.test index 96d1e88c1..c41f26ace 100644 --- a/mysql-test/suite/tianmu/t/lz4.test +++ b/mysql-test/suite/tianmu/t/lz4.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS lz4_test; +--enable_warnings + +CREATE DATABASE lz4_test; + +USE lz4_test; + CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'lz4', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'lz4', @@ -31,4 +40,6 @@ insert into column_type_test(c_tinyint,c_smallint,c_mediumint,c_int,c_bigint,c_f values(104,104,104,104,104,5.2,10.88,104.083,'2016-02-25','2016-02-25 10:20:01','2016-02-25 05:20:01','10:20:01','stoneatom','hello','bcdefghijklmn'); select * from column_type_test; -drop table column_type_test; \ No newline at end of file +drop table column_type_test; + +DROP DATABASE lz4_test; diff --git a/mysql-test/suite/tianmu/t/orquery.test b/mysql-test/suite/tianmu/t/orquery.test index 53d4782ef..b42856510 100644 --- a/mysql-test/suite/tianmu/t/orquery.test +++ b/mysql-test/suite/tianmu/t/orquery.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS orquery_test; +--enable_warnings + +CREATE DATABASE orquery_test; + +USE orquery_test; + CREATE TABLE `test_or` ( `id` int(11) DEFAULT NULL, `age` int(11) DEFAULT NULL @@ -8,3 +17,4 @@ insert into test_or values(2,2); select count(*) from test_or where id=1 or age=2; drop table test_or; +DROP DATABASE orquery_test; diff --git a/mysql-test/suite/tianmu/t/orquery1.test b/mysql-test/suite/tianmu/t/orquery1.test index 1e5d49ab5..2474e2e92 100644 --- a/mysql-test/suite/tianmu/t/orquery1.test +++ b/mysql-test/suite/tianmu/t/orquery1.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS orquery1_test; +--enable_warnings + +CREATE DATABASE orquery1_test; + +USE orquery1_test; + CREATE TABLE `test_or` ( `id` int(11) DEFAULT NULL, `name` varchar(11) DEFAULT NULL @@ -8,3 +17,4 @@ insert into test_or values(2,'2'); select count(*) from test_or where id=1 or name='2'; drop table test_or; +DROP DATABASE orquery1_test; diff --git a/mysql-test/suite/tianmu/t/replace.test b/mysql-test/suite/tianmu/t/replace.test index 14aa88b53..35b666968 100644 --- a/mysql-test/suite/tianmu/t/replace.test +++ b/mysql-test/suite/tianmu/t/replace.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS replace_test; +--enable_warnings + +CREATE DATABASE replace_test; + +USE replace_test; + # # Test REPLACE INTO with TIANMU # @@ -54,4 +62,6 @@ REPLACE INTO test1 VALUES (1, 'NewNew', '2014-08-20 18:47:55'); SELECT * FROM test1; REPLACE INTO test1 VALUES (1, 'NewNewNew', '2014-08-20 18:55:55'); SELECT * FROM test1; -drop table test1; \ No newline at end of file +drop table test1; + +DROP DATABASE replace_test; diff --git a/mysql-test/suite/tianmu/t/select_from.test b/mysql-test/suite/tianmu/t/select_from.test index 7fba864fe..6d11433cc 100644 --- a/mysql-test/suite/tianmu/t/select_from.test +++ b/mysql-test/suite/tianmu/t/select_from.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS select_from_test; +--enable_warnings + +CREATE DATABASE select_from_test; + +USE select_from_test; + --echo # --echo # Test select from --echo # @@ -107,3 +115,5 @@ vc1 = 9 or bi2 = 4; # clean up drop table t2_test; drop table t1_test; + +DROP DATABASE select_from_test; diff --git a/mysql-test/suite/tianmu/t/temporary.test b/mysql-test/suite/tianmu/t/temporary.test index 71954950b..6085914ab 100644 --- a/mysql-test/suite/tianmu/t/temporary.test +++ b/mysql-test/suite/tianmu/t/temporary.test @@ -1,5 +1,13 @@ --source include/have_tianmu.inc +--disable_warnings +DROP DATABASE IF EXISTS temporary_test; +--enable_warnings + +CREATE DATABASE temporary_test; + +USE temporary_test; + --echo # --echo #create temporary...like... --echo # @@ -81,3 +89,4 @@ DROP TABLE `#sql2`; #Table names contain characters CREATE TEMPORARY TABLE `tt+1` (c1 INT)engine=tianmu; +DROP DATABASE temporary_test; diff --git a/mysql-test/suite/tianmu/t/truncate.test b/mysql-test/suite/tianmu/t/truncate.test index fd9786da7..1956c2154 100644 --- a/mysql-test/suite/tianmu/t/truncate.test +++ b/mysql-test/suite/tianmu/t/truncate.test @@ -1,4 +1,13 @@ -use test; +--source include/have_tianmu.inc + +--disable_warnings +DROP DATABASE IF EXISTS truncate_test; +--enable_warnings + +CREATE DATABASE truncate_test; + +USE truncate_test; + CREATE TABLE `column_type_test` ( `c_tinyint` tinyint(4) DEFAULT NULL COMMENT 'tinyint', `c_smallint` smallint(6) DEFAULT NULL COMMENT 'smallint', @@ -27,3 +36,5 @@ insert into column_type_test(c_tinyint,c_smallint,c_mediumint,c_int,c_bigint,c_f values(105,105,105,105,105,5.2,10.88,105.083,'2016-02-25','2016-02-25 10:20:01','2016-02-25 05:20:01','10:20:01','stoneatom','hello','bcdefghijklmn'); select * from column_type_test; drop table column_type_test; + +DROP DATABASE truncate_test;