Commit 035d92f4 authored by unknown's avatar unknown

Merge


sql/sql_show.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  SCCS merged
parents 599a7842 ab600d16
...@@ -397,4 +397,9 @@ select * from t1 order by a; ...@@ -397,4 +397,9 @@ select * from t1 order by a;
a b a b
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
drop table t1; drop table t1;
...@@ -309,6 +309,7 @@ select count(*) from t1; ...@@ -309,6 +309,7 @@ select count(*) from t1;
drop table t1; drop table t1;
drop database mysqltest; drop database mysqltest;
# bug #5349
set autocommit=1; set autocommit=1;
use test; use test;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -325,4 +326,8 @@ INSERT INTO t1 VALUES ...@@ -325,4 +326,8 @@ INSERT INTO t1 VALUES
select * from t1 order by a; select * from t1 order by a;
alter table t1 engine=ndb; alter table t1 engine=ndb;
select * from t1 order by a; select * from t1 order by a;
# bug #5872
alter table t1 engine=myisam;
select * from t1 order by a;
drop table t1; drop table t1;
...@@ -1195,18 +1195,21 @@ inline int ha_ndbcluster::next_result(byte *buf) ...@@ -1195,18 +1195,21 @@ inline int ha_ndbcluster::next_result(byte *buf)
be sent to NDB be sent to NDB
*/ */
DBUG_PRINT("info", ("ops_pending: %d", ops_pending)); DBUG_PRINT("info", ("ops_pending: %d", ops_pending));
if (ops_pending)
{
if (current_thd->transaction.on) if (current_thd->transaction.on)
{ {
if (ops_pending && (execute_no_commit(this,trans) != 0)) if (execute_no_commit(this,trans) != 0)
DBUG_RETURN(ndb_err(trans)); DBUG_RETURN(ndb_err(trans));
} }
else else
{ {
if (ops_pending && (execute_commit(this,trans) != 0)) if (execute_commit(this,trans) != 0)
DBUG_RETURN(ndb_err(trans)); DBUG_RETURN(ndb_err(trans));
trans->restart(); DBUG_ASSERT(trans->restart() == 0);
} }
ops_pending= 0; ops_pending= 0;
}
contact_ndb= (check == 2); contact_ndb= (check == 2);
} }
...@@ -1641,7 +1644,7 @@ int ha_ndbcluster::write_row(byte *record) ...@@ -1641,7 +1644,7 @@ int ha_ndbcluster::write_row(byte *record)
no_uncommitted_rows_execute_failure(); no_uncommitted_rows_execute_failure();
DBUG_RETURN(ndb_err(trans)); DBUG_RETURN(ndb_err(trans));
} }
trans->restart(); DBUG_ASSERT(trans->restart() == 0);
} }
} }
if ((has_auto_increment) && (skip_auto_increment)) if ((has_auto_increment) && (skip_auto_increment))
...@@ -2278,7 +2281,7 @@ int ha_ndbcluster::rnd_init(bool scan) ...@@ -2278,7 +2281,7 @@ int ha_ndbcluster::rnd_init(bool scan)
{ {
if (!scan) if (!scan)
DBUG_RETURN(1); DBUG_RETURN(1);
cursor->restart(); DBUG_ASSERT(cursor->restart() == 0);
} }
index_init(table->primary_key); index_init(table->primary_key);
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -1999,7 +1999,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) ...@@ -1999,7 +1999,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
} }
else if (tmp != not_found_field) 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; Item_field* fld;
if (!((*reference)= fld= new Item_field(tmp))) if (!((*reference)= fld= new Item_field(tmp)))
return 1; return 1;
......
...@@ -1264,8 +1264,6 @@ public: ...@@ -1264,8 +1264,6 @@ public:
bool send_fields(List<Item> &list, uint flag) { return 0; }; bool send_fields(List<Item> &list, uint flag) { return 0; };
bool send_data(List<Item> &items)=0; bool send_data(List<Item> &items)=0;
bool send_eof() { return 0; }; bool send_eof() { return 0; };
friend class Ttem_subselect;
}; };
/* Single value subselect interface class */ /* Single value subselect interface class */
......
...@@ -1140,7 +1140,7 @@ static const char *require_quotes(const char *name, uint name_length) ...@@ -1140,7 +1140,7 @@ static const char *require_quotes(const char *name, uint name_length)
for ( ; name < end ; name++) for ( ; name < end ; name++)
{ {
uchar chr= (uchar) *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]) if (length == 1 && !system_charset_info->ident_map[chr])
return name; return name;
} }
...@@ -1169,7 +1169,7 @@ append_identifier(THD *thd, String *packet, const char *name, uint length) ...@@ -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) for (name_end= name+length ; name < name_end ; name+= length)
{ {
char chr= *name; char chr= *name;
length= my_mbcharlen(system_charset_info, chr); length= my_mbcharlen(system_charset_info, (uchar) chr);
if (length == 1 && chr == quote_char) if (length == 1 && chr == quote_char)
packet->append(&quote_char, 1, system_charset_info); packet->append(&quote_char, 1, system_charset_info);
packet->append(name, length, packet->charset()); packet->append(name, length, packet->charset());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment