like ? escape'' ... not working in 1.4.182 but was in 1.3.153

38 views
Skip to first unread message

Rob Bygrave

unread,
Nov 28, 2014, 4:39:55 AM11/28/14
to h2-da...@googlegroups.com
Hi,

I suspect there is an issue with 1.4.182 using escape''     (I have been using escape'' with the view to disabling the escaping of backslash

// these first 3 queries return count = 10 which is expected

   int count0 = select t0.id c0 from uuone t0 where t0.name like ? order by t0.name";  -- bind "testBLWCH%"
   int count1 = select t0.id c0 from uuone t0 where t0.name like ? escape'x' order by t0.name";  -- bind "testBLWCH%"
   int count2 = select t0.id c0 from uuone t0 where t0.name like ? escape'/'  order by t0.name";  -- bind "testBLWCH%" 


// this next query returns count3 = 0 using version 1.4.182 ... and 10 as expected with version 1.3.153

   int count3 = select t0.id c0 from uuone t0 where t0.name like ? escape''  order by t0.name";  -- bind "testBLWCH%"


With 1.4.182 count3 = 0   ... and all the other counts = 10 which is the expected value
With 1.3.153 count3 = 10 ... which is the result I was expecting.


NB: There is a previous discussion on using escape'' here: https://groups.google.com/forum/#!topic/h2-database/OQ7tXiFYT6o

This is not a major drama for me, I'll swap to not using any escape clause by default ... and that should be ok for me (so backslash will escape in my H2 query like clauses by default).



Cheers, Rob.



Noel Grandin

unread,
Nov 28, 2014, 5:39:28 AM11/28/14
to h2-da...@googlegroups.com
Can you create a standalone sequence of SQL commands?

i.e. CREATE TABLE ...
INSERT...
SELECT....

and then I can test this and try to debug it.

Rob Bygrave

unread,
Nov 28, 2014, 7:06:06 AM11/28/14
to h2-da...@googlegroups.com
Yes I can do that.  I'll look to do that tomorrow night now as it is a bit late here now.

Cheers, Rob.



--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/zdqGA5cw3fM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database+unsubscribe@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages