Commit 74071e15 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #1615

remove dead code

git-svn-id: file:///svn/mysql/tokudb-engine/src@10709 c7de825b-a66e-492c-adef-691d508d4ae1
parent 78bb5202
...@@ -16,19 +16,11 @@ extern "C" { ...@@ -16,19 +16,11 @@ extern "C" {
#endif #endif
static inline void *thd_data_get(THD *thd, int slot) { static inline void *thd_data_get(THD *thd, int slot) {
#if MYSQL_VERSION_ID <= 50123
return thd->ha_data[slot];
#else
return thd->ha_data[slot].ha_ptr; return thd->ha_data[slot].ha_ptr;
#endif
} }
static inline void thd_data_set(THD *thd, int slot, void *data) { static inline void thd_data_set(THD *thd, int slot, void *data) {
#if MYSQL_VERSION_ID <= 50123
thd->ha_data[slot] = data;
#else
thd->ha_data[slot].ha_ptr = data; thd->ha_data[slot].ha_ptr = data;
#endif
} }
#undef PACKAGE #undef PACKAGE
...@@ -1514,12 +1506,12 @@ u_int32_t ha_tokudb::place_key_into_mysql_buff(uchar * record, uchar* data, uint ...@@ -1514,12 +1506,12 @@ u_int32_t ha_tokudb::place_key_into_mysql_buff(uchar * record, uchar* data, uint
/* tokutek change to make pack_key and unpack_key work for /* tokutek change to make pack_key and unpack_key work for
decimals */ decimals */
uint unpack_length = key_part->length; uint unpack_length = key_part->length;
pos = (uchar *) key_part->field->unpack_key(record + field_offset(key_part->field, table), pos, pos = (uchar *) key_part->field->unpack_key(
#if MYSQL_VERSION_ID < 50123 record + field_offset(key_part->field, table),
unpack_length); pos,
#else unpack_length,
unpack_length, table->s->db_low_byte_first); table->s->db_low_byte_first
#endif );
} }
return pos-data; return pos-data;
} }
...@@ -1579,12 +1571,12 @@ u_int32_t ha_tokudb::place_key_into_dbt_buff(KEY* key_info, uchar * buff, const ...@@ -1579,12 +1571,12 @@ u_int32_t ha_tokudb::place_key_into_dbt_buff(KEY* key_info, uchar * buff, const
// because key_part->offset is SET INCORRECTLY in add_index // because key_part->offset is SET INCORRECTLY in add_index
// filed ticket 862 to look into this // filed ticket 862 to look into this
// //
curr_buff = key_part->field->pack_key(curr_buff, (uchar *) (record + field_offset(key_part->field, table)), curr_buff = key_part->field->pack_key(
#if MYSQL_VERSION_ID < 50123 curr_buff,
key_part->length); (uchar *) (record + field_offset(key_part->field, table)),
#else key_part->length,
key_part->length, table->s->db_low_byte_first); table->s->db_low_byte_first
#endif );
key_length -= key_part->length; key_length -= key_part->length;
} }
return curr_buff - buff; return curr_buff - buff;
...@@ -1714,12 +1706,12 @@ DBT *ha_tokudb::pack_key(DBT * key, uint keynr, uchar * buff, const uchar * key_ ...@@ -1714,12 +1706,12 @@ DBT *ha_tokudb::pack_key(DBT * key, uint keynr, uchar * buff, const uchar * key_
*buff++ = NONNULL_COL_VAL; *buff++ = NONNULL_COL_VAL;
offset = 1; // Data is at key_ptr+1 offset = 1; // Data is at key_ptr+1
} }
buff = key_part->field->pack_key_from_key_image(buff, (uchar *) key_ptr + offset, buff = key_part->field->pack_key_from_key_image(
#if MYSQL_VERSION_ID < 50123 buff,
key_part->length); (uchar *) key_ptr + offset,
#else key_part->length,
key_part->length, table->s->db_low_byte_first); table->s->db_low_byte_first
#endif );
key_ptr += key_part->store_length; key_ptr += key_part->store_length;
key_length -= key_part->store_length; key_length -= key_part->store_length;
} }
......
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