On Friday 16 February 2001 00:41, Sonam Chauhan wrote:
>I tried posting this to the general list with no response.
>
>Basically I tracked down what looks like a bug in Apache::Session
>(the session updates the DB much after it's been told to update)
>The mySQL update log was crucial in tracking this down. But my boss
>told me that the mySQL log wasn't dependable -- since the SQL recorded
>may actually be recorded "out of order" (more on this below)
>Is this accurate?
>
>The mySQL manual doesn't explicity state anywhere if the update log
>entries reflect the _exact_ order of SQL execution. So I needed
>your opinion.
>
>Can someone just drop a 'yes'/'no' to whether the update log reflects
>the exact order of database updates?
>
>What about different users updating one database? Also, when is the SQL
>logged -- at the beginning or at the end of execution?
The update logging is done immediately after a query completes. So you can
have a condition when a query that started earlier but did not go very fast
gets logged after a faster query that started later. This, however, should
not affect the results of re-running the update log queries, as the logging
happens before the locks are released - so updates to the same table will
always be logged in the execution order.
The situation is different with the full log ( --log option). The query is
logged before it is even parsed, so you will see even syntactically incorrect
queries in the log file. In this case, the queries are logged in the order
they arrive. For debugging clients, the use for the full log is better, as it
contains more information.
--
MySQL Development Team
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sasha Pachev <sasha@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA
<___/