Open TAnis222 opened 1 year ago
Hi @TAnis222 . Your sample code assumes that a cursor exists. ProxySQL doesn't support cursors , and at protocol level it informs the client that no cursor exists. If the client tries to use a non existing cursor I would assume this is probably a client connector bug .
Out of curiosity I tested your sample code (after disabling SSL to collect the traffic with tcpdump).
ProxySQL sends to the client the same resultset it received from the server.
The only difference I found is that during COM_STMT_EXECUTE
the client explicitly sets "read-only cursor" .
I am pretty confident it is a client bug, and I tracked down where this happens.
In latest mariadb client connector C , it is here , because status
is MYSQL_STATUS_GET_RESULT
.
Thanks @renecannao for your reply. So if the ProxySQL doesn't support cursors and that MariaDB connector tries to use a cursor anyway, does it mean it's not possible to use the MariaDB connector C with proxySQL ? How is a MariaDB client application supposed to do to select a set of lines from the DB? (line per line ?).
Thanks !
does it mean it's not possible to use the MariaDB connector C with proxySQL
No. It means you shouldn't use cursors.
How is a MariaDB client application supposed to do to select a set of lines from the DB? (line per line ?)
I don't understand why a modern application would use cursors at all. Personally, I think cursors made sense decades ago, when hardware was very expensive and applications were running on systems with extremely limited resources: cursors allow to limit resource usage on application server at the expenses of using resources on the backend servers. Now application can retrieve data and consume it at the same time, without using cursors. My 2c, I may be wrong.
Hello,
We have a client application using mariadb-connector/c 3.1.16 to connect to a MariaDB server (10.6). We recently introduced proxySQL in the middle and since then we started to see the error "Commands out of sync; you can't run this command now" when executing prepared statements. The issue is observerd with proxySQL 2.3.2 and still happens after upgrading to 2.5.2.
This is a sample code to reproduce the issue.
Here is the output I got after running the code
Can you help with this issue please?
Thank you!