Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ea347fcb
Commit
ea347fcb
authored
Dec 25, 2018
by
Kentoku
Committed by
Sergei Golubchik
Jan 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary drop database/table from slave_trx_isolation.test
add simplified slave_trx_isolation.test
parent
be556f81
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
250 additions
and
25 deletions
+250
-25
storage/spider/mysql-test/spider/bugfix/include/slave_trx_isolation_deinit.inc
...test/spider/bugfix/include/slave_trx_isolation_deinit.inc
+15
-0
storage/spider/mysql-test/spider/bugfix/include/slave_trx_isolation_init.inc
...l-test/spider/bugfix/include/slave_trx_isolation_init.inc
+35
-0
storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result
...der/mysql-test/spider/bugfix/r/slave_trx_isolation.result
+99
-0
storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.cnf
...spider/mysql-test/spider/bugfix/t/slave_trx_isolation.cnf
+4
-0
storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test
...pider/mysql-test/spider/bugfix/t/slave_trx_isolation.test
+95
-0
storage/spider/mysql-test/spider/r/slave_trx_isolation.result
...age/spider/mysql-test/spider/r/slave_trx_isolation.result
+2
-7
storage/spider/mysql-test/spider/t/slave_trx_isolation.test
storage/spider/mysql-test/spider/t/slave_trx_isolation.test
+0
-18
No files found.
storage/spider/mysql-test/spider/bugfix/include/slave_trx_isolation_deinit.inc
0 → 100644
View file @
ea347fcb
--
let
$MASTER_1_COMMENT_2_1
=
$MASTER_1_COMMENT_2_1_BACKUP
--
let
$CHILD2_1_DROP_TABLES
=
$CHILD2_1_DROP_TABLES_BACKUP
--
let
$CHILD2_1_CREATE_TABLES
=
$CHILD2_1_CREATE_TABLES_BACKUP
--
let
$CHILD2_1_SELECT_TABLES
=
$CHILD2_1_SELECT_TABLES_BACKUP
--
connection
slave1_1
set
global
spider_slave_trx_isolation
=
@
old_spider_slave_trx_isolation
;
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../
include
/
deinit_spider
.
inc
--
source
../
t
/
slave_test_deinit
.
inc
--
source
../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
storage/spider/mysql-test/spider/bugfix/include/slave_trx_isolation_init.inc
0 → 100644
View file @
ea347fcb
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../
t
/
test_init
.
inc
--
source
../
t
/
slave_test_init
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
--
let
$MASTER_1_COMMENT_2_1_BACKUP
=
$MASTER_1_COMMENT_2_1
let
$MASTER_1_COMMENT_2_1
=
COMMENT
=
'table "tbl_a", srv "s_2_1"'
;
--
let
$CHILD2_1_DROP_TABLES_BACKUP
=
$CHILD2_1_DROP_TABLES
let
$CHILD2_1_DROP_TABLES
=
DROP
TABLE
IF
EXISTS
tbl_a
;
--
let
$CHILD2_1_CREATE_TABLES_BACKUP
=
$CHILD2_1_CREATE_TABLES
let
$CHILD2_1_CREATE_TABLES
=
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$CHILD2_1_ENGINE
$CHILD2_1_CHARSET
;
--
let
$CHILD2_1_SELECT_TABLES_BACKUP
=
$CHILD2_1_SELECT_TABLES
let
$CHILD2_1_SELECT_TABLES
=
SELECT
pkey
FROM
tbl_a
ORDER
BY
pkey
;
let
$CHILD2_1_SELECT_ARGUMENT1
=
SELECT
argument
FROM
mysql
.
general_log
WHERE
argument
LIKE
'%set %'
;
--
connection
slave1_1
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../
include
/
init_spider
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
set
@
old_spider_slave_trx_isolation
=
@@
spider_slave_trx_isolation
;
set
global
spider_slave_trx_isolation
=
1
;
storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result
0 → 100644
View file @
ea347fcb
for master_1
for child2
child2_1
child2_2
child2_3
for child3
for slave1_1
connection slave1_1;
set @old_spider_slave_trx_isolation= @@spider_slave_trx_isolation;
set global spider_slave_trx_isolation= 1;
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection slave1_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
connection slave1_1;
connection master_1;
SET SESSION sql_log_bin= 0;
CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
SET SESSION sql_log_bin= 1;
connection slave1_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
connection master_1;
INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
connection slave1_1;
connection master_1;
SET SESSION sql_log_bin= 0;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %';
argument
set session time_zone = '+00:00'
SET NAMES utf8
set session transaction isolation level read committed;set session autocommit = 1;start transaction
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
1
2
3
4
5
6
7
8
9
connection slave1_1;
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
1
2
3
4
5
6
7
8
9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection slave1_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection slave1_1;
set global spider_slave_trx_isolation= @old_spider_slave_trx_isolation;
for slave1_1
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.cnf
0 → 100644
View file @
ea347fcb
!include include/default_mysqld.cnf
!include ../my_1_1.cnf
!include ../my_2_1.cnf
!include ../my_4_1.cnf
storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test
0 → 100644
View file @
ea347fcb
--
source
../
include
/
slave_trx_isolation_init
.
inc
--
echo
--
echo
drop
and
create
databases
--
connection
master_1
--
disable_warnings
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
--
connection
slave1_1
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
--
connection
child2_1
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
CREATE
DATABASE
auto_test_remote
;
USE
auto_test_remote
;
--
enable_warnings
--
echo
--
echo
create
table
and
insert
--
connection
child2_1
--
disable_query_log
echo
CHILD2_1_CREATE_TABLES
;
eval
$CHILD2_1_CREATE_TABLES
;
--
enable_query_log
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
master_1
save_master_pos
;
--
connection
slave1_1
sync_with_master
;
--
connection
master_1
SET
SESSION
sql_log_bin
=
0
;
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
MASTER_1_ENGINE2
MASTER_1_CHARSET
MASTER_1_COMMENT_2_1
;
eval
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE2
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
SET
SESSION
sql_log_bin
=
1
;
--
connection
slave1_1
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
MASTER_1_ENGINE
MASTER_1_CHARSET
MASTER_1_COMMENT_2_1
;
eval
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
--
connection
master_1
INSERT
INTO
tbl_a
(
pkey
)
VALUES
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
save_master_pos
;
--
connection
slave1_1
sync_with_master
;
--
connection
master_1
SET
SESSION
sql_log_bin
=
0
;
--
connection
child2_1
eval
$CHILD2_1_SELECT_ARGUMENT1
;
eval
$CHILD2_1_SELECT_TABLES
;
--
connection
slave1_1
SELECT
pkey
FROM
tbl_a
ORDER
BY
pkey
;
--
echo
--
echo
deinit
--
disable_warnings
--
connection
master_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
--
connection
slave1_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
--
connection
child2_1
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
SET
GLOBAL
log_output
=
@
old_log_output
;
--
enable_warnings
--
source
../
include
/
slave_trx_isolation_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/r/slave_trx_isolation.result
View file @
ea347fcb
...
@@ -14,37 +14,31 @@ set global spider_slave_trx_isolation= 1;
...
@@ -14,37 +14,31 @@ set global spider_slave_trx_isolation= 1;
drop and create databases
drop and create databases
connection master_1;
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
CREATE DATABASE auto_test_local;
CREATE DATABASE auto_test_local;
USE auto_test_local;
USE auto_test_local;
connection slave1_1;
connection slave1_1;
DROP DATABASE IF EXISTS auto_test_local;
CREATE DATABASE auto_test_local;
CREATE DATABASE auto_test_local;
USE auto_test_local;
USE auto_test_local;
connection child2_1;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
SET GLOBAL log_output = 'TABLE,FILE';
DROP DATABASE IF EXISTS auto_test_remote;
CREATE DATABASE auto_test_remote;
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
USE auto_test_remote;
create table and insert
create table and insert
connection child2_1;
connection child2_1;
CHILD2_1_DROP_TABLES
CHILD2_1_CREATE_TABLES
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
TRUNCATE TABLE mysql.general_log;
connection master_1;
connection master_1;
connection slave1_1;
connection slave1_1;
connection master_1;
connection master_1;
DROP TABLE IF EXISTS tbl_a
;
SET SESSION sql_log_bin= 0
;
CREATE TABLE tbl_a (
CREATE TABLE tbl_a (
pkey int NOT NULL,
pkey int NOT NULL,
PRIMARY KEY (pkey)
PRIMARY KEY (pkey)
) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
connection master_1;
SET SESSION sql_log_bin= 1;
SET SESSION sql_log_bin= 1;
connection slave1_1;
connection slave1_1;
DROP TABLE IF EXISTS tbl_a;
CREATE TABLE tbl_a (
CREATE TABLE tbl_a (
pkey int NOT NULL,
pkey int NOT NULL,
PRIMARY KEY (pkey)
PRIMARY KEY (pkey)
...
@@ -53,6 +47,7 @@ connection master_1;
...
@@ -53,6 +47,7 @@ connection master_1;
INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
connection slave1_1;
connection slave1_1;
connection master_1;
connection master_1;
SET SESSION sql_log_bin= 0;
connection child2_1;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %';
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %';
argument
argument
...
...
storage/spider/mysql-test/spider/t/slave_trx_isolation.test
View file @
ea347fcb
...
@@ -3,13 +3,11 @@
...
@@ -3,13 +3,11 @@
--
echo
drop
and
create
databases
--
echo
drop
and
create
databases
--
connection
master_1
--
connection
master_1
--
disable_warnings
--
disable_warnings
DROP
DATABASE
IF
EXISTS
auto_test_local
;
CREATE
DATABASE
auto_test_local
;
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
USE
auto_test_local
;
if
(
$USE_REPLICATION
)
if
(
$USE_REPLICATION
)
{
{
--
connection
slave1_1
--
connection
slave1_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
CREATE
DATABASE
auto_test_local
;
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
USE
auto_test_local
;
}
}
...
@@ -21,7 +19,6 @@ if ($USE_CHILD_GROUP2)
...
@@ -21,7 +19,6 @@ if ($USE_CHILD_GROUP2)
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
}
}
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
CREATE
DATABASE
auto_test_remote
;
CREATE
DATABASE
auto_test_remote
;
USE
auto_test_remote
;
USE
auto_test_remote
;
}
}
...
@@ -40,12 +37,8 @@ if ($USE_CHILD_GROUP2)
...
@@ -40,12 +37,8 @@ if ($USE_CHILD_GROUP2)
if
(
$OUTPUT_CHILD_GROUP2
)
if
(
$OUTPUT_CHILD_GROUP2
)
{
{
--
disable_query_log
--
disable_query_log
echo
CHILD2_1_DROP_TABLES
;
echo
CHILD2_1_CREATE_TABLES
;
echo
CHILD2_1_CREATE_TABLES
;
}
}
--
disable_warnings
eval
$CHILD2_1_DROP_TABLES
;
--
enable_warnings
eval
$CHILD2_1_CREATE_TABLES
;
eval
$CHILD2_1_CREATE_TABLES
;
if
(
$OUTPUT_CHILD_GROUP2
)
if
(
$OUTPUT_CHILD_GROUP2
)
{
{
...
@@ -68,13 +61,8 @@ if ($USE_REPLICATION)
...
@@ -68,13 +61,8 @@ if ($USE_REPLICATION)
--
connection
slave1_1
--
connection
slave1_1
sync_with_master
;
sync_with_master
;
--
connection
master_1
--
connection
master_1
--
disable_query_log
SET
SESSION
sql_log_bin
=
0
;
SET
SESSION
sql_log_bin
=
0
;
--
enable_query_log
}
}
--
disable_warnings
DROP
TABLE
IF
EXISTS
tbl_a
;
--
enable_warnings
--
disable_query_log
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
pkey
int
NOT
NULL
,
...
@@ -85,14 +73,10 @@ eval CREATE TABLE tbl_a (
...
@@ -85,14 +73,10 @@ eval CREATE TABLE tbl_a (
PRIMARY
KEY
(
pkey
)
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE2
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
)
$MASTER_1_ENGINE2
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
--
enable_query_log
--
connection
master_1
if
(
$USE_REPLICATION
)
if
(
$USE_REPLICATION
)
{
{
SET
SESSION
sql_log_bin
=
1
;
SET
SESSION
sql_log_bin
=
1
;
--
connection
slave1_1
--
connection
slave1_1
--
disable_warnings
DROP
TABLE
IF
EXISTS
tbl_a
;
--
enable_warnings
--
disable_query_log
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
pkey
int
NOT
NULL
,
...
@@ -112,9 +96,7 @@ if ($USE_REPLICATION)
...
@@ -112,9 +96,7 @@ if ($USE_REPLICATION)
--
connection
slave1_1
--
connection
slave1_1
sync_with_master
;
sync_with_master
;
--
connection
master_1
--
connection
master_1
--
disable_query_log
SET
SESSION
sql_log_bin
=
0
;
SET
SESSION
sql_log_bin
=
0
;
--
enable_query_log
}
}
if
(
$USE_CHILD_GROUP2
)
if
(
$USE_CHILD_GROUP2
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment