3.51.17 error 1064 - can"t get field metadata due to syntax error in SQL query
am 19.07.2007 10:21:58 von AVL------=_NextPart_000_00A5_01C7C9FF.66F03450
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
mysql-connector-odbc-3.51.17r581/driver/catalog.c
------------------------------------------------------------ -------------=
------------------------------------------------------------ -------------=
----------
/* Build a SELECT ... LIMIT 0 to get the field metadata. */
if (!(select=3D (char *)my_malloc(sizeof(char) * =
(ulong)result->row_count *
(NAME_LEN + 1) + NAME_LEN * 2,
MYF(0))))
{
set_mem_error(mysql);
return NULL;
}
to=3D strxmov(select, "SELECT `", NullS);
while ((row=3D mysql_fetch_row(result)))
{
lengths=3D mysql_fetch_lengths(result);
to+=3D mysql_real_escape_string(mysql, to, row[0], lengths[0]);
to=3D strmov(to, "`,");
}
*(--to)=3D '\0';
to=3D strmov(to, " FROM `");
if (cbCatalog)
{
to+=3D mysql_real_escape_string(mysql, to, (char *)szCatalog, =
cbCatalog);
to=3D strmov(to, "`.`");
}
to+=3D mysql_real_escape_string(mysql, to, (char *)szTable, =
cbTable);
to=3D strmov(to, "` LIMIT 0");
=
------------------------------------------------------------ -------------=
------------------------------------------------------------ -------------=
-----------
I think line 772 must be
strmov(to, "`,`");
------=_NextPart_000_00A5_01C7C9FF.66F03450--