mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Some fixes
This commit is contained in:
@ -1336,28 +1336,17 @@ mysql_fetch_row(MYSQL_RES *res)
|
||||
ulong * STDCALL
|
||||
mysql_fetch_lengths(MYSQL_RES *res)
|
||||
{
|
||||
ulong *lengths,*prev_length;
|
||||
byte *start;
|
||||
ulong *lengths;
|
||||
MYSQL_ROW column,end;
|
||||
|
||||
if (!(column=res->current_row))
|
||||
return 0; /* Something is wrong */
|
||||
if (res->data)
|
||||
{
|
||||
start=0;
|
||||
prev_length=0; /* Keep gcc happy */
|
||||
lengths=res->lengths;
|
||||
for (end=column+res->field_count+1 ; column != end ; column++,lengths++)
|
||||
for (end=column+res->field_count; column != end ; column++,lengths++)
|
||||
{
|
||||
if (!*column)
|
||||
{
|
||||
*lengths=0; /* Null */
|
||||
continue;
|
||||
}
|
||||
if (start) /* Found end of prev string */
|
||||
*prev_length= (uint) (*column-start-1);
|
||||
start= *column;
|
||||
prev_length=lengths;
|
||||
*lengths= *column ? strlen(*column) : 0;
|
||||
}
|
||||
}
|
||||
return res->lengths;
|
||||
|
Reference in New Issue
Block a user