Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-22681 EXECUTE IMMEDIATE crashes server if wsrep is on.
A wsrep transaction was started for EXECUTE IMMEDIATE, which caused assertion failure when the executed statement was CREATE TABLE which should be executed in TOI mode. As a fix, don't start wsrep transaction for EXECUTE IMMEDIATE to let the wsrep state logic to be handled from inside stored procedure codepath. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
- Loading branch information
Showing
6 changed files
with
240 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
| EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b'; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| !include ../my.cnf | ||
|
|
||
| [mysqld.1] | ||
| wsrep-on=ON | ||
| log-bin | ||
| binlog-format=ROW | ||
| innodb-flush-log-at-trx-commit=1 | ||
| wsrep-cluster-address=gcomm:// | ||
| wsrep-provider=@ENV.WSREP_PROVIDER | ||
| innodb-autoinc-lock-mode=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # | ||
| # MDEV-22681: Server crashes in galera::ReplicatorSMM::CommitOrder::CommitOrder | ||
| # or assertion failed in wsrep::transaction::before_prepare. | ||
| # | ||
| # EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b' | ||
| # crashes the server if binlog is on (see mdev_22681.cnf for configuration). | ||
| # | ||
| --source include/have_wsrep.inc | ||
| --source include/have_wsrep_provider.inc | ||
| --source include/have_innodb.inc | ||
|
|
||
| CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
| EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b'; | ||
|
|
||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters