未验证 提交 c845005e 编写于 作者: S SPZhang 提交者: GitHub

fix(mtr):move character_set to test.character_set, fix main mtr_test and...

fix(mtr):move character_set to test.character_set, fix main mtr_test and innodb mtr_test(#277) (#335)

* fix(mtr):fix innodb mtr and mv some test to test/innodb

* fix(mtr):move character_set to test/main/

fix(mtr):mv main mtr character_set test to test/main/cahracter_set

fix(mtr):mv myisam error mtr-test to test/main/myisam

fix(mtr):add optimizer_switch to include/default_mysqld.cnf

* fix(mtr):fix main mtr optimizer_switch amd mv some test to test/main
Co-authored-by: Nmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
上级 6ddaa08c
......@@ -27,6 +27,8 @@ slave-net-timeout=120
log-bin=mysqld-bin
optimizer_switch='index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,prefer_ordering_index=on'
# MAINTAINER:
# the loose- syntax is to make sure the cnf file is also
# valid when building without the performance schema.
......
......@@ -1404,11 +1404,11 @@ block-encryption-mode aes-128-ecb
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
character-set-filesystem binary
character-set-server utf8mb4
character-set-server utf8
character-sets-dir MYSQL_CHARSETSDIR/
check-proxy-users FALSE
chroot (No default value)
collation-server utf8mb4_general_ci
collation-server utf8_general_ci
completion-type NO_CHAIN
concurrent-insert AUTO
connect-timeout 10
......
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
use test;
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
......@@ -81,7 +81,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db4` /*!40100 DEFAULT CHARACTER SET la
USE `db4`;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mtr` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mtr` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mtr`;
......
......@@ -18,11 +18,13 @@ DROP DATABASE db1_extended;
SHOW DATABASES;
Database
information_schema
cache
db2_extended
mtr
mysql
performance_schema
sys
sys_stonedb
test
DROP DATABASE db2_extended;
# test exclude-events
......@@ -171,12 +173,14 @@ DROP DATABASE db4_extended;
SHOW DATABASES;
Database
information_schema
cache
db2_extended
db4_extended
mtr
mysql
performance_schema
sys
sys_stonedb
test
DROP DATABASE db2_extended;
DROP DATABASE db4_extended;
......
......@@ -74,7 +74,7 @@ table_id pos mtype prtype len name
25 4 13 2163198 24 Abbreviation
26 0 6 1288 8 Transition_time
26 1 6 1283 4 Correction
32 0 13 2949630 144 source_uuid
32 0 13 2163198 108 source_uuid
32 1 6 1288 8 interval_start
32 2 6 1288 8 interval_end
33 0 12 2162959 192 cost_name
......
......@@ -13,6 +13,8 @@ my_restart.err
# Start mysqld to create tablespaces according to my.cnf
# Backup tmp/logfile/*
# 1. With ibdata2, Without ibdata1
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -21,6 +23,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -32,6 +35,8 @@ undo001
undo002
undo003
# 2. With ibdata1, without ibdata2
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -40,6 +45,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -52,6 +58,8 @@ undo001
undo002
undo003
# 3. Without ibdata1 & ibdata2
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -60,6 +68,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -69,6 +78,8 @@ my_restart.err
undo001
undo002
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -77,6 +88,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -87,6 +99,8 @@ undo001
undo002
undo003
# 4. Without ibdata*, ib_logfile* and with undo00*
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -95,12 +109,15 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
undo001
undo002
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -109,6 +126,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
......@@ -116,6 +134,8 @@ undo001
undo002
undo003
# 5. Without ibdata*,ib_logfile* files & Without undo002
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -124,11 +144,14 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
undo001
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -137,12 +160,15 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
undo001
undo003
# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -151,10 +177,13 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -163,11 +192,14 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
my.cnf
my_restart.err
undo003
# 7. With ibdata files & Without undo002
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -176,6 +208,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -186,6 +219,8 @@ my.cnf
my_restart.err
undo001
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -194,6 +229,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -205,6 +241,8 @@ my_restart.err
undo001
undo003
# 8. With ibdata files & Without undo001, undo002
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -213,6 +251,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -222,6 +261,8 @@ ibdata2
my.cnf
my_restart.err
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -230,6 +271,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -240,6 +282,8 @@ my.cnf
my_restart.err
undo003
# 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -248,11 +292,14 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile2
my.cnf
my_restart.err
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -261,12 +308,15 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile2
my.cnf
my_restart.err
# 11. With ibdata*, without ib_logfile1
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -275,6 +325,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile2
......@@ -285,6 +336,8 @@ my_restart.err
undo001
undo002
undo003
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -293,6 +346,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile2
......@@ -304,6 +358,8 @@ undo001
undo002
undo003
# 12. With ibdata*, without ib_logfile2
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -312,6 +368,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......@@ -323,6 +380,8 @@ undo001
undo002
undo003
# Cleanup
.index
STONEDB_INSERT_BUFFER
bak_ib_logfile0
bak_ib_logfile1
bak_ib_logfile2
......@@ -331,6 +390,7 @@ bak_ibdata2
bak_undo001
bak_undo002
bak_undo003
cache
ib_buffer_pool
ib_logfile0
ib_logfile1
......
......@@ -123,6 +123,10 @@ mysql.user OK
mtr.global_suppressions OK
mtr.test_suppressions OK
sys.sys_config OK
sys_stonedb.column_ttl OK
sys_stonedb.columns OK
sys_stonedb.decomposition_dictionary OK
sys_stonedb.logs OK
test.t575 OK
# Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
......@@ -206,6 +210,10 @@ mysql.user OK
mtr.global_suppressions OK
mtr.test_suppressions OK
sys.sys_config OK
sys_stonedb.column_ttl OK
sys_stonedb.columns OK
sys_stonedb.decomposition_dictionary OK
sys_stonedb.logs OK
test.t575
error : Partitioning upgrade required. Please dump/reload to fix it or do: ALTER TABLE `test`.`t575` UPGRADE PARTITIONING
warning : The partition engine, used by table 'test.t575', is deprecated and will be removed in a future release. Please use native partitioning instead.
......
......@@ -313,7 +313,7 @@ SHOW CREATE VIEW db4_basic.v1;
SHOW CREATE VIEW db4_basic.v2;
#dump all dbs
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_basic.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_basic.sql
DROP DATABASE db1_basic;
DROP DATABASE db2_basic;
DROP DATABASE db3_basic;
......@@ -329,7 +329,7 @@ SHOW CREATE VIEW db4_basic.v1;
SHOW CREATE VIEW db4_basic.v2;
# test with default-parallelism=0
--exec $MYSQL_PUMP --default-parallelism=0 --exclude-databases=mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_basic.sql
--exec $MYSQL_PUMP --default-parallelism=0 --exclude-databases=mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_basic.sql
DROP DATABASE db1_basic;
DROP DATABASE db2_basic;
DROP DATABASE db3_basic;
......@@ -685,7 +685,7 @@ CREATE DEFINER=VIEWUSER@LOCALHOST SQL SECURITY DEFINER VIEW V_T1_B AS SELECT * F
CREATE SQL SECURITY DEFINER VIEW V_T1_A2 AS SELECT * FROM V_T1_A;
CREATE SQL SECURITY DEFINER VIEW V_T1_B2 AS SELECT * FROM V_T1_B;
--exec $MYSQL_PUMP --exclude-databases=mtr --include-users=VIEWUSER@localhost --all-databases --add-drop-table --users > $MYSQLTEST_VARDIR/tmp/bug29023216.sql
--exec $MYSQL_PUMP --exclude-databases=mtr,sys_stonedb,cache --include-users=VIEWUSER@localhost --all-databases --add-drop-table --users > $MYSQLTEST_VARDIR/tmp/bug29023216.sql
DROP DATABASE DB29023216;
DROP USER 'VIEWUSER'@'LOCALHOST';
# restore should succeed
......@@ -702,7 +702,7 @@ SELECT * FROM V_T1_B2;
CREATE DEFINER=VIEWUSER@LOCALHOST FUNCTION TESTFUNC() RETURNS BOOL RETURN TRUE;
CREATE VIEW V_T1_C AS SELECT DB29023216.TESTFUNC();
--exec $MYSQL_PUMP --exclude-databases=mtr --include-users=VIEWUSER@localhost --all-databases --add-drop-table --users > $MYSQLTEST_VARDIR/tmp/bug29023216.sql
--exec $MYSQL_PUMP --exclude-databases=mtr,sys_stonedb,cache --include-users=VIEWUSER@localhost --all-databases --add-drop-table --users > $MYSQLTEST_VARDIR/tmp/bug29023216.sql
DROP DATABASE DB29023216;
DROP USER 'VIEWUSER'@'LOCALHOST';
# restore should succeed
......
......@@ -12,7 +12,7 @@ EOF
CREATE DATABASE db1;
CREATE DATABASE db2;
--exec $MYSQLPUMP --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/bug83144.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -uroot > $MYSQLTEST_VARDIR/tmp/bug83144.dump
--exec $MYSQLPUMP --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/bug83144.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -uroot --exclude-databases=mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/bug83144.dump
DROP DATABASE db1;
DROP DATABASE db2;
......
......@@ -20,7 +20,7 @@ CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT, b VARCHAR(10), primary key(a));
--echo # test exclude-databases
--exec $MYSQL_PUMP --add-drop-table --exclude-databases=db1_extended,mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --add-drop-table --exclude-databases=db1_extended,mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db2_extended;
DROP DATABASE db1_extended;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/db1_extended.sql
......@@ -208,7 +208,7 @@ USE db4_extended;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT, b VARCHAR(10), primary key(a));
--exec $MYSQL_PUMP --parallel-schemas=db2_extended,db4_extended --exclude-databases=db1_extended,db3_extended,mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --parallel-schemas=db2_extended,db4_extended --exclude-databases=db1_extended,db3_extended,mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db1_extended;
DROP DATABASE db2_extended;
......@@ -250,7 +250,7 @@ DROP DATABASE db1_extended;
CREATE USER u1@localhost IDENTIFIED BY 'abc';
CREATE USER u2;
--exec $MYSQL_PUMP --users --exclude-users=root,mysql.sys,mysql.session --exclude-databases=mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --users --exclude-users=root,mysql.sys,mysql.session --exclude-databases=mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP USER u1@localhost,u2;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--remove_file $MYSQLTEST_VARDIR/tmp/db1_extended.sql
......@@ -268,7 +268,7 @@ CREATE USER u2;
CREATE USER u3@120.0.0.1;
GRANT SELECT ON mysql.user to u3@120.0.0.1;
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr --include-users=u2,u1@120.0.0.1 > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache --include-users=u2,u1@120.0.0.1 > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP USER u1@localhost,u3@120.0.0.1,u1@120.0.0.1,u2;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--remove_file $MYSQLTEST_VARDIR/tmp/db1_extended.sql
......@@ -287,7 +287,7 @@ CREATE USER u2;
CREATE USER u3@120.0.0.1;
GRANT SELECT ON mysql.user to u3@120.0.0.1;
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr --exclude-users=u2,u1@120.0.0.1,root,mysql.sys,mysql.session > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache --exclude-users=u2,u1@120.0.0.1,root,mysql.sys,mysql.session > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP USER u1@localhost,u3@120.0.0.1,u1@120.0.0.1,u2;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--remove_file $MYSQLTEST_VARDIR/tmp/db1_extended.sql
......@@ -299,7 +299,7 @@ DROP USER u1@localhost,u3@120.0.0.1;
--echo # test add-drop-user
CREATE USER u1@localhost IDENTIFIED BY 'abc';
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr --exclude-users=root,mysql.sys,mysql.session --add-drop-user > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache --exclude-users=root,mysql.sys,mysql.session --add-drop-user > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP USER u1@localhost;
# if restore reports error it means db1_extended.sql has DROP USER stmt
--error 1
......@@ -322,7 +322,7 @@ CREATE DEFINER = u1@localhost VIEW v2 AS SELECT t1.a as X, t2.* FROM t1,t2 ORDER
CREATE DEFINER = u1@localhost VIEW definer_name_view AS SELECT * FROM t1 union SELECT a FROM t2;
#test without skip-definer
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db1_extended;
# now restore and check for view definitions
......@@ -334,7 +334,7 @@ SHOW CREATE VIEW db1_extended.v2;
SHOW CREATE VIEW db1_extended.definer_name_view;
#test with skip-definer
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr --skip-definer > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache --skip-definer > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db1_extended;
# now restore and check for view definitions
......@@ -388,7 +388,7 @@ CREATE DEFINER = u1@localhost PROCEDURE p2(x int)
DELIMITER ;|
#test without skip-definer
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db1_extended;
# now restore and check for view definitions
......@@ -401,7 +401,7 @@ SHOW CREATE PROCEDURE db1_extended.p1;
SHOW CREATE PROCEDURE db1_extended.p2;
#test with skip-definer
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr --skip-definer > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
--exec $MYSQL_PUMP --exclude-databases=mysql,mtr,sys_stonedb,cache --skip-definer > $MYSQLTEST_VARDIR/tmp/db1_extended.sql
DROP DATABASE db1_extended;
# now restore and check for view definitions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册