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-28854 Disallow INSERT DELAYED on Spider table
Spider supports (or at least allows) INSERT DELAYED but the documentation does not specify spider as a storage engine that supports "INSERT DELAYED". Also, although not mentioned in the documentation, "INSERT DELAYED" is not intended to be executed inside a transaction, as can be seen from the list of supported storage engines. The current implementation allows executing a delayed insert on a remote transactional table and this breaks the consistency ensured by the transaction. We too remove "internal_delayed", one of the Spider table parameters. Documentation says, > Whether to transmit existence of delay to remote servers when > executing an INSERT DELAYED statement on local server. This table parameter is only used for "INSERT DELAYED". Reviewed by: Nayuta Yanagisawa
- Loading branch information
Showing
9 changed files
with
71 additions
and
35 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,32 @@ | ||
| # | ||
| # MDEV-28854 Spider: Disallow INSERT DELAYED on Spider table | ||
| # | ||
| for master_1 | ||
| for child2 | ||
| child2_1 | ||
| child2_2 | ||
| child2_3 | ||
| for child3 | ||
| connection child2_1; | ||
| CREATE DATABASE auto_test_remote; | ||
| USE auto_test_remote; | ||
| CREATE TABLE tbl_a (id INT); | ||
| connection master_1; | ||
| CREATE DATABASE auto_test_local; | ||
| USE auto_test_local; | ||
| CREATE TABLE tbl_a ( | ||
| id INT | ||
| ) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"'; | ||
| connection master_1; | ||
| INSERT DELAYED INTO tbl_a VALUES (1); | ||
| ERROR HY000: DELAYED option not supported for table 'tbl_a' | ||
| connection master_1; | ||
| DROP DATABASE IF EXISTS auto_test_local; | ||
| connection child2_1; | ||
| DROP DATABASE IF EXISTS auto_test_remote; | ||
| for master_1 | ||
| for child2 | ||
| child2_1 | ||
| child2_2 | ||
| child2_3 | ||
| for child3 |
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 @@ | ||
| !include include/default_mysqld.cnf | ||
| !include ../my_1_1.cnf | ||
| !include ../my_2_1.cnf |
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,36 @@ | ||
| --echo # | ||
| --echo # MDEV-28854 Spider: Disallow INSERT DELAYED on Spider table | ||
| --echo # | ||
|
|
||
| --disable_query_log | ||
| --disable_result_log | ||
| --source ../../t/test_init.inc | ||
| --enable_result_log | ||
| --enable_query_log | ||
|
|
||
| --connection child2_1 | ||
| CREATE DATABASE auto_test_remote; | ||
| USE auto_test_remote; | ||
| CREATE TABLE tbl_a (id INT); | ||
|
|
||
| --connection master_1 | ||
| CREATE DATABASE auto_test_local; | ||
| USE auto_test_local; | ||
| eval CREATE TABLE tbl_a ( | ||
| id INT | ||
| ) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"'; | ||
|
|
||
| --connection master_1 | ||
| --error ER_DELAYED_NOT_SUPPORTED | ||
| INSERT DELAYED INTO tbl_a VALUES (1); | ||
|
|
||
| --connection master_1 | ||
| DROP DATABASE IF EXISTS auto_test_local; | ||
| --connection child2_1 | ||
| DROP DATABASE IF EXISTS auto_test_remote; | ||
|
|
||
| --disable_query_log | ||
| --disable_result_log | ||
| --source ../t/test_deinit.inc | ||
| --enable_query_log | ||
| --enable_result_log |
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
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