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

This commit is contained in:
Aokromes
2016-08-10 17:48:25 +02:00
parent 085dd6a21d
commit 5db8edd611
5 changed files with 57 additions and 16 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;
}