diff options
author | unknown <serg@janus.mylan> | 2007-01-29 10:40:26 +0100 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2007-01-29 10:40:26 +0100 |
commit | 4e8b49d656828fbe2f84d9970a036db644185981 (patch) | |
tree | f14bd08181ddd81d2a41f06d9bf0f11d6edf53b5 /sql/tztime.cc | |
parent | 6e1ba88418887369ca71b49222c6fd66335bbe0c (diff) | |
download | mariadb-git-4e8b49d656828fbe2f84d9970a036db644185981.tar.gz |
WL#3700: Handler API change: all index search methods - that is,
index_read(), index_read_idx(), index_read_last(), and
records_in_range() - instead of 'uint keylen' argument take
'ulonglong keypart_map', a bitmap showing which keyparts are
present in the key value.
Fallback method is provided for handlers that are lagging behind.
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index fe91aa71272..6704a7874a4 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1900,9 +1900,9 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) (void)table->file->ha_index_init(0, 1); if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, - 0, HA_READ_KEY_EXACT)) + ~(ulonglong)0, HA_READ_KEY_EXACT)) { -#ifdef EXTRA_DEBUG +#ifdef EXTRA_DEBUG /* Most probably user has mistyped time zone name, so no need to bark here unless we need it for debugging. @@ -1928,7 +1928,7 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) (void)table->file->ha_index_init(0, 1); if (table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, - 0, HA_READ_KEY_EXACT)) + ~(ulonglong)0, HA_READ_KEY_EXACT)) { sql_print_error("Can't find description of time zone '%u'", tzid); goto end; @@ -1955,9 +1955,8 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) table->field[0]->store((longlong) tzid, TRUE); (void)table->file->ha_index_init(0, 1); - // FIXME Is there any better approach than explicitly specifying 4 ??? res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, - 4, HA_READ_KEY_EXACT); + (ulonglong)1, HA_READ_KEY_EXACT); while (!res) { ttid= (uint)table->field[1]->val_int(); @@ -2028,9 +2027,8 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) table->field[0]->store((longlong) tzid, TRUE); (void)table->file->ha_index_init(0, 1); - // FIXME Is there any better approach than explicitly specifying 4 ??? res= table->file->index_read(table->record[0], (byte*)table->field[0]->ptr, - 4, HA_READ_KEY_EXACT); + (ulonglong)1, HA_READ_KEY_EXACT); while (!res) { ttime= (my_time_t)table->field[1]->val_int(); |