> 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? > 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. Alok -- 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.
