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
4eb4d078
Commit
4eb4d078
authored
Feb 14, 2020
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Galera test galera_as_slave_ctas.
parent
9ab171ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
30 deletions
+32
-30
mysql-test/suite/galera/r/galera_as_slave_ctas.result
mysql-test/suite/galera/r/galera_as_slave_ctas.result
+14
-12
mysql-test/suite/galera/t/galera_as_slave_ctas.test
mysql-test/suite/galera/t/galera_as_slave_ctas.test
+18
-18
No files found.
mysql-test/suite/galera/r/galera_as_slave_ctas.result
View file @
4eb4d078
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_2a;
SELECT @@wsrep_on;
@@wsrep_on
0
connection node_1;
START SLAVE;
START SLAVE;
connection
default
;
connection
node_3
;
SHOW VARIABLES LIKE 'binlog_format';
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
Variable_name Value
binlog_format ROW
binlog_format ROW
connection default;
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE target AS SELECT * FROM source;
CREATE TABLE target AS SELECT * FROM source;
connection node_2a;
connection node_1;
connection node_2;
connection node_3;
connection node_3;
connection default;
DROP TABLE target;
DROP TABLE target;
INSERT INTO source VALUES(1);
INSERT INTO source VALUES(1);
CREATE TABLE target AS SELECT * FROM source;
CREATE TABLE target AS SELECT * FROM source;
connection node_2a;
connection node_1;
connection node_2;
connection node_3;
connection node_3;
connection default;
DROP TABLE source;
DROP TABLE source;
DROP TABLE target;
DROP TABLE target;
connection node_
3
;
connection node_
2
;
connection node_
2a
;
connection node_
1
;
STOP SLAVE;
STOP SLAVE;
RESET SLAVE ALL;
RESET SLAVE ALL;
connection
default
;
connection
node_3
;
RESET MASTER;
RESET MASTER;
disconnect node_2a;
mysql-test/suite/galera/t/galera_as_slave_ctas.test
View file @
4eb4d078
...
@@ -6,69 +6,69 @@
...
@@ -6,69 +6,69 @@
#
#
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_log_bin
.
inc
--
source
include
/
galera_cluster
.
inc
# As node #
1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
# As node #
3 is not a Galera node, and galera_cluster.inc does not open connetion to it
--
connect
node_2a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_2
# we open the node_3 connection here
--
connect
node_3
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_3
--
connect
node_3
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_3
SELECT
@@
wsrep_on
;
--
connection
node_
2a
--
connection
node_
1
--
disable_query_log
--
disable_query_log
--
eval
CHANGE
MASTER
TO
MASTER_HOST
=
'127.0.0.1'
,
MASTER_USER
=
'root'
,
MASTER_PORT
=
$NODE_MYPORT_
1
;
--
eval
CHANGE
MASTER
TO
MASTER_HOST
=
'127.0.0.1'
,
MASTER_USER
=
'root'
,
MASTER_PORT
=
$NODE_MYPORT_
3
;
--
enable_query_log
--
enable_query_log
START
SLAVE
;
START
SLAVE
;
# make sure master server has binlog_format=ROW
# make sure master server has binlog_format=ROW
--
connection
default
--
connection
node_3
SHOW
VARIABLES
LIKE
'binlog_format'
;
SHOW
VARIABLES
LIKE
'binlog_format'
;
#
#
# test phase one, issue CTAS with empty source table
# test phase one, issue CTAS with empty source table
#
#
--
connection
default
CREATE
TABLE
source
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
CREATE
TABLE
source
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
CREATE
TABLE
target
AS
SELECT
*
FROM
source
;
CREATE
TABLE
target
AS
SELECT
*
FROM
source
;
--
connection
node_
2a
--
connection
node_
1
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
--
connection
node_
3
--
connection
node_
2
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# test phase two, issue CTAS with populated source table
# test phase two, issue CTAS with populated source table
#
#
--
connection
default
--
connection
node_3
DROP
TABLE
target
;
DROP
TABLE
target
;
INSERT
INTO
source
VALUES
(
1
);
INSERT
INTO
source
VALUES
(
1
);
CREATE
TABLE
target
AS
SELECT
*
FROM
source
;
CREATE
TABLE
target
AS
SELECT
*
FROM
source
;
--
connection
node_
2a
--
connection
node_
1
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
target
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
target
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
--
connection
node_
3
--
connection
node_
2
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
target
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
target
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
--
connection
default
--
connection
node_3
DROP
TABLE
source
;
DROP
TABLE
source
;
DROP
TABLE
target
;
DROP
TABLE
target
;
--
connection
node_
3
--
connection
node_
2
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
0
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
0
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'target'
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
--
connection
node_1
--
connection
node_2a
STOP
SLAVE
;
STOP
SLAVE
;
RESET
SLAVE
ALL
;
RESET
SLAVE
ALL
;
--
connection
default
--
connection
node_3
RESET
MASTER
;
RESET
MASTER
;
--
disconnect
node_2a
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