Bug #108126 | SQLColumns still use server-side prepared statements, when no_ssps=1 is set | ||
---|---|---|---|
Submitted: | 12 Aug 2022 1:23 | Modified: | 30 Mar 2023 12:23 |
Reporter: | qingshun luo | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 8.0.29 | OS: | CentOS |
Assigned to: | CPU Architecture: | x86 | |
Tags: | NO_SSPS, SQLColumns |
[12 Aug 2022 1:23]
qingshun luo
[12 Aug 2022 1:26]
qingshun luo
simple test code
Attachment: odbc.c (application/octet-stream, text), 5.80 KiB.
[12 Aug 2022 1:27]
qingshun luo
network flow catched by tcpdump during my test
Attachment: test-flow.pcap (application/octet-stream, text), 6.85 KiB.
[31 Aug 2022 3:39]
qingshun luo
I can repeat the same phenomenon with mysql-connector-odbc 8.0.30. By add no_i_s=1,which is now deprecated, I can avoid use server side prepare statement. Still suggest to use exec_stmt_query directly in SQLColumns same as other function like SQLTables here, because I can't tell the necessary of prepare mark for catalog or table name.
[27 Sep 2022 10:59]
MySQL Verification Team
Hello qingshun luo, Thank you for the bug report. Verified as described. Regards, Ashwini Patil
[28 Sep 2022 2:32]
qingshun luo
Thank you for your reply.
[21 Oct 2022 7:33]
Bogdan Degtyariov
Posted by developer: SQLColumns() will now use SSPS depending on the connection option NO_SSPS. The patch is pushed to the source tree.
[21 Oct 2022 8:19]
Bogdan Degtyariov
Posted by developer: Using the connection option NO_SSPS=1 will cause SQLColumns() function no to use SSPS for getting column information. In such cases the column information will be retrieved through running a normal query.
[5 Dec 2022 22:37]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/ODBC 8.0.32 release, and here's the proposed changelog entry from the documentation team: SQLColumns() would use prepared statements with NO_SSPS=1. Thank you for the bug report.
[30 Mar 2023 12:23]
qingshun luo
Thank you very much!