Commit d5808281 authored by serg@serg.mylan's avatar serg@serg.mylan

followup

parent 2c48e052
...@@ -1503,7 +1503,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) ...@@ -1503,7 +1503,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
} }
table= tables.table; table= tables.table;
table->file->index_init(0); table->file->ha_index_init(0);
tz_leapcnt= 0; tz_leapcnt= 0;
res= table->file->index_first(table->record[0]); res= table->file->index_first(table->record[0]);
...@@ -1514,7 +1514,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) ...@@ -1514,7 +1514,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
{ {
sql_print_error("Fatal error: While loading mysql.time_zone_leap_second" sql_print_error("Fatal error: While loading mysql.time_zone_leap_second"
" table: too much leaps"); " table: too much leaps");
table->file->index_end(); table->file->ha_index_end();
goto end_with_unlock; goto end_with_unlock;
} }
...@@ -1531,7 +1531,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) ...@@ -1531,7 +1531,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
res= table->file->index_next(table->record[0]); res= table->file->index_next(table->record[0]);
} }
table->file->index_end(); table->file->ha_index_end();
if (res != HA_ERR_END_OF_FILE) if (res != HA_ERR_END_OF_FILE)
{ {
...@@ -1716,7 +1716,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1716,7 +1716,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
table= tables[0].table; table= tables[0].table;
table->field[0]->store(tz_name->ptr(), tz_name->length(), &my_charset_latin1); table->field[0]->store(tz_name->ptr(), tz_name->length(), &my_charset_latin1);
table->file->index_init(0); table->file->ha_index_init(0);
if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr,
0, HA_READ_KEY_EXACT)) 0, HA_READ_KEY_EXACT))
...@@ -1727,7 +1727,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1727,7 +1727,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
tzid= table->field[1]->val_int(); tzid= table->field[1]->val_int();
table->file->index_end(); table->file->ha_index_end();
/* /*
Now we need to lookup record in mysql.time_zone table in order to Now we need to lookup record in mysql.time_zone table in order to
...@@ -1736,7 +1736,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1736,7 +1736,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
*/ */
table= tables[1].table; table= tables[1].table;
table->field[0]->store((longlong)tzid); table->field[0]->store((longlong)tzid);
table->file->index_init(0); table->file->ha_index_init(0);
if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr,
0, HA_READ_KEY_EXACT)) 0, HA_READ_KEY_EXACT))
...@@ -1752,7 +1752,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1752,7 +1752,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
tz_info->lsis= tz_lsis; tz_info->lsis= tz_lsis;
} }
table->file->index_end(); table->file->ha_index_end();
/* /*
Now we will iterate through records for out time zone in Now we will iterate through records for out time zone in
...@@ -1762,7 +1762,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1762,7 +1762,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
*/ */
table= tables[3].table; table= tables[3].table;
table->field[0]->store((longlong)tzid); table->field[0]->store((longlong)tzid);
table->file->index_init(0); table->file->ha_index_init(0);
// FIXME Is there any better approach than explicitly specifying 4 ??? // FIXME Is there any better approach than explicitly specifying 4 ???
res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr,
...@@ -1824,7 +1824,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1824,7 +1824,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
goto end_with_unlock; goto end_with_unlock;
} }
table->file->index_end(); table->file->ha_index_end();
/* /*
...@@ -1834,7 +1834,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1834,7 +1834,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
*/ */
table= tables[2].table; table= tables[2].table;
table->field[0]->store((longlong)tzid); table->field[0]->store((longlong)tzid);
table->file->index_init(0); table->file->ha_index_init(0);
// FIXME Is there any better approach than explicitly specifying 4 ??? // FIXME Is there any better approach than explicitly specifying 4 ???
res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr,
...@@ -1882,7 +1882,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1882,7 +1882,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
goto end_with_unlock; goto end_with_unlock;
} }
table->file->index_end(); table->file->ha_index_end();
table= 0; table= 0;
/* /*
...@@ -1952,7 +1952,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1952,7 +1952,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
end_with_unlock: end_with_unlock:
if (table) if (table)
table->file->index_end(); table->file->ha_index_end();
mysql_unlock_tables(thd, lock); mysql_unlock_tables(thd, lock);
......
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