diff options
author | tomas@poseidon.ndb.mysql.com <> | 2004-10-04 12:36:25 +0000 |
---|---|---|
committer | tomas@poseidon.ndb.mysql.com <> | 2004-10-04 12:36:25 +0000 |
commit | bc5ca3a1ce5eddc3a9af7127436cc5351e98f95e (patch) | |
tree | ec5d39434f9ac915787ec351d6255a032ad26e31 /sql | |
parent | 1e66b6b3a6929ed169da9c87f43f2b808b0a35bc (diff) | |
parent | dd3cc0c1e9385182f4dd1ca2021cae92b9992a42 (diff) | |
download | mariadb-git-bc5ca3a1ce5eddc3a9af7127436cc5351e98f95e.tar.gz |
Merge
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_ndbcluster.cc | 29 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 4 |
4 files changed, 19 insertions, 18 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; diff --git a/sql/item.cc b/sql/item.cc index 7b0dcc664c7..b7523478be3 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1999,7 +1999,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) } else if (tmp != not_found_field) { - ref= 0; // To prevent "delete *ref;" on ~Item_erf() of this item + ref= 0; // To prevent "delete *ref;" on ~Item_ref() of this item Item_field* fld; if (!((*reference)= fld= new Item_field(tmp))) return 1; diff --git a/sql/sql_class.h b/sql/sql_class.h index 68d187168d3..fbbb7fc7383 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1264,8 +1264,6 @@ public: bool send_fields(List<Item> &list, uint flag) { return 0; }; bool send_data(List<Item> &items)=0; bool send_eof() { return 0; }; - - friend class Ttem_subselect; }; /* Single value subselect interface class */ diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 413de53f4bc..bd145a1de59 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1140,7 +1140,7 @@ static const char *require_quotes(const char *name, uint name_length) for ( ; name < end ; name++) { uchar chr= (uchar) *name; - length= my_mbcharlen(system_charset_info, chr); + length= my_mbcharlen(system_charset_info, (uchar) chr); if (length == 1 && !system_charset_info->ident_map[chr]) return name; } @@ -1169,7 +1169,7 @@ append_identifier(THD *thd, String *packet, const char *name, uint length) for (name_end= name+length ; name < name_end ; name+= length) { char chr= *name; - length= my_mbcharlen(system_charset_info, chr); + length= my_mbcharlen(system_charset_info, (uchar) chr); if (length == 1 && chr == quote_char) packet->append("e_char, 1, system_charset_info); packet->append(name, length, packet->charset()); |