eHi, The setting makes all column in new tables 'varchar_ignorecase'. Example:
create table test(id int, name varchar); insert into test values(1, 'HelloWorld'); select * from test where name regexp 'HELLOWORLD'; However, the setting doesn't apply to text literals itself, so 'Hello' in a literal isn't 'ignorecase'. I guess you could say it's a bug... I will check if there are any side effects if I change the behavior. Regards, Thomas On Tue, May 31, 2011 at 5:54 PM, chungonn <[email protected]> wrote: > Hi Thomas, > > I tried to using SET IGNORECASE=TRUE as per your instructions but > still I am not able to disable case sensitive matching with REGEXP or > LIKE. > > Here's the jdbc url - jdbc:h2:~/test;MODE=MySQL;IGNORECASE=TRUE > > The query below yields a FALSE result. Did I missed out anything? > > SELECT 'HelloWorld' regexp 'HELLOWORLD'; > FALSE > > Regards > chungonn > > On May 4, 3:49 am, Thomas Mueller <[email protected]> > wrote: >> Hi, >> >> > May I suggest that case insensitivity be automatically set when MySQL >> > mode is being used in H2 instead of doing it explicitly this would >> > make H2's MySQL mode better matches the actual behavior of MySQL. >> >> That's an option, but it would mean you can't enable the MySQL mode if >> there are already tables in the database (see the SET IGNORECASE >> documenation). >> >> Instead, I will improve the documentation. >> >> > am using hibernate 3.6 to generate all the tables, any tip how do I >> > add the SET IGNORECASE TRUE in hibernate? >> >> Yes, you could add it to the database URL: >> >> jdbc:h2:~/test;MODE=MySQL;IGNORECASE=TRUE >> >> Regards, >> Thomas > > -- > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
