Bug #53891 ODBC driver not parsing comments correctly
Submitted: 21 May 2010 16:39 Modified: 24 Feb 2016 2:35
Reporter: Farid Zidan (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.01.06.00 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[21 May 2010 16:39] Farid Zidan
Description:
ODBC driver is not parsing comments correctly

How to repeat:
create table test_comment(col1 varchar(20));

/*http://forums.oracle.com/forums/thread.jspa?threadID=1055333&stqc=true*/
insert into test_comment values('abc');

SQL Error. Native Code: 506, SQLState: 07001, Return Code: -1
[MySQL][ODBC 5.1 Driver][mysqld-5.1.44-community]SQLBindParameter not used for all parameters

Suggested fix:
Ignore parameter bind markers embedded in comments
[11 Oct 2011 12:22] Bogdan Degtyariov
Verified with 5.1.9
The test case comes in the next post.
[11 Oct 2011 12:23] Bogdan Degtyariov
C test case

Attachment: bug53891.c (text/plain), 2.18 KiB.

[8 Apr 2013 8:04] Bogdan Degtyariov
The bug is fixed in Connector/ODBC 5.2.4 because this version uses the Server Side Prepared Statements.

However, if use option NO_SSPS=1 (disable Server Side Prepared Statements and prepare queries on the client) it will reoccur again.
So, keeping the report open.
[24 Feb 2016 2:35] Daniel So
Added the following entry to the Connector/ODBC 5.3.6 changelog:

"Because Connector/ODBC did not parse comments properly, the parameter markers embedded in comments caused the complaint that SQLBindParameter was not used for all parameters."