Is MySQL commit synchronous when executed from PHP PDO? -
using php pdo interface mysql, suppose have code end transaction (assuming begun):
$pdo->query('commit');
when function returns, have writes log been flushed? is, transaction committed, or have merely made request committed? assuming have not set options delay flushing, such as, example, setting innodb_flush_log_at_trx_commit zero.
i ask because, if follow code above this:
echo 'transaction has been committed.';
i wouldn't want caught in lie.
update: see comments below. i'm not asking how innodb works. i'm asking whether pdo interface waits innodb engine execute command before returning.
update #2: should have said commit performed call pdo::commit, how it, in case there's difference between , doing sql.
Comments
Post a Comment