Commit 7bb2ab50 authored by unknown's avatar unknown

Merge zim.(none):/home/brian/mysql/mysql-5.0

into zim.(none):/home/brian/mysql/mysql-5.1

parents 3dc25cc8 d732379b
...@@ -370,7 +370,7 @@ static byte* federated_get_key(FEDERATED_SHARE *share,uint *length, ...@@ -370,7 +370,7 @@ static byte* federated_get_key(FEDERATED_SHARE *share,uint *length,
} }
/* /*
Parse connection info from table->comment Parse connection info from table->s->comment
SYNOPSIS SYNOPSIS
parse_url() parse_url()
...@@ -412,7 +412,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_fla ...@@ -412,7 +412,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_fla
share->port= 0; share->port= 0;
uint error_num= table_create_flag ? ER_CANT_CREATE_TABLE : ER_CONNECT_TO_MASTER ; uint error_num= table_create_flag ? ER_CANT_CREATE_TABLE : ER_CONNECT_TO_MASTER ;
share->scheme= my_strdup(table->comment, MYF(0)); share->scheme= my_strdup(table->s->comment, MYF(0));
if (share->username= strstr(share->scheme, "://")) if (share->username= strstr(share->scheme, "://"))
...@@ -569,7 +569,7 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row) ...@@ -569,7 +569,7 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row)
DBUG_ENTER("ha_federated::convert_row_to_internal_format"); DBUG_ENTER("ha_federated::convert_row_to_internal_format");
// Question this // Question this
memset(record, 0, table->null_bytes); memset(record, 0, table->s->null_bytes);
for (Field **field=table->field; *field ; field++, x++) for (Field **field=table->field; *field ; field++, x++)
{ {
...@@ -742,8 +742,6 @@ int load_conn_info(FEDERATED_SHARE *share, TABLE *table) ...@@ -742,8 +742,6 @@ int load_conn_info(FEDERATED_SHARE *share, TABLE *table)
static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
{ {
FEDERATED_SHARE *share; FEDERATED_SHARE *share;
// FIX : need to redo
//String query;
char query_buffer[IO_SIZE]; char query_buffer[IO_SIZE];
String query(query_buffer, sizeof(query_buffer), &my_charset_bin); String query(query_buffer, sizeof(query_buffer), &my_charset_bin);
query.length(0); query.length(0);
...@@ -753,7 +751,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) ...@@ -753,7 +751,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
// share->table_name has the file location - we want the actual table's // share->table_name has the file location - we want the actual table's
// name! // name!
table_base_name= table->table_name; table_base_name= (char *)table->s->table_name;
DBUG_PRINT("ha_federated::get_share",("table_name %s", table_base_name)); DBUG_PRINT("ha_federated::get_share",("table_name %s", table_base_name));
/* /*
So why does this exist? There is no way currently to init a storage engine. So why does this exist? There is no way currently to init a storage engine.
...@@ -1160,9 +1158,9 @@ int ha_federated::update_row( ...@@ -1160,9 +1158,9 @@ int ha_federated::update_row(
DBUG_ENTER("ha_federated::update_row"); DBUG_ENTER("ha_federated::update_row");
has_a_primary_key= table->primary_key == 0 ? 1 : 0; has_a_primary_key= table->s->primary_key == 0 ? 1 : 0;
primary_key_field_num= has_a_primary_key ? primary_key_field_num= has_a_primary_key ?
table->key_info[table->primary_key].key_part->fieldnr -1 : -1; table->key_info[table->s->primary_key].key_part->fieldnr -1 : -1;
if (has_a_primary_key) if (has_a_primary_key)
DBUG_PRINT("ha_federated::update_row", ("has a primary key")); DBUG_PRINT("ha_federated::update_row", ("has a primary key"));
...@@ -1243,7 +1241,7 @@ int ha_federated::update_row( ...@@ -1243,7 +1241,7 @@ int ha_federated::update_row(
update_string.append(new_field_value); update_string.append(new_field_value);
new_field_value.length(0); new_field_value.length(0);
if (x+1 < table->fields) if (x+1 < table->s->fields)
{ {
update_string.append(", "); update_string.append(", ");
if (! has_a_primary_key) if (! has_a_primary_key)
...@@ -1319,7 +1317,7 @@ int ha_federated::delete_row(const byte * buf) ...@@ -1319,7 +1317,7 @@ int ha_federated::delete_row(const byte * buf)
delete_string.append(data_string); delete_string.append(data_string);
data_string.length(0); data_string.length(0);
if (x+1 < table->fields) if (x+1 < table->s->fields)
delete_string.append(" AND "); delete_string.append(" AND ");
} }
...@@ -1422,7 +1420,7 @@ int ha_federated::index_init(uint keynr) ...@@ -1422,7 +1420,7 @@ int ha_federated::index_init(uint keynr)
int error; int error;
DBUG_ENTER("ha_federated::index_init"); DBUG_ENTER("ha_federated::index_init");
DBUG_PRINT("ha_federated::index_init", DBUG_PRINT("ha_federated::index_init",
("table: '%s' key: %d", table->real_name, keynr)); ("table: '%s' key: %d", table->s->table_name, keynr));
active_index= keynr; active_index= keynr;
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