[MDEV-13926] CONNECT engine table_type=JDBC UPDATE statement with double quote produces backslash Created: 2017-09-27  Updated: 2017-10-03

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.1.27
Fix Version/s: 10.1

Type: Bug Priority: Major
Reporter: Robert Dyas Assignee: Olivier Bertrand
Resolution: Unresolved Votes: 0
Labels: None
Environment:

centos7


Issue Links:
Duplicate
is duplicated by MDEV-13621 CONNECT engine table_type=JDBC UPDATE... Closed

 Description   

UPDATING a connect row with a string like this:
My fence is 24" high

results in the following when queried:
My fence is 24\" high

However INSERT of the same value results in the CORRECT behavior.
Note this behavior is consistent between Microsoft SQL driver and Postgres driver.
Further, in a string, I do not thing a double quote needs to be escaped at all in the SQL standard.



 Comments   
Comment by Olivier Bertrand [ 2017-09-27 ]

Version 10.1.27 was recalled because of regression errors. Stay with MariaDB 10.1.26 until 10.1.28 is released.

Comment by Elena Stepanova [ 2017-09-27 ]

The regression which caused it wasn't related to CONNECT engine though (to the best of our knowledge), it was between Galera cluster and InnoDB. 10.1.28 doesn't have any connect-specific fixes comparing to 10.1.27.

Comment by Robert Dyas [ 2017-09-27 ]

I don't think the bugs related to CONNECT I reported today are part of that regression either.

I suspect there are likely *2* root causes:

1) UPDATE strings and WHERE clause strings are being escaped incorrectly - the ONLY char to be escaped should be the QUOTE char specified by the driver, and that should be escaped by doubling it up, not using a backslash. No other characters should be escaped.

2) JDBC connection.close() is not being called 100% of the time, so connection pools (ApacheWrapper) run out of connections and hangs.

Please please TEST this so these problems do not persist in 10.1.28

Generated at Thu Feb 08 08:09:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.