diff options
author | jimw@mysql.com <> | 2006-01-06 08:34:55 -0800 |
---|---|---|
committer | jimw@mysql.com <> | 2006-01-06 08:34:55 -0800 |
commit | d8a4aafe3357e0e4cdbcabf20ae545b832e8f61d (patch) | |
tree | 2051ec4c25b53bd0dfb5b8f24c5b125bbc2c45f9 /sql/ha_ndbcluster.cc | |
parent | be8f21e8f10b9dec5cc3918894cb4745f554e3ba (diff) | |
parent | d07a57c03ae13cbbf7fe68cd4eebc8b7266eaa69 (diff) | |
download | mariadb-git-d8a4aafe3357e0e4cdbcabf20ae545b832e8f61d.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-5.0-14212
into mysql.com:/home/jimw/my/mysql-5.0-clean
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5d10a758f86..699b3f05a70 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3256,6 +3256,10 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) if (lock_type != F_UNLCK) { DBUG_PRINT("info", ("lock_type != F_UNLCK")); + if (!thd->transaction.on) + m_transaction_on= FALSE; + else + m_transaction_on= thd->variables.ndb_use_transactions; if (!thd_ndb->lock_count++) { PRINT_OPTION_FLAGS(thd); @@ -3270,7 +3274,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) ERR_RETURN(ndb->getNdbError()); no_uncommitted_rows_reset(thd); thd_ndb->stmt= trans; - trans_register_ha(thd, FALSE, &ndbcluster_hton); + if (m_transaction_on) + trans_register_ha(thd, FALSE, &ndbcluster_hton); } else { @@ -3285,7 +3290,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) ERR_RETURN(ndb->getNdbError()); no_uncommitted_rows_reset(thd); thd_ndb->all= trans; - trans_register_ha(thd, TRUE, &ndbcluster_hton); + if (m_transaction_on) + trans_register_ha(thd, TRUE, &ndbcluster_hton); /* If this is the start of a LOCK TABLE, a table look @@ -3319,10 +3325,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) m_ha_not_exact_count= !thd->variables.ndb_use_exact_count; m_autoincrement_prefetch= (ha_rows) thd->variables.ndb_autoincrement_prefetch_sz; - if (!thd->transaction.on) - m_transaction_on= FALSE; - else - m_transaction_on= thd->variables.ndb_use_transactions; m_active_trans= thd_ndb->all ? thd_ndb->all : thd_ndb->stmt; DBUG_ASSERT(m_active_trans); |