summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-01-06 13:00:13 +0200
committermonty@mysql.com <>2005-01-06 13:00:13 +0200
commitd35140a851e0eccc013f18bee7dee45c4f32d774 (patch)
treeed8b3e5bd637f4d9661ed2ba57849e7e56d5178a /sql/tztime.cc
parent7cf8285b3f7ce0f6d85c3d747bd266697a576dbe (diff)
downloadmariadb-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/tztime.cc')
-rw-r--r--sql/tztime.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index dc38580f3b6..b9b9e4821c4 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1416,10 +1416,10 @@ static void
tz_init_table_list(TABLE_LIST *tz_tabs, TABLE_LIST ***global_next_ptr)
{
bzero(tz_tabs, sizeof(TABLE_LIST) * 4);
- tz_tabs[0].alias= tz_tabs[0].real_name= (char*)"time_zone_name";
- tz_tabs[1].alias= tz_tabs[1].real_name= (char*)"time_zone";
- tz_tabs[2].alias= tz_tabs[2].real_name= (char*)"time_zone_transition_type";
- tz_tabs[3].alias= tz_tabs[3].real_name= (char*)"time_zone_transition";
+ tz_tabs[0].alias= tz_tabs[0].table_name= (char*)"time_zone_name";
+ tz_tabs[1].alias= tz_tabs[1].table_name= (char*)"time_zone";
+ tz_tabs[2].alias= tz_tabs[2].table_name= (char*)"time_zone_transition_type";
+ tz_tabs[3].alias= tz_tabs[3].table_name= (char*)"time_zone_transition";
tz_tabs[0].next_global= tz_tabs[0].next_local= tz_tabs+1;
tz_tabs[1].next_global= tz_tabs[1].next_local= tz_tabs+2;
tz_tabs[2].next_global= tz_tabs[2].next_local= tz_tabs+3;
@@ -1582,7 +1582,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
thd->db= my_strdup("mysql",MYF(0));
thd->db_length= 5; // Safety
bzero((char*) &tables_buff, sizeof(TABLE_LIST));
- tables_buff[0].alias= tables_buff[0].real_name=
+ tables_buff[0].alias= tables_buff[0].table_name=
(char*)"time_zone_leap_second";
tables_buff[0].lock_type= TL_READ;
tables_buff[0].db= thd->db;