Commit 1e12635
committed
PS-9551 fix: Setting MYSQL_COMMAND_LOCAL_THD_HANDLE may crash the server
https://perconadev.atlassian.net/browse/PS-9551
Fixed problem in 'mysql_command_services_imp::set()'.
When user sets the 'MYSQL_COMMAND_LOCAL_THD_HANDLE' option very early after
server startup (when 'srv_session_server_is_available()' still returns false),
'service->open(nullptr, nullptr)' may return nullptr and it is unsafe to use it afterwards.
Fixed by checking for nullness and returning earlier.1 parent b7cca05 commit 1e12635
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| 663 | + | |
| 664 | + | |
663 | 665 | | |
664 | 666 | | |
665 | 667 | | |
| |||
0 commit comments