[CONC-519] mariadb client library doesn't handle server_status and warnign_count fields received in the packet COM_STMT_EXECUTE_RESPONSE. Created: 2020-12-17 Updated: 2021-06-17 Resolved: 2021-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.11 |
| Fix Version/s: | 3.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dmitry Shulga | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
While working on implementation of the task I pushed the branch 10.6- $ cat mysql-test/main/ps_ps.test $ ./mtr --ps-protocol main.ps_ps create procedure proc_1() checksum table xyz; If the same test is run without the option --ps-protocol $ ./mtr main.ps_ps As you can seen the warning message |
| Comments |
| Comment by Dmitry Shulga [ 2020-12-17 ] |
|
Debugging of the client mysqltest shows that the data member MYSQL->warning_count has value 0. In result mysqltest is not run the statement See the code snippet below DBUG_PRINT("info",("mysql_warning_count: %d", /* if (mysql_real_query(mysql, "SHOW WARNINGS", 13)) ``` |
| Comment by Dmitry Shulga [ 2020-12-18 ] |
|
I did the following experiment: /* and then I printed warning count and error number for the prepared statement just executed. (lldb) p mysql_stmt_errno(stmt) As you can see these data fields also have zero values. |
| Comment by Georg Richter [ 2020-12-18 ] |
|
The problem is, that mysqltest always uses mysql_warning_count instead of mysql_stmt_warning_count for prepared statements. See attached quick and dirty hack. |
| Comment by Dmitry Shulga [ 2021-02-07 ] |
|
Fix is the same as for he bug report Enclosing of statements for processing of COM_STMT_EXECUTE response while (!mysql_stmt_next_result()); |