Also set the `sql_mode` in the MySQLi driver (see #6996)

There is no input field to configure the SQL mode in the back end settings on purpose. It has to be changed manually in the local configuration file or in a custom extension.