[MDEV-14165] mysql_fetch didn't end with MYSQL_NO_DATA from statement Created: 2017-10-27 Updated: 2017-12-20 Resolved: 2017-10-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Fix Version/s: | 10.2.10 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Run this testcase with --ps-protocol
And you will get
Initially, I observed this when running rocksdb.col_opt_zerofil test with --ps-protocol.
THis is also repeatable with Facebook/MySQL-5.6, see |
| Comments |
| Comment by Sergei Petrunia [ 2017-10-27 ] |
|
Assigning to georg because I assume this is in his area. If I am wrong, please reassign |
| Comment by Sergei Petrunia [ 2017-10-27 ] |
|
I observed this on 10.2, didn't try other versions |
| Comment by Georg Richter [ 2017-10-27 ] |
|
The bug isn't in Connector/C, but in mysqltest: mysql_stmt_fetch() returns MYSQL_DATA_TRUNCATED which is correct, since the buffer bound to column i20 (defined as int(20) zerofill) has a length of 12, which is too small. |
| Comment by Georg Richter [ 2017-10-27 ] |
|
Found the problem Connector/C (but also libmysql) doesn't update the max_length in stmt->metadata for a fixed length type with ZEROFILL flag set.. |
| Comment by Georg Richter [ 2017-10-28 ] |
|
Fix pushed into 10.2-server and master branch of Connector/C |