Scenario:-
PHP script launches sequence of MySQL queries recording results in a log. Receives
a parameter to identify report to be generated.
2 sessions started which launch PHP script to generate 2 reports simultaneously.
I will call these First and Second Report to differentiate. They are started
within a fraction of a second of each other but take about 20 seconds to execute.
There are around 140 queries in the script.
Result:-
Tables show the results of the same Insert query for the First Report, then
the Second Report, then the First Report again. Data in these tables is generated
using INSERT...FROM followed by a SELECT statement. Field values generated
by SUM function for the second set of results are double the value of the first
set. Log indicates PHP requested query once only in First Report, so query
was not re-sent by PHP, nor was PHP script run twice, as both scenarios would
have been recorded in the log.
Hypothesis:-
MySQL processes an INSERT query for First Report when it receives the same query
for Second Report. Something makes it think that the First Report query has
not been run and re-runs it, creating duplicate records.
Action Taken:-
LOW_PRIORITY clause inserted into INSERT query. This did not resolve the problem.
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs [at] m.gmane.org
