[MDEV-13927] CONNECT engine table_type=JDBC escaping backslash character on UPDATE Created: 2017-09-27  Updated: 2017-11-11  Resolved: 2017-11-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.1.27
Fix Version/s: 10.0.34, 10.1.29, 10.2.10

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

centos7


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

 Description   

CONNECT with JDBC is trying to escape the backslash character when doing an UPDATE on a connect table.

So when I update a row and set the value to
here is my \ backslash character

it returns from a query as
here is my
baclslash character

It appears CONNECT in 10.1.27 for UPDATE statements is trying to escape characters in strings that it doesn't need to escape; previous bug reports about double quote char and single quote char. It seems CONNECT should not escape ANY characters in a string except the single quote char itself, which is escaped per the SQL standard by doubling up the single quote not using a backslash.



 Comments   
Comment by Robert Dyas [ 2017-09-27 ]

Yet more issues... it appears that WHERE clause strings are also escaped incorrectly just like UPDATE strings. Same issues with
and \" and \' rather than '' (that is two single quotes) being used.

Comment by Olivier Bertrand [ 2017-10-03 ]

Duplicated. Was fixed as MDEV-13621

Comment by Robert Dyas [ 2017-10-03 ]

Hi Olivier... does that mean that it was not fixed in 10.1.27 due to a build problem again?
Is that also why the pooling does not work in 10.1.27? (pooling worked great in 10.1.26... in 10.1.27 it seems the connections are never returned to the pool, so the pool runs out after 8 or 10 connections and just hangs... would be great to put a 30 second timeout on that...).

Comment by Olivier Bertrand [ 2017-10-03 ]

Perhaps; however it is fixed in 10.1.28.
Pooling is a regression bug that is not fixed yet.

Comment by Robert Dyas [ 2017-11-11 ]

Olivier... The backslash issue was resolved in another ticket as related to the JDBC driver escaping method (for which there is a work around... not yet tested, so you can close this ticket).

Was the pooling regression fixed in 10.1.28?

Comment by Olivier Bertrand [ 2017-11-11 ]

The pooling regression bug was what you described in one of your comment (connection not released from the pool when closing). It will be fixed in 10.1.29.
BTW with MariaDB 10.2.10 you can begin test the MONGO table type.

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