[CONC-31] After error 1153, calling mysql_real_query() hangs Created: 2013-06-11 Updated: 2013-07-01 Resolved: 2013-07-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Janani SriGuha | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Attachments: |
|
| Description |
|
When inserting data into a blob field, if the size of the data is greater than max_allowed_packet, we get an error saying that the size is > max_allowed_packet (1153). A subsequent call to mysql_real_query() causes it to hang. A subsequent call to mysql_close() crashes. |
| Comments |
| Comment by Georg Richter [ 2013-06-11 ] |
|
Could you please provide some more information: 1) Which bzr revision number do you use (bzr log -l1 gobes you latest revision) Thanks! |
| Comment by Janani SriGuha [ 2013-06-11 ] |
|
Hi, We are using revision 64. This is reproducible using the community version of SQLyog, but will give a shorter test case in a day. |
| Comment by Janani SriGuha [ 2013-06-12 ] |
|
Hi, I'm sorry, the bug report is incorrect. The issue is that when we get the error 1135, the server status is being set to 0xfffffff7 - and in mysql_real_escape_string() it takes it as the SERVER_STATUS_NO_BACKSLASH_ESCAPES being set and incorrectly escapes, or rather does not escape, the (binary) data, truncating it. Since the truncated data size < max allowed packet, it was inserting the data. When the data is text, since the server state is incorrectly set, in the next command it hangs in mysql_real_query -> mthd_my_send_cmd -> net_clear. Also, while using the mysql connector, we always get the error 1153 for this case. However, in the mariadb connector it alternates between errors 1153 and 2013. |
| Comment by Janani SriGuha [ 2013-06-17 ] |
|
Have attached a test case for this case. Ran this on Visual Studio 10.0. The max_allowed_packet on the server where this is tested should be set to 1MB. |
| Comment by Georg Richter [ 2013-07-01 ] |
|
Fixed in rev. 68 |