I am using PDO connection , following in my database connection in Codeigniter:
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => 'hostname;dbname=dbname;username=user;password=password',
'hostname' => 'hostname',
'username' => 'user',
'password' => 'password',
'database' => 'dbname',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
I have also checked slow query logs, where i am geeting query like : SELECT GET_LOCK('a7642ffa05034f140c3fc90be7efd272828a600a', 300) AS ci_session_lock;