2014-10-07 19:49 GMT+02:00 Alok Menghrajani <[email protected]>: > > It looks like the setting is only exposed if it is active. The variable > can > > be obtained from SHOW VARIABLES LIKE 'sql_mode', or via SELECT > > @@SESSION.sql_mode FROM DUAL. I suspect that if we support an AUTO mode, > we > > would need to check this flag prior to query execution (lazily, only the > > first time we actually encounter an inlined string variable). > > batch queries also end up needing this. Do you know what other queries > or features indirectly inline? >
I'm not sure what you mean...? How do batch queries need this? > > Another option would be to add another setting value called DEFAULT, > which > > means OFF for most databases and ON for MySQL / MariaDB. If the setting > is > > not specified, we'll actually use this DEFAULT as it aligns with MySQL's > own > > default. This would then be the sensible default for new users, to keep > them > > from running into this issue when they start using jOOQ. > > > > What do you think? > > On one hand, I like the idea of having the default be to escape > backslashes for MySQL users. Besides aligning jOOQ with the database's > default behavior, it reduces the impact of having the wrong setting > (mangled data instead of a SQL injection). On the other hand, it might > impact jOOQ users who turned NO_BACKSLASH_ESCAPES and aren't careful > when upgrading to the newer version. Yes, this is why we usually keep a section for incompatible changes in the release notes. This change will not be shipped with patch releases, only with a minor release. >From how I've perceived the discussion between Morgan Tocker and Bill Karwin (on the previously linked blog article by Morgan), I suspect that few people actually turned that flag on. So the risk / benefit ratio is probably in favour of breaking compatibility this time - in particular given that the setNString() method that you've pointed out to me also assumes that the flag is not set. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
