google-code-export / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

Support MySQL single quote escaping in RunScript #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure how standard this escaping technique is, but MySQL dump is pumping 
out strings that are single quoted with interior single quotes escaped with a 
backslash ala \n.

e.g. 

INSERT INTO "text_table" VALUES (2352,'It\'s the concern we all have.');

What is the expected output? What do you see instead?

RunScript should be able to handle interior escaped single quotes.

What version of the product are you using? On what operating system, file
system, and virtual machine?

H2 1.144 / JDK 1.6.21 / Windows 7 64-bit.

Do you know a workaround?

Manually edit script file. :(

How important/urgent is the problem for you?

Important, yes.  Urgent, no.  It back-burners H2 exploration for me.

In your view, is this a defect or a feature request?

Probably a feature request.

Please provide any additional information below.

Original issue reported on code.google.com by James.Mo...@gmail.com on 25 Oct 2010 at 12:47

GoogleCodeExporter commented 9 years ago
First transaction works.
2nd and 3rd fail.
2nd one would be difficult to parse.
3rd one uses the \' escaping which would be convenient for me if H2 supported 
it.

CREATE TABLE text_table (
  id int(10) unsigned NOT NULL,
  content text NOT NULL,
  PRIMARY KEY  (id)
);
INSERT INTO text_table VALUES (1, 'Marks dog likes lo mein.');
INSERT INTO text_table VALUES (2, 'Mark's dog likes lo mein.');
INSERT INTO text_table VALUES (3, 'Mark\'s dog likes lo mein.');

Original comment by James.Mo...@gmail.com on 25 Oct 2010 at 8:21

GoogleCodeExporter commented 9 years ago
Please close this in favor of issue 245.

Original comment by James.Mo...@gmail.com on 27 Oct 2010 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by thomas.t...@gmail.com on 28 Oct 2010 at 6:43