Bug #32596 SET NAMES should be disallowed
Submitted: 21 Nov 2007 21:03 Modified: 3 Dec 2007 8:29
Reporter: Jim Winstead
Status: Closed
Category:Connector/ODBC Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Jim Winstead Target Version:5.1
Tags: SET NAMES
Triage: D5 (Feature request)

[21 Nov 2007 21:03] Jim Winstead
Description:
SET NAMES causes problems for C/ODBC 5.1, because it causes the client library to lose
track of what the client character set is, and the driver expects character_set_results
to be NULL.

How to repeat:
Issue SET NAMES as a query, or use it as the initial statement.

Suggested fix:
Disallow SET NAMES within the driver.
[21 Nov 2007 21:03] Jim Winstead
Patch to disallow 'SET NAMES'

Attachment: bug32596.diff (text/plain), 4.17 KiB.

[22 Nov 2007 18:43] Jim Winstead
this was committed and will be in 5.1.1.
[3 Dec 2007 8:29] MC Brown
A note has been added to the 5.1.1 changelog: 

The SET NAMES statement has been disabled because it causes problems in the ODBC driver
when determining the current client character set.
[20 Jul 11:28] y xf
i hate this !why you XX Disallow 'Set Names'? i need it , now i can't get right charaters
,i can get only '?' , i have to change to v3.5,i hate 5.1