Bug #3288 SQL Error
Submitted: 24 Mar 2004 19:44 Modified: 26 Mar 2004 4:33
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.0.11 OS:Windows (WINDOWS 2000)
Assigned to: Mark Matthews CPU Architecture:Any

[24 Mar 2004 19:44] [ name withheld ]
Description:
It is a bug occure in Driver mysql-connector-java-3.0.11-stable-bin.jar
but not in mysql-connector-java-3.0.9-stable-bin.jar

when  i run the SQL : 

SELECT mod_id FROM el_mod WHERE booklist_name = 'MEIT¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)' OR booklist_ename = 'MEIT¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)'
(contains Chinese Character "¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)" )

It return null ResultSet in 3.0.11
but it does return in 3.0.9

Here is the Reson : 
#############################################################################
Reason: Error during query: Unexpected Exception: java.lang.StringIndexOutOfBoundsException message given: String index out of range: 106
Nested Stack Trace:
** BEGIN NESTED EXCEPTION ** 
java.lang.StringIndexOutOfBoundsException
MESSAGE: String index out of range: 106
STACKTRACE:
java.lang.StringIndexOutOfBoundsException: String index out of range: 106
#############################################################################

Please check. 

How to repeat:
when i run SQL:

SELECT mod_id FROM el_mod WHERE booklist_name = 'MEIT¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)' OR booklist_ename = 'MEIT¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)'
(contains Chinese Character "¡¶¬F´úëŠÄXŒWÁ•å\ÄÒ¡·(ÖÐÎÄ°æ)" )
[26 Mar 2004 4:33] Mark Matthews
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

This was fixed quite some time ago in the 3.0 branch after 3.0.11 was released. Please try your code with a nightly snapthot of 3.0 from http://downloads.mysql.com/snapshots.php