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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -