diff options
author | unknown <mikael@dator6.(none)> | 2007-09-14 00:10:47 +0200 |
---|---|---|
committer | unknown <mikael@dator6.(none)> | 2007-09-14 00:10:47 +0200 |
commit | 5f95f01b4d723fd05cc6de75ba62326084172754 (patch) | |
tree | 797ea1b562efa6af810765337245a849eee8b281 /sql/ha_ndbcluster.h | |
parent | 577a1633a916cea30e56f45877b7504c55d6dd8f (diff) | |
download | mariadb-git-5f95f01b4d723fd05cc6de75ba62326084172754.tar.gz |
BUG#30996: Committed too early when autocommit and lock table
Moved out a lot of code into functions from external_lock and
start_stmt
Fixed a crashing bug at memory alloc failure
Merged the stmt and all variables into one trans variable
Always register start of statement as according to the
interface of the handlers.
Also register for start of transaction when not statement commit
== not autocommit AND no begin - commit ongoing
Now that we registered in a proper manner we also needed to handle
the commit call when end of statement and transaction is ongoing
Added start_stmt_count to know when we have start of statement
for first table
mysql-test/suite/ndb/r/ndb_lock_table.result:
Added a new test case for bug30996
mysql-test/suite/ndb/t/ndb_lock_table.test:
Added a new test case for bug30996
sql/ha_ndbcluster.cc:
Moved out a lot of code into functions from external_lock and
start_stmt
Fixed a crashing bug at memory alloc failure
Merged the stmt and all variables into one trans variable
Always register start of statement as according to the
interface of the handlers.
Also register for start of transaction when not statement commit
== not autocommit AND no begin - commit ongoing
Now that we registered in a proper manner we also needed to handle
the commit call when end of statement and transaction is ongoing
Added start_stmt_count to know when we have start of statement
for first table
sql/ha_ndbcluster.h:
New functions and merged variables
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r-- | sql/ha_ndbcluster.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index a6f992226c2..808ffe20f3e 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -204,8 +204,8 @@ class Thd_ndb Ndb *ndb; ulong count; uint lock_count; - NdbTransaction *all; - NdbTransaction *stmt; + uint start_stmt_count; + NdbTransaction *trans; bool m_error; bool m_slow_path; int m_error_code; @@ -496,6 +496,10 @@ private: friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*, bool); friend int execute_no_commit_ie(ha_ndbcluster*, NdbTransaction*, bool); + void transaction_checks(THD *thd); + int start_statement(THD *thd, Thd_ndb *thd_ndb, Ndb* ndb); + int init_handler_for_statement(THD *thd, Thd_ndb *thd_ndb); + NdbTransaction *m_active_trans; NdbScanOperation *m_active_cursor; const NdbDictionary::Table *m_table; |