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-20827 Wrong param parsing in spider_direct_sql() when param cont…
…ain comma
- Loading branch information
Showing
9 changed files
with
213 additions
and
33 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --connection child2_1 | ||
| DROP USER tu@'%'; | ||
| --disable_warnings | ||
| --disable_query_log | ||
| --disable_result_log | ||
| --source ../t/test_deinit.inc | ||
| --enable_result_log | ||
| --enable_query_log | ||
| --enable_warnings |
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,11 @@ | ||
| --disable_warnings | ||
| --disable_query_log | ||
| --disable_result_log | ||
| --source ../t/test_init.inc | ||
| --enable_result_log | ||
| --enable_query_log | ||
| --enable_warnings | ||
| let $DIRECT_SQL_COMMAND= | ||
| SELECT spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"'); | ||
| --connection child2_1 | ||
| GRANT ALL ON *.* TO tu@'%' IDENTIFIED BY 'pass,1234'; |
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,37 @@ | ||
| for master_1 | ||
| for child2 | ||
| child2_1 | ||
| child2_2 | ||
| child2_3 | ||
| for child3 | ||
| connection child2_1; | ||
| GRANT ALL ON *.* TO tu@'%' IDENTIFIED BY 'pass,1234'; | ||
|
|
||
| drop and create databases | ||
| connection master_1; | ||
| CREATE DATABASE auto_test_local; | ||
| USE auto_test_local; | ||
| CREATE TEMPORARY TABLE tmp_a ( | ||
| pkey int NOT NULL, | ||
| PRIMARY KEY (pkey) | ||
| ) MASTER_1_ENGINE2 | ||
| SELECT spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"'); | ||
| spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"') | ||
| 1 | ||
| SELECT pkey FROM tmp_a; | ||
| pkey | ||
| 22 | ||
|
|
||
| deinit | ||
| connection master_1; | ||
| DROP DATABASE IF EXISTS auto_test_local; | ||
| connection child2_1; | ||
| DROP USER tu@'%'; | ||
| for master_1 | ||
| for child2 | ||
| child2_1 | ||
| child2_2 | ||
| child2_3 | ||
| for child3 | ||
|
|
||
| end of test |
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,35 @@ | ||
| --source ../include/direct_sql_with_comma_pwd_init.inc | ||
| --echo | ||
| --echo drop and create databases | ||
|
|
||
| --connection master_1 | ||
| --disable_warnings | ||
| CREATE DATABASE auto_test_local; | ||
| USE auto_test_local; | ||
| --enable_warnings | ||
|
|
||
| --disable_query_log | ||
| echo CREATE TEMPORARY TABLE tmp_a ( | ||
| pkey int NOT NULL, | ||
| PRIMARY KEY (pkey) | ||
| ) MASTER_1_ENGINE2; | ||
| eval CREATE TEMPORARY TABLE tmp_a ( | ||
| pkey int NOT NULL, | ||
| PRIMARY KEY (pkey) | ||
| ) $MASTER_1_ENGINE2; | ||
| --enable_query_log | ||
|
|
||
| eval $DIRECT_SQL_COMMAND; | ||
| SELECT pkey FROM tmp_a; | ||
|
|
||
| --echo | ||
| --echo deinit | ||
| --disable_warnings | ||
|
|
||
| --connection master_1 | ||
| DROP DATABASE IF EXISTS auto_test_local; | ||
|
|
||
| --enable_warnings | ||
| --source ../include/direct_sql_with_comma_pwd_deinit.inc | ||
| --echo | ||
| --echo end of test |
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