[MDEV-27649] prepared statement cluster conflict crashing in item parameter setup Created: 2022-01-27 Updated: 2022-03-18 Resolved: 2022-03-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Binary Protocol, Galera, Prepared Statements |
| Affects Version/s: | 10.4, 10.5 |
| Fix Version/s: | 10.4.25, 10.5.16, 10.6.8, 10.7.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Seppo Jaakola | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Binary protocol prepared statement execution, which happens after cluster wide conflict, may crash in item parameter setup phase for: append_query_string (csinfo=0xa5a5a5a5a5a5a5a5, to=0x7fce93673ff0, str=0x7fcea8059458 "", len=11, no_backslash=false) Where character set info is not valid. The problem can be reproduced in two node cluster with sysbench: |
| Comments |
| Comment by Seppo Jaakola [ 2022-01-31 ] |
|
The analysis of this issue revealed that the problem happens if a prepared statement (PS) has been prepared, and the first EXECUTE command will fail due to cluster wide conflict, so early that EXECUTE processing has not yet started. Such situation is possible, e.g. if a PS is executed within a multi statement transaction, and the transaction is holding some offending locks with replicated transactions being applied in the node. And the cluster conflict is detected right after the packet, containing the PS EXECUTE command, has been read from client protocol. |
| Comment by Seppo Jaakola [ 2022-02-22 ] |
|
Two PRs were submitted for this issue.
|
| Comment by Jan Lindström (Inactive) [ 2022-03-18 ] |
|