Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
3.51.17 error 1064 - can 't get field metadata due to syntax error in SQL query

3.51.17 error 1064 - can 't get field metadata due to syntax error in SQL query

2007-07-19       - By 565=:> =4@(protected) 8:B>@>28G

 Back
mysql-connector-odbc-3 (See http://dbc-3.ora-code.com).51.17r581/driver/catalog.c

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

/* Build a SELECT ... LIMIT 0 to get the field metadata. */
   if (!(select= (char *)my_malloc(sizeof(char) * (ulong)result->row_count *
                                   (NAME_LEN + 1) + NAME_LEN * 2,
                                   MYF(0))))
   {
     set_mem_error(mysql);
     return NULL;
   }

   to= strxmov(select, "SELECT `", NullS);
   while ((row= mysql_fetch_row(result)))
   {
     lengths= mysql_fetch_lengths(result);
     to+= mysql_real_escape_string(mysql, to, row[0], lengths[0]);
     to= strmov(to, "`,");
   }
   *(--to)= '\0';

   to= strmov(to, " FROM `");
   if (cbCatalog)
   {
     to+= mysql_real_escape_string(mysql, to, (char *)szCatalog, cbCatalog);
     to= strmov(to, "`.`");
   }

   to+= mysql_real_escape_string(mysql, to, (char *)szTable, cbTable);
   to= strmov(to, "` LIMIT 0");
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------

I think line 772 must be

strmov(to, "`,`");