I have encountered a strange behavior in mysql, using dbi in Perl.
At the end of a perl program, I issue a mysql UPDATE
command to a table. The command is executed using $dbh->execute();
and autocommit is turned on.
After the execute, the program issues $dbh->disconnect();
and exits.
The perl program runs as part of a script. Immediately when the perl program has stopped, another script executes. This script looks as the table that was updated, and here is when things become confusing to me.
Sometimes script 2 reads the old data in the table. Sometimes it sees what was just updated. I cannot understand how the initial perl program can do the $dbh->execute();
and yet it seems that the mysql table is updated several seconds later.
Any insight would be helpful! Cheers in advance.