diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-04 12:36:25 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-04 12:36:25 +0000 |
commit | 035d92f4b66c48bcf81ad7fb2436d161a35776d3 (patch) | |
tree | ec5d39434f9ac915787ec351d6255a032ad26e31 /sql/ha_ndbcluster.cc | |
parent | 599a78421811e7876553318ddf6bb87e9a7f917e (diff) | |
parent | ab600d164607582dd33b7419a3eb2997e9b95698 (diff) | |
download | mariadb-git-035d92f4b66c48bcf81ad7fb2436d161a35776d3.tar.gz |
Merge
sql/sql_show.cc:
Auto merged
sql/ha_ndbcluster.cc:
SCCS merged
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 0035e95ccf7..d03a088775f 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -1195,18 +1195,21 @@ inline int ha_ndbcluster::next_result(byte *buf) be sent to NDB */ DBUG_PRINT("info", ("ops_pending: %d", ops_pending)); - if (current_thd->transaction.on) + if (ops_pending) { - if (ops_pending && (execute_no_commit(this,trans) != 0)) - DBUG_RETURN(ndb_err(trans)); - } - else - { - if (ops_pending && (execute_commit(this,trans) != 0)) - DBUG_RETURN(ndb_err(trans)); - trans->restart(); + if (current_thd->transaction.on) + { + if (execute_no_commit(this,trans) != 0) + DBUG_RETURN(ndb_err(trans)); + } + else + { + if (execute_commit(this,trans) != 0) + DBUG_RETURN(ndb_err(trans)); + DBUG_ASSERT(trans->restart() == 0); + } + ops_pending= 0; } - ops_pending= 0; contact_ndb= (check == 2); } @@ -1641,7 +1644,7 @@ int ha_ndbcluster::write_row(byte *record) no_uncommitted_rows_execute_failure(); DBUG_RETURN(ndb_err(trans)); } - trans->restart(); + DBUG_ASSERT(trans->restart() == 0); } } if ((has_auto_increment) && (skip_auto_increment)) @@ -2278,7 +2281,7 @@ int ha_ndbcluster::rnd_init(bool scan) { if (!scan) DBUG_RETURN(1); - cursor->restart(); + DBUG_ASSERT(cursor->restart() == 0); } index_init(table->primary_key); DBUG_RETURN(0); @@ -2435,7 +2438,7 @@ void ha_ndbcluster::info(uint flag) DBUG_PRINT("info", ("HA_STATUS_CONST")); set_rec_per_key(); } - if (flag & HA_STATUS_ERRKEY) + if (flag & HA_STATUS_ERRKEY) { DBUG_PRINT("info", ("HA_STATUS_ERRKEY")); errkey= dupkey; |