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-23092 SIGABRT when setting invalid wsrep_provider
Some invalid wsrep_provider paths may be interpreted as a valid directory. For example '/invalid/libgalera_smm.so' with UTF character set is interpreted as '/', which is a valid directory. A early check that wsrep_provider should not be a directory fixes it.
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 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,13 @@ | ||
| SET COLLATION_CONNECTION='utf16le_bin'; | ||
| SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so'; | ||
| ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/' | ||
| SET GLOBAL wsrep_cluster_address='OFF'; | ||
| SET GLOBAL wsrep_slave_threads=10; | ||
| SELECT 1; | ||
| 1 | ||
| 1 | ||
| SET GLOBAL wsrep_cluster_address='gcomm://'; | ||
| SET GLOBAL wsrep_slave_threads=DEFAULT; | ||
| CALL mtr.add_suppression("wsrep_load()"); | ||
| CALL mtr.add_suppression("Failed to create a new provider"); | ||
| CALL mtr.add_suppression("Failed to load provider"); |
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,8 @@ | ||
| !include ../my.cnf | ||
|
|
||
| [mysqld.1] | ||
| wsrep-on=OFF | ||
| binlog-format=ROW | ||
| wsrep-provider=none | ||
| wsrep-cluster-address='gcomm://' | ||
| 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,22 @@ | ||
| # | ||
| # MDEV-23092: SIGABRT in wsrep::server_state::provider when setting | ||
| # invalid wsrep_provider (on optimized builds) | ||
| # | ||
|
|
||
| --source include/have_innodb.inc | ||
| --source include/have_wsrep.inc | ||
| --source include/have_binlog_format_row.inc | ||
|
|
||
| SET COLLATION_CONNECTION='utf16le_bin'; | ||
| --error 1231 | ||
| SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so'; | ||
| SET GLOBAL wsrep_cluster_address='OFF'; | ||
| SET GLOBAL wsrep_slave_threads=10; | ||
| SELECT 1; | ||
|
|
||
| SET GLOBAL wsrep_cluster_address='gcomm://'; | ||
| SET GLOBAL wsrep_slave_threads=DEFAULT; | ||
|
|
||
| CALL mtr.add_suppression("wsrep_load()"); | ||
| CALL mtr.add_suppression("Failed to create a new provider"); | ||
| CALL mtr.add_suppression("Failed to load provider"); |
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