Commit 281e4bf
committed
PS-9537 fix: Existing connection cannot be reused to run multiple queries in Command Services
https://perconadev.atlassian.net/browse/PS-9537
Fixed problem with re-using the same connection created via
'mysql_command_factory->init()' / 'mysql_command_factory->connect()'
in multiple calls to' mysql_command_query->query()'.
The problem seems to be a regression introduced by upstream in their fix for
Bug #34323788
"ASAN memory leaks reported by test_mysql_command_services_component.test"
(commit mysql/mysql-server@5dc1a14).
Inside 'csi_advanced_command()' 'mcs_extn->consumer_srv_data' when is
not nullptr cannot be simply re-used as its `mcs_extn->data` member
has already been set to nullptr by `std::exchange()` inside `csi_read_rows()`.
Fixed by calling 'factory_srv->end()' and 'factory_srv->start()' in this case.1 parent 1e12635 commit 281e4bf
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
| |||
0 commit comments