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
d9b933be
Commit
d9b933be
authored
Oct 06, 2021
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-24062 : Galera test failure on galera_var_replicate_myisam_on
We should do after_statement only for local transactions.
parent
96b4a5a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
...test/suite/galera/r/galera_var_replicate_myisam_on.result
+12
-3
mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
...l-test/suite/galera/t/galera_var_replicate_myisam_on.test
+13
-3
sql/wsrep_trans_observer.h
sql/wsrep_trans_observer.h
+8
-1
No files found.
mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
View file @
d9b933be
...
@@ -53,8 +53,8 @@ COUNT(*) = 0
...
@@ -53,8 +53,8 @@ COUNT(*) = 0
1
1
DROP TABLE t1;
DROP TABLE t1;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t1 (f1 INTEGER
NOT NULL PRIMARY KEY
) ENGINE=MyISAM;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER
NOT NULL PRIMARY KEY
) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
...
@@ -100,7 +100,7 @@ DROP TABLE t2;
...
@@ -100,7 +100,7 @@ DROP TABLE t2;
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
#
#
connection node_1;
connection node_1;
CREATE TABLE t1 (i INT) ENGINE=INNODB;
CREATE TABLE t1 (i INT
NOT NULL PRIMARY KEY
) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
SELECT * FROM t1;
i
i
...
@@ -237,5 +237,14 @@ DROP TRIGGER tr1;
...
@@ -237,5 +237,14 @@ DROP TRIGGER tr1;
DROP TRIGGER tr2;
DROP TRIGGER tr2;
DROP TRIGGER tr3;
DROP TRIGGER tr3;
DROP TABLE t1,t2;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
SET GLOBAL wsrep_replicate_myisam=ON;
INSERT INTO t1 (a,b) VALUES (10,20);
connection node_2;
SELECT * from t1;
a b
1 20
connection node_1;
connection node_1;
DROP TABLE t1;
connection node_2;
connection node_2;
mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
View file @
d9b933be
...
@@ -80,8 +80,8 @@ DROP TABLE t1;
...
@@ -80,8 +80,8 @@ DROP TABLE t1;
#
#
--
connection
node_1
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
MyISAM
;
CREATE
TABLE
t1
(
f1
INTEGER
NOT
NULL
PRIMARY
KEY
)
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
f1
INTEGER
NOT
NULL
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
SET
AUTOCOMMIT
=
OFF
;
SET
AUTOCOMMIT
=
OFF
;
START
TRANSACTION
;
START
TRANSACTION
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
...
@@ -136,7 +136,7 @@ DROP TABLE t2;
...
@@ -136,7 +136,7 @@ DROP TABLE t2;
--
echo
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
--
echo
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
--
echo
#
--
echo
#
--
connection
node_1
--
connection
node_1
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
INNODB
;
CREATE
TABLE
t1
(
i
INT
NOT
NULL
PRIMARY
KEY
)
ENGINE
=
INNODB
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
# This command should not get replicated.
# This command should not get replicated.
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
...
@@ -218,7 +218,16 @@ DROP TRIGGER tr2;
...
@@ -218,7 +218,16 @@ DROP TRIGGER tr2;
DROP
TRIGGER
tr3
;
DROP
TRIGGER
tr3
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
UNIQUE
(
a
))
ENGINE
=
MyISAM
;
CREATE
TRIGGER
tr1
BEFORE
INSERT
ON
t1
FOR
EACH
ROW
SET
NEW
.
a
=
1
;
SET
GLOBAL
wsrep_replicate_myisam
=
ON
;
INSERT
INTO
t1
(
a
,
b
)
VALUES
(
10
,
20
);
--
connection
node_2
SELECT
*
from
t1
;
--
connection
node_1
--
connection
node_1
DROP
TABLE
t1
;
--
disable_query_log
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_replicate_myisam
=
$wsrep_replicate_myisam_orig
--
eval
SET
GLOBAL
wsrep_replicate_myisam
=
$wsrep_replicate_myisam_orig
--
enable_query_log
--
enable_query_log
...
@@ -227,3 +236,4 @@ DROP TABLE t1,t2;
...
@@ -227,3 +236,4 @@ DROP TABLE t1,t2;
--
disable_query_log
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_replicate_myisam
=
$wsrep_replicate_myisam_orig
--
eval
SET
GLOBAL
wsrep_replicate_myisam
=
$wsrep_replicate_myisam_orig
--
enable_query_log
--
enable_query_log
sql/wsrep_trans_observer.h
View file @
d9b933be
...
@@ -396,7 +396,14 @@ static inline
...
@@ -396,7 +396,14 @@ static inline
int
wsrep_after_statement
(
THD
*
thd
)
int
wsrep_after_statement
(
THD
*
thd
)
{
{
DBUG_ENTER
(
"wsrep_after_statement"
);
DBUG_ENTER
(
"wsrep_after_statement"
);
DBUG_RETURN
(
thd
->
wsrep_cs
().
state
()
!=
wsrep
::
client_state
::
s_none
?
WSREP_DEBUG
(
"wsrep_after_statement for %lu client_state %s "
" client_mode %s trans_state %s"
,
thd_get_thread_id
(
thd
),
wsrep
::
to_c_string
(
thd
->
wsrep_cs
().
state
()),
wsrep
::
to_c_string
(
thd
->
wsrep_cs
().
mode
()),
wsrep
::
to_c_string
(
thd
->
wsrep_cs
().
transaction
().
state
()));
DBUG_RETURN
((
thd
->
wsrep_cs
().
state
()
!=
wsrep
::
client_state
::
s_none
&&
thd
->
wsrep_cs
().
mode
()
==
Wsrep_client_state
::
m_local
)
?
thd
->
wsrep_cs
().
after_statement
()
:
0
);
thd
->
wsrep_cs
().
after_statement
()
:
0
);
}
}
...
...
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