Commit c35d32a0 authored by patg@krsna.patg.net's avatar patg@krsna.patg.net

Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0

into  krsna.patg.net:/home/patg/mysql-build/mysql-5.0.test1
parents 3cde418f 4b71f176
...@@ -1169,6 +1169,7 @@ bool ha_federated::create_where_from_key(String *to, ...@@ -1169,6 +1169,7 @@ bool ha_federated::create_where_from_key(String *to,
switch(ranges[i]->flag) { switch(ranges[i]->flag) {
case(HA_READ_KEY_EXACT): case(HA_READ_KEY_EXACT):
DBUG_PRINT("info", ("federated HA_READ_KEY_EXACT %d", i));
if (store_length >= length || if (store_length >= length ||
!needs_quotes || !needs_quotes ||
key_part->type == HA_KEYTYPE_BIT || key_part->type == HA_KEYTYPE_BIT ||
...@@ -1203,6 +1204,7 @@ bool ha_federated::create_where_from_key(String *to, ...@@ -1203,6 +1204,7 @@ bool ha_federated::create_where_from_key(String *to,
} }
break; break;
case(HA_READ_AFTER_KEY): case(HA_READ_AFTER_KEY):
DBUG_PRINT("info", ("federated HA_READ_AFTER_KEY %d", i));
if (store_length >= length) /* end key */ if (store_length >= length) /* end key */
{ {
if (emit_key_part_name(&tmp, key_part)) if (emit_key_part_name(&tmp, key_part))
...@@ -1227,6 +1229,7 @@ bool ha_federated::create_where_from_key(String *to, ...@@ -1227,6 +1229,7 @@ bool ha_federated::create_where_from_key(String *to,
break; break;
} }
case(HA_READ_KEY_OR_NEXT): case(HA_READ_KEY_OR_NEXT):
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_NEXT %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
tmp.append(FEDERATED_GE) || tmp.append(FEDERATED_GE) ||
emit_key_part_element(&tmp, key_part, needs_quotes, 0, ptr, emit_key_part_element(&tmp, key_part, needs_quotes, 0, ptr,
...@@ -1234,6 +1237,7 @@ bool ha_federated::create_where_from_key(String *to, ...@@ -1234,6 +1237,7 @@ bool ha_federated::create_where_from_key(String *to,
DBUG_RETURN(1); DBUG_RETURN(1);
break; break;
case(HA_READ_BEFORE_KEY): case(HA_READ_BEFORE_KEY):
DBUG_PRINT("info", ("federated HA_READ_BEFORE_KEY %d", i));
if (store_length >= length) if (store_length >= length)
{ {
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
...@@ -1244,6 +1248,7 @@ bool ha_federated::create_where_from_key(String *to, ...@@ -1244,6 +1248,7 @@ bool ha_federated::create_where_from_key(String *to,
break; break;
} }
case(HA_READ_KEY_OR_PREV): case(HA_READ_KEY_OR_PREV):
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_PREV %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
tmp.append(FEDERATED_LE) || tmp.append(FEDERATED_LE) ||
emit_key_part_element(&tmp, key_part, needs_quotes, 0, ptr, emit_key_part_element(&tmp, key_part, needs_quotes, 0, ptr,
...@@ -2509,11 +2514,12 @@ int ha_federated::delete_all_rows() ...@@ -2509,11 +2514,12 @@ int ha_federated::delete_all_rows()
/* /*
TRUNCATE won't return anything in mysql_affected_rows TRUNCATE won't return anything in mysql_affected_rows
*/ */
deleted+= records;
if (mysql_real_query(mysql, query.ptr(), query.length())) if (mysql_real_query(mysql, query.ptr(), query.length()))
{ {
DBUG_RETURN(stash_remote_error()); DBUG_RETURN(stash_remote_error());
} }
deleted+= records;
records= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
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