diff options
author | monty@mysql.com <> | 2005-01-06 13:00:13 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-01-06 13:00:13 +0200 |
commit | d35140a851e0eccc013f18bee7dee45c4f32d774 (patch) | |
tree | ed8b3e5bd637f4d9661ed2ba57849e7e56d5178a /sql/slave.cc | |
parent | 7cf8285b3f7ce0f6d85c3d747bd266697a576dbe (diff) | |
download | mariadb-git-d35140a851e0eccc013f18bee7dee45c4f32d774.tar.gz |
First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 6b8559859fc..0bcc1b7e852 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -893,7 +893,7 @@ bool tables_ok(THD* thd, TABLE_LIST* tables) some_tables_updating= 1; end= strmov(hash_key, tables->db ? tables->db : thd->db); *end++= '.'; - len= (uint) (strmov(end, tables->real_name) - hash_key); + len= (uint) (strmov(end, tables->table_name) - hash_key); if (do_table_inited) // if there are any do's { if (hash_search(&replicate_do_table, (byte*) hash_key, len)) @@ -1520,7 +1520,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, bzero((char*) &tables,sizeof(tables)); tables.db = (char*)db; - tables.alias= tables.real_name= (char*)table_name; + tables.alias= tables.table_name= (char*)table_name; /* Drop the table if 'overwrite' is true */ if (overwrite && mysql_rm_table(thd,&tables,1,0)) /* drop if exists */ @@ -1580,7 +1580,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, error=file->repair(thd,&check_opt) != 0; thd->net.vio = save_vio; if (error) - my_error(ER_INDEX_REBUILD, MYF(0), tables.table->real_name); + my_error(ER_INDEX_REBUILD, MYF(0), tables.table->s->table_name); err: close_thread_tables(thd); |