Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.3.3, 3.0.2
-
None
-
None
-
Ubuntu Linux, test compiled from source, run against MySQL 5.7.19
Description
It seems that fetching columns of blob or varchar type via mysql_stmt_fetch_column() requires a call to mysql_stmt_store_result() after mysql_stmt_execute(). Otherwise all attempts to fetch the data result in CR_NO_DATA. This is different in the MySQL C connector, and I don't see why I need to bring the entire result set to the client just to make available all blobs in a row. (At least this is how I understand the documentation.) This might severely impact the performance of the new RMariaDB database backend for R.
Removing all calls to mysql_stmt_store_result() from the tests gives two failures, see [1] for a patch:
- port: 0
- socketname: (null)
1..13 - Testing against MySQL Server 5.7.19-0ubuntu0.17.04.1
- Host: Localhost via UNIX socket
- Client library: 10.2.6
- Error: (/home/muelleki/git/mariadb-connector-c/unittest/libmariadb/fetch.c: 241)
not ok 1 - test_fetch_seek - truncation: 1
- Error: (/home/muelleki/git/mariadb-connector-c/unittest/libmariadb/fetch.c: 316)
not ok 2 - test_fetch_offset
ok 3 - test_fetch_column
ok 4 - test_fetch_nobuffs
ok 5 - test_fetch_null
ok 6 - test_fetch_date
ok 7 - test_fetch_str
ok 8 - test_fetch_long
ok 9 - test_fetch_short
ok 10 - test_fetch_tiny
ok 11 - test_fetch_bigint
ok 12 - test_fetch_float
ok 13 - test_fetch_double - close default
- Failed 2 tests!
[1] https://github.com/krlmlr/mariadb-connector-c/commit/5db25b0e0448046adec7bdf8ee8cbf47228be5ac