[CONC-195] Inconsistent data if blob field fetched in parts with SQLGetData Created: 2016-07-25 Updated: 2016-07-25 Resolved: 2016-07-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
ODBC_TEST(t_blob_reading_in_chunks) OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS blob_reading"); OK_SIMPLE_STMT(Stmt, "INSERT INTO blob_reading(value) VALUES (0x0102030405060708090a0b0c0d0e0f101112131415161718)"); OK_SIMPLE_STMT(Stmt, "SELECT value FROM blob_reading"); CHECK_STMT_RC(Stmt, SQLFetch(Stmt)); is_num(valueLen, 24); for (;i < 12; ++i) { diag("#%d", i); is_num(value[i], i + 1); } CHECK_STMT_RC(Stmt, SQLGetData(Stmt, 1, SQL_C_BINARY, value, sizeof(value), &valueLen)); EXPECT_STMT(Stmt, SQLFetch(Stmt), SQL_NO_DATA); OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS blob_reading"); return OK; |