summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
Diffstat (limited to 'isam')
-rw-r--r--isam/_key.c6
-rw-r--r--isam/_search.c16
-rw-r--r--isam/isamlog.c6
-rw-r--r--isam/pack_isam.c6
4 files changed, 20 insertions, 14 deletions
diff --git a/isam/_key.c b/isam/_key.c
index c0d667cb32d..0bedb428808 100644
--- a/isam/_key.c
+++ b/isam/_key.c
@@ -58,7 +58,7 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
#endif
{
if (type == HA_KEYTYPE_TEXT)
- case_sort((byte*) key,length);
+ case_sort(default_charset_info,(byte*) key,length);
}
key+=length;
}
@@ -71,7 +71,7 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
#endif
{
if (type == HA_KEYTYPE_TEXT)
- case_sort((byte*) key,(uint) keyseg->base.length);
+ case_sort(default_charset_info,(byte*) key,(uint) keyseg->base.length);
}
#ifdef NAN_TEST
else if (type == HA_KEYTYPE_FLOAT)
@@ -154,7 +154,7 @@ uint _nisam_pack_key(register N_INFO *info, uint keynr, uchar *key, uchar *old,
#endif
{
if (type == HA_KEYTYPE_TEXT)
- case_sort((byte*) key,length);
+ case_sort(default_charset_info,(byte*) key,length);
}
key+= length;
}
diff --git a/isam/_search.c b/isam/_search.c
index 57787d61818..d76a8ce3097 100644
--- a/isam/_search.c
+++ b/isam/_search.c
@@ -515,11 +515,13 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
if (*a++ != *b++)
{
a--; b--;
- if (isdigit((char) *a) && isdigit((char) *b))
+ if (my_isdigit(default_charset_info, (char) *a) &&
+ my_isdigit(default_charset_info, (char) *b))
return ((int) *a - (int) *b);
- if (*a == '-' || isdigit((char) *b))
+ if (*a == '-' || my_isdigit(default_charset_info,(char) *b))
return (-1);
- if (*b == '-' || *b++ == ' ' || isdigit((char) *a))
+ if (*b == '-' || *b++ == ' ' ||
+ my_isdigit(default_charset_info,(char) *a))
return (1);
if (*a++ == ' ')
return (-1);
@@ -539,11 +541,13 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
if (*a++ != *b++)
{
a--; b--;
- if (isdigit((char) *a) && isdigit((char) *b))
+ if (my_isdigit(default_charset_info,(char) *a) &&
+ my_isdigit(default_charset_info,(char) *b))
return ((int) *a - (int) *b);
- if (*a == '-' || isdigit((char) *b))
+ if (*a == '-' || my_isdigit(default_charset_info,(char) *b))
return (-1);
- if (*b == '-' || *b++ == ' ' || isdigit((char) *a))
+ if (*b == '-' || *b++ == ' ' ||
+ my_isdigit(default_charset_info,(char) *a))
return (1);
if (*a++ == ' ')
return -1;
diff --git a/isam/isamlog.c b/isam/isamlog.c
index 6d2bde42bf7..3c38caaf141 100644
--- a/isam/isamlog.c
+++ b/isam/isamlog.c
@@ -342,7 +342,7 @@ static int examine_log(my_string file_name, char **table_names)
file_info.process=0;
result=uint2korr(head+7);
if ((curr_file_info=(struct isamlog_file_info*)
- tree_search(&tree,&file_info)))
+ tree_search(&tree, &file_info, tree.custom_arg)))
{
curr_file_info->accessed=access_time;
if (update && curr_file_info->used && curr_file_info->closed)
@@ -444,7 +444,7 @@ static int examine_log(my_string file_name, char **table_names)
files_open++;
file_info.closed=0;
}
- VOID(tree_insert(&tree,(gptr) &file_info,0));
+ VOID(tree_insert(&tree, (gptr) &file_info, 0, tree.custom_arg));
if (file_info.used)
{
if (verbose && !record_pos_file)
@@ -463,7 +463,7 @@ static int examine_log(my_string file_name, char **table_names)
{
if (!curr_file_info->closed)
files_open--;
- VOID(tree_delete(&tree,(gptr) curr_file_info));
+ VOID(tree_delete(&tree, (gptr) curr_file_info, tree.custom_arg));
}
break;
case LOG_EXTRA:
diff --git a/isam/pack_isam.c b/isam/pack_isam.c
index a08f710c89b..0f36c3cb2aa 100644
--- a/isam/pack_isam.c
+++ b/isam/pack_isam.c
@@ -764,7 +764,8 @@ static int get_statistic(MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
if (count->tree_buff)
{
global_count=count;
- if (!(element=tree_insert(&count->int_tree,pos,0)) ||
+ if (!(element=tree_insert(&count->int_tree, pos, 0,
+ count->int_tree.custom_arg)) ||
((element->count == 1 &&
count->tree_buff + tree_buff_length <
count->tree_pos + count->field_length) ||
@@ -1735,7 +1736,8 @@ static int compress_isam_file(MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
break;
case FIELD_INTERVALL:
global_count=count;
- pos=(byte*) tree_search(&count->int_tree,start_pos);
+ pos=(byte*) tree_search(&count->int_tree, start_pos,
+ count->int_tree.custom_arg);
intervall=(uint) (pos - count->tree_buff)/field_length;
write_bits(tree->code[intervall],(uint) tree->code_len[intervall]);
start_pos=end_pos;