1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Some fixes

This commit is contained in:
hf@deer.mysql.r18.ru
2002-12-12 12:16:34 +04:00
parent 5e8b27c0d3
commit dcb5293576
10 changed files with 35 additions and 112 deletions

View File

@ -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;