We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 143b254 commit f791705Copy full SHA for f791705
diesel/src/mysql/connection/stmt/mod.rs
@@ -117,7 +117,14 @@ impl Statement {
117
/// you must call this function again before calling `mysql_stmt_fetch`.
118
pub unsafe fn bind_result(&self, binds: *mut ffi::MYSQL_BIND) -> QueryResult<()> {
119
unsafe {
120
+ let prev_length = *(*binds).length;
121
ffi::mysql_stmt_bind_result(self.stmt.as_ptr(), binds);
122
+
123
+ // HACK: Newer libmariadb versions initialise length to 0 for fixed-size
124
+ // types. Restore length to previous value if this is the case.
125
+ if *(*binds).length == 0 {
126
+ *(*binds).length = prev_length;
127
+ }
128
}
129
self.did_an_error_occur()
130
0 commit comments