Server/Database: Reduce differences between 3.3.5 and 6.x branches

Cherry-pick 1bea52fd46 and 543bea32 to add support to TYPE_BINARY MySQL field type
This commit is contained in:
jackpoz
2016-08-10 16:02:22 +02:00
parent 3755937611
commit abe37e458c
5 changed files with 59 additions and 18 deletions

View File

@@ -187,8 +187,16 @@ bool ResultSet::NextRow()
return false;
}
unsigned long* lengths = mysql_fetch_lengths(_result);
if (!lengths)
{
TC_LOG_WARN("sql.sql", "%s:mysql_fetch_lengths, cannot retrieve value lengths. Error %s.", __FUNCTION__, mysql_error(_result->handle));
CleanUp();
return false;
}
for (uint32 i = 0; i < _fieldCount; i++)
_currentRow[i].SetStructuredValue(row[i], _fields[i].type);
_currentRow[i].SetStructuredValue(row[i], _fields[i].type, lengths[i]);
return true;
}