Merge lp://qastaging/~stewart/drizzle/bug712843-no-commit-in-startTransaction into lp://qastaging/drizzle/7.0

Proposed by Stewart Smith
Status: Superseded
Proposed branch: lp://qastaging/~stewart/drizzle/bug712843-no-commit-in-startTransaction
Merge into: lp://qastaging/drizzle/7.0
Diff against target: 2143 lines (+364/-11)
46 files modified
drizzled/session.cc (+6/-11)
drizzled/sql_parse.cc (+24/-0)
drizzled/statement.h (+7/-0)
drizzled/statement/analyze.h (+1/-0)
drizzled/statement/create_table.h (+1/-0)
drizzled/statement/delete.h (+4/-0)
drizzled/statement/drop_schema.h (+1/-0)
drizzled/statement/drop_table.h (+1/-0)
drizzled/statement/insert.h (+4/-0)
drizzled/statement/insert_select.h (+4/-0)
drizzled/statement/load.h (+4/-0)
drizzled/statement/release_savepoint.h (+4/-0)
drizzled/statement/replace.h (+4/-0)
drizzled/statement/replace_select.h (+4/-0)
drizzled/statement/rollback_to_savepoint.h (+4/-0)
drizzled/statement/savepoint.h (+4/-0)
drizzled/statement/start_transaction.h (+7/-0)
drizzled/statement/unlock_tables.h (+4/-0)
drizzled/statement/update.h (+4/-0)
drizzled/transaction_services.cc (+4/-0)
plugin/myisam/tests/r/mix2_myisam.result (+1/-0)
plugin/storage_engine_api_tester/tests/r/savepoint_deadlock_txn.result (+25/-0)
plugin/storage_engine_api_tester/tests/r/transaction.result (+6/-0)
plugin/storage_engine_api_tester/tests/r/transaction_noautocommit_restart.result (+11/-0)
plugin/storage_engine_api_tester/tests/t/savepoint_deadlock_txn.test (+16/-0)
plugin/storage_engine_api_tester/tests/t/transaction_noautocommit_restart.test (+8/-0)
plugin/transaction_log/tests/r/bug686781.result (+1/-0)
plugin/transaction_log/tests/r/ddl_transaction_id.result (+1/-0)
plugin/transaction_log/tests/r/information_schema.result (+1/-0)
plugin/transaction_log/tests/r/rollback_statement.result (+1/-0)
plugin/transaction_log/tests/r/transaction_log_alter.result (+29/-0)
plugin/transaction_log/tests/r/transaction_log_create.result (+18/-0)
plugin/transaction_log/tests/r/transaction_log_data_type.result (+86/-0)
plugin/transaction_log/tests/r/transaction_log_delete.result (+11/-0)
plugin/transaction_log/tests/r/transaction_log_drop.result (+2/-0)
plugin/transaction_log/tests/r/transaction_log_large_blob.result (+1/-0)
plugin/transaction_log/tests/r/transaction_log_loaddata.result (+1/-0)
plugin/transaction_log/tests/r/transaction_log_replace.result (+4/-0)
plugin/transaction_log/tests/r/transaction_log_rollback.result (+1/-0)
plugin/transaction_log/tests/r/transaction_log_schema.result (+5/-0)
plugin/transaction_log/tests/r/transaction_log_transaction.result (+14/-0)
plugin/transaction_log/tests/r/transaction_log_update.result (+19/-0)
plugin/transaction_log/tests/t/check_transaction_log.inc (+1/-0)
tests/include/mix2.inc (+1/-0)
tests/r/randgen_queries.result (+2/-0)
tests/t/randgen_queries.test (+2/-0)
To merge this branch: bzr merge lp://qastaging/~stewart/drizzle/bug712843-no-commit-in-startTransaction
Reviewer Review Type Date Requested Status
Brian Aker Needs Fixing
Review via email: mp+48855@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2011-02-08.

Description of the change

This addresses 3 bugs that were really caused by the same thing.

- we weren't reseting server_status correctly for some rollback situations
- we weren't clearly beginning a transaction with autocommit=off, leading to this mode not behaving as would be expected.
- we were committing transactions in the startTransaction call (really).

So, we now begin a autocommit=off transaction (without an explicit BEGIN/START STATEMENT) exactly as you would expect it: on any statement except:
- DDL
- SELECT without a table (e.g. SELECT DATABASE())
- a SHOW query (remapped to a SELECT)

This started off with the simple "we shouldn't commit a transaction in the startTransaction call" - and other things needed to be fixed to make this so. We now have an assert about calling startTransaction when already in a transaction. All start/commit calls should now be balanced.

We should also be closer to fixing up some of the strange edges on the SEAPITester produced graph of calls

http://hudson.drizzle.org/view/Drizzle-param/job/drizzle-param/730/

To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

Please use inheritance from the base statement class to set a default of false.

review: Needs Fixing
2149. By Stewart Smith

switch default Statement::isTransactional() to false, have explicit overriding of true where needed.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches