mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
fix cmp_toku_string fix 1633 git-svn-id: file:///svn/mysql/tokudb-engine/src@10891 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
fcfc1ea14a
commit
4f6b03d724
3 changed files with 9 additions and 14 deletions
|
@ -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,19 +353,17 @@ 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):
|
||||
charset = &my_charset_latin1;
|
||||
break;
|
||||
default:
|
||||
charset = get_charset(charset_number, MYF(MY_WME));
|
||||
break;
|
||||
}
|
||||
else if (charset_number == my_charset_latin1.number) {
|
||||
charset = &my_charset_latin1;
|
||||
}
|
||||
else {
|
||||
charset = get_charset(charset_number, MYF(MY_WME));
|
||||
}
|
||||
|
||||
ret_val = charset->coll->strnncollsp(
|
||||
charset,
|
||||
|
|
Loading…
Reference in a new issue