So yeah, currently it is executed once per session (and effectively once per database transaction). But MySQL 'session' variables have a client connection scope, so it's indeed not necessary to set sql_mode variable every time we start a new transaction. Though, I don't think it's any expensive.
So yeah, currently it is executed once per session (and effectively once per database transaction). But MySQL 'session' variables have a client connection scope, so it's indeed not necessary to set sql_mode variable every time we start a new transaction. Though, I don't think it's any expensive.