This is probably a really dumb question but I was just wondering if you set autocommit off for MySQL and then try to acquire a lock, do you have to then commit after getting the lock for the lock to stay?
$mysqli->autocommit(FALSE);
$q = 'SELECT GET_LOCK("lockName", 10)';
$res = $mysqli->query($q);
list($acquiredLock) = $res->fetch_row();
if($acquiredLock) {
$mysqli->commit();
}
Thank you for your kind help.