Commit faa51094 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1619, closes #1633

fix cmp_toku_string
fix 1633

git-svn-id: file:///svn/mysql/tokudb-engine/src@10891 c7de825b-a66e-492c-adef-691d508d4ae1
parent 221d4832
......@@ -757,8 +757,6 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
}
}
}
/* Calculate pack_length of primary key */
share->fixed_length_primary_key = 1;
if (!hidden_primary_key) {
//
// I realize this is incredibly confusing, and refactoring should take
......@@ -771,7 +769,6 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
for (; key_part != end; key_part++) {
ref_length += key_part->field->max_packed_col_length(key_part->length);
}
share->fixed_length_primary_key = (ref_length == table->key_info[primary_key].key_length + sizeof(uchar) + sizeof(u_int32_t));
share->status |= STATUS_PRIMARY_KEY_INIT;
}
share->ref_length = ref_length;
......
......@@ -36,7 +36,7 @@ typedef struct st_tokudb_share {
u_int32_t key_type[MAX_KEY +1];
uint status, version, capabilities;
uint ref_length;
bool fixed_length_primary_key, fixed_length_row;
bool fixed_length_row;
//
// whether table has an auto increment column
//
......
......@@ -353,18 +353,16 @@ inline int cmp_toku_string(
CHARSET_INFO* charset = NULL;
//
// due to MySQL bug 42649
// patternmatched off of InnoDB, due to MySQL bug 42649
//
switch (charset_number) {
case(default_charset_info->number):
if (charset_number == default_charset_info->number) {
charset = default_charset_info;
break;
case(charset_number == my_charset_latin1.number):
}
else if (charset_number == my_charset_latin1.number) {
charset = &my_charset_latin1;
break;
default:
}
else {
charset = get_charset(charset_number, MYF(MY_WME));
break;
}
ret_val = charset->coll->strnncollsp(
......
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