|
|||||||||||
|
bk commit into 5.1 tree (istruewing:1.2518)
From: <ingo(at)mysql.com>
Date: Sat Jun 30 2007 - 12:17:28 EDT
ChangeSet@1.2518, 2007-06-30 18:17:20+02:00, istruewing@synthia.local +3 -0 Post-merge fixes.
sql/ha_partition.cc@1.96, 2007-06-30 18:17:08+02:00, istruewing@synthia.local +9 -0
Post-merge fixes.
storage/federated/ha_federated.cc@1.103, 2007-06-30 18:17:08+02:00, istruewing@synthia.local +35 -21
Post-merge fixes.
storage/federated/ha_federated.h@1.49, 2007-06-30 18:17:08+02:00, istruewing@synthia.local +4 -3
Post-merge fixes.
diff -Nrup a/sql/ha_partition.cc b/sql/ha_partition.cc --- a/sql/ha_partition.cc 2007-06-25 11:42:33 +02:00@@ -4714,6 +4714,12 @@ void ha_partition::get_dynamic_partition HA_EXTRA_KEY_CACHE:
int ha_partition::extra(enum ha_extra_function operation) @@ -4795,6 +4801,9 @@ int ha_partition::extra(enum ha_extra_fu
*/
break;
} + /* Category 7), used by federated handlers */ + case HA_EXTRA_INSERT_WITH_UPDATE: + DBUG_RETURN(loop_extra(operation));
default:
--- a/storage/federated/ha_federated.cc 2007-06-30 13:17:43 +02:00 - query.append(STRING_WITH_LEN(" WHERE 1=0"); + query.append(STRING_WITH_LEN(" WHERE 1=0"));
if (mysql_real_query(mysql, query.ptr(), query.length()))
{
@@ -1572,7 +1572,7 @@ static FEDERATED_SHARE *get_share(const
/* chops off trailing comma */
query.length(query.length() - sizeof_trailing_comma);
append_ident(&query, tmp_share.table_name,
tmp_share.table_name_length, ident_quote_char);
@@ -1809,6 +1809,7 @@ bool ha_federated::append_stmt_insert(St
char insert_buffer[FEDERATED_QUERY_BUFFER_SIZE];
Field **field;
/* The main insert query string */
insert_string.append(STRING_WITH_LEN("INSERT INTO ")); append_ident(&insert_string, share->table_name, share->table_name_length,
ident_quote_char);
- insert_string.append(FEDERATED_OPENPAREN); - tmp_length= insert_string.length() - strlen(STRING_WITH_LEN(", ")); + tmp_length= insert_string.length(); + insert_string.append(STRING_WITH_LEN(" ("));
/*
next field is in the write set
*/
insert_string.append(STRING_WITH_LEN(", "));
}
insert_string.append(STRING_WITH_LEN(" VALUES ")); @@ -2371,6 +2370,7 @@ int ha_federated::delete_row(const uchar
delete_string.append(value_quote_char);
}
delete_string.append(STRING_WITH_LEN(" AND "));
+ } }
// Remove trailing AND
case HA_EXTRA_INSERT_WITH_UPDATE:
insert_dup_update= TRUE;
break;
- case HA_EXTRA_RESET:
- insert_dup_update= FALSE;
- ignore_duplicates= FALSE;
- replace_duplicates= FALSE; - break; default:
/* do nothing */
DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));
}
DBUG_RETURN(0); +} + + +/** + @brief Reset state of file to after 'open'. + + @detail This function is called after every statement for all tables + used by that statement. + + @return Operation status + @retval 0 OK +*/ + +int ha_federated::reset(void) +{ + insert_dup_update= FALSE; + ignore_duplicates= FALSE; + replace_duplicates= FALSE; + return 0; } diff -Nrup a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h --- a/storage/federated/ha_federated.h 2007-06-30 13:17:43 +02:00@@ -107,9 +107,9 @@ private: bool append_stmt_insert(String *query);
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Sun Jul 1 13:40:24 2007 This archive was generated by hypermail 2.1.8 : Sun Jul 01 2007 - 13:50:03 EDT |
||||||||||
|
|||||||||||