[MDEV-16708] Unsupported commands for prepared statements Created: 2018-07-08 Updated: 2023-12-06 Resolved: 2021-06-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Binary Protocol, Prepared Statements |
| Fix Version/s: | 10.6.2 |
| Type: | Task | Priority: | Blocker |
| Reporter: | Georg Richter | Assignee: | Dmitry Shulga |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | CONNECTOR_RELATED | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The page "Permitted statements" lists the commands that are allowed to be prepared. The following list is not complete and should be expanded.
|
| Comments |
| Comment by Diego Dupin [ 2018-07-23 ] | |||||||||
|
Another command that failed using binary protocol using COLLATE.
| |||||||||
| Comment by Sergei Golubchik [ 2020-09-22 ] | |||||||||
|
I think we should have a generic fallback that makes all statements prepareable. Like, prepare stores the SQL statement on the server side and execute just completely executes the statement as in the normal protocol. Statements that return result sets need to use binary protocol. This should be a fallback approach that automatically applies to all statements that are not natively prepare-able. Even new statements that can be created in the future. | |||||||||
| Comment by Georg Richter [ 2020-09-22 ] | |||||||||
|
serg XA RECOVER returns a result set. | |||||||||
| Comment by Sergei Golubchik [ 2020-09-22 ] | |||||||||
|
oops. indeed. that makes it a bit more complex then | |||||||||
| Comment by Oleksandr Byelkin [ 2020-09-22 ] | |||||||||
|
But it looks like metadata the same (depend of parameters but the same). so it is not a big problem to return them after prepare IMHO. | |||||||||
| Comment by Oleksandr Byelkin [ 2020-09-22 ] | |||||||||
|
That XA looks like do not have such complex data as ALTER/CREATE so easy can be implemented as prepared IMHO... actually CREATE/ALTER supported in SP, so to implement them we need only to organise "prepare" test somehow... so maybe it will be simpler to implement (real list of commands shoud be checked) | |||||||||
| Comment by Dmitry Shulga [ 2020-11-04 ] | |||||||||
|
The following commands is not currently supported in prepared mode: SQLCOM_LOAD |