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
Backport fix for MDEV-29352 to 10.3-10.5
The fix for MDEV-29352 was pushed to 10.6+ but the code causing the bug is old and the bug is unlikely to be a recent regression in 10.6. So, we apply the fix also to older versions, 10.3-10.5. The original commit message: MDEV-29352 SIGSEGV's in strlen and unknown location on optimized builds at SHUTDOWN When the UDF creation frails to write the newly created UDF into the related system table, the UDF is still created in memory. However, as it is now, the related DLL is unloaded in this case right in the mysql_create_function. And failure happens when the UDF handle is freed and tries to unload the respective DLL which is still unloaded.
- Loading branch information
1 parent
b9c1c07
commit f5e4e15
Showing
4 changed files
with
34 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect | ||
|
|
||
| --exec echo "wait" > $_expect_file_name | ||
| --shutdown_server | ||
| --source include/wait_until_disconnected.inc | ||
| --exec echo "restart" > $_expect_file_name | ||
| --enable_reconnect | ||
| --source include/wait_until_connected_again.inc |
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,12 @@ | ||
| CREATE TABLE t (c INT); | ||
| SHOW CREATE TABLE t; | ||
| Table Create Table | ||
| t CREATE TABLE `t` ( | ||
| `c` int(11) DEFAULT NULL | ||
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci | ||
| FLUSH TABLES WITH READ LOCK; | ||
| CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; | ||
| ERROR HY000: Can't execute the query because you have a conflicting read lock | ||
| SELECT * FROM t; | ||
| c | ||
| DROP TABLE t; |
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 @@ | ||
| CREATE TABLE t (c INT); | ||
| SHOW CREATE TABLE t; | ||
| FLUSH TABLES WITH READ LOCK; | ||
|
|
||
| --error ER_CANT_UPDATE_WITH_READLOCK | ||
| CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so'; | ||
| SELECT * FROM t; | ||
|
|
||
| --source include/restart_spider.inc | ||
|
|
||
| DROP TABLE t; |