Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.1.7, 1.0.6
-
None
Description
Binary-protocol reads of DATE/TIME/DATETIME/TIMESTAMP columns return empty strings.
After CONC-812, mysql_stmt_bind_result sets length_value = 0 for types with negative pack_len. ps_fetch_datetime fills the MYSQL_TIME buffer but never writes *r_param->length back, so the binding reports length 0 after fetch. Connector/C++ then wraps/caches a zero-length buffer and getString() returns "".
In BinRowProtocolCapi (setPosition and cacheCurrentRow), fall back to bind[i].buffer_length (= sizeof(MYSQL_TIME)) when length_value == 0 for temporal buffer types.