Commit 8bfaf253 authored by unknown's avatar unknown

Fixed compilation on windows.


sql/tztime.cc:
  Fixed compilation on Windows.
  Added casts to avoid warnings.
  2nd argument of hash_search should be of type const byte *.
parent 85e9258b
...@@ -1721,7 +1721,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1721,7 +1721,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
goto end_with_unlock; goto end_with_unlock;
} }
tzid= table->field[1]->val_int(); tzid= (uint)table->field[1]->val_int();
table->file->index_end(); table->file->index_end();
...@@ -1765,7 +1765,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1765,7 +1765,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
4, HA_READ_KEY_EXACT); 4, HA_READ_KEY_EXACT);
while (!res) while (!res)
{ {
ttid= table->field[1]->val_int(); ttid= (uint)table->field[1]->val_int();
if (ttid > TZ_MAX_TYPES) if (ttid > TZ_MAX_TYPES)
{ {
...@@ -1775,7 +1775,7 @@ tz_load_from_db(THD *thd, const String *tz_name) ...@@ -1775,7 +1775,7 @@ tz_load_from_db(THD *thd, const String *tz_name)
goto end_with_unlock; goto end_with_unlock;
} }
ttis[ttid].tt_gmtoff= table->field[2]->val_int(); ttis[ttid].tt_gmtoff= (long)table->field[2]->val_int();
ttis[ttid].tt_isdst= (table->field[3]->val_int() > 0); ttis[ttid].tt_isdst= (table->field[3]->val_int() > 0);
#ifdef ABBR_ARE_USED #ifdef ABBR_ARE_USED
...@@ -2111,7 +2111,8 @@ my_tz_find(THD *thd, const String * name) ...@@ -2111,7 +2111,8 @@ my_tz_find(THD *thd, const String * name)
} }
} }
} else { } else {
if ((tmp_tzname= (TZ_NAMES_ENTRY *)hash_search(&tz_names, name->ptr(), if ((tmp_tzname= (TZ_NAMES_ENTRY *)hash_search(&tz_names,
(const byte *)name->ptr(),
name->length()))) name->length())))
result_tz= tmp_tzname->tz; result_tz= tmp_tzname->tz;
else else
......
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