Closed
Bug 1164824
Opened 10 years ago
Closed 10 years ago
The run_sql command doesn't commit() after execute() so transactional changes are discarded
Categories
(Tree Management :: Treeherder, defect, P2)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
MySQLdb 1.2 and higher set autocommit to false by default. Since we're using InnoDB, this means we need to .commit() after an .execute() or the pending transaction gets discarded.
This explains why by DELETEs in bug 1163588 / bug 1163659 were not working, but yet the OPTIMIZE TABLE was (since the latter is non-transactional).
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8605801 -
Flags: review?(mdoglio)
Updated•10 years ago
|
Attachment #8605801 -
Flags: review?(mdoglio) → review+
Comment 2•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/b73307e941313f833fdb4b3905b93d989fd76f68
Bug 1164824 - run_sql: Commit the transaction after executing it
Otherwise any changes are discarded. The connection is also now closed
properly after we're done with it.
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•