| Just a quick mention that if boolean literals are converted to JDBC bind variables, then casting the parameter will break on MySQL and MariaDB as in HHH-10412. There is a dialect method that should be used to control casting on parameters in a select clause: Dialect#requiresCastingOfParametersInSelectClause. It defaults to false and is overridden only for DB2 and HSQL. Using that method to control when to cast parameters would keep boolean parameters from being broken on MySQL/MariaDB. |