This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129839 - Some multibyte strings can not be executed through SQL Editor
Summary: Some multibyte strings can not be executed through SQL Editor
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-11 20:43 UTC by David Vancouvering
Modified: 2008-09-16 17:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Vancouvering 2008-03-11 20:43:45 UTC
To reproduce, try and load the last bit of the Sakila database, which has a bunch of multibyte strings.  This fails with
the JDBC error "Error code 0, SQL state null: Not a valid escape sequence".

This is because the JDBC driver is trying to parse the SQL for escape sequences, and it bangs into multibyte strings.

You can turn off escape processing in JDBC using the method 

See http://bugs.mysql.com/bug.php?id=4279 and http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/statement.html
(look  for "5.1.6 SQL Escape Syntax in Statements").

Also see http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setEscapeProcessing(boolean).  Note that this
has no effect for PreparedStatements, so you have to use regular statements if you want to avoid escape processing.

One solution would be to let the user toggle escape processing for a given connection.
Comment 1 Roman Mostyka 2008-09-16 10:20:24 UTC
David, since sakila plugin is ready I think we can consider this issue as FIXED. Right?
Comment 2 David Vancouvering 2008-09-16 17:03:27 UTC
This was a red herring - it wasn't multibyte -- it was raw binary data for a PNG file.  This raw binary data (not
encoded as a MIME type or anything) contained 'quotes'; there is very little we can do about this.  Loading raw binary
data through the SQL editor is not supported.