summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-24 15:32:57 +0200
committerunknown <serg@serg.mylan>2004-08-24 15:32:57 +0200
commitb033e3dfbb9d15e40887cde9914f99a41b304cad (patch)
tree39a41933aeb9ee2d074169d2b21b28c8e1064270 /myisam
parenta7c8153116106392a8f18eb62d9007881c3aa8b4 (diff)
downloadmariadb-git-b033e3dfbb9d15e40887cde9914f99a41b304cad.tar.gz
BDB: Bug#4531: unique key prefix interacts poorly with utf8,
Bug#4594 column index make = failed for gbk myisam/mi_key.c: cleanup
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_key.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c
index 8f5f0e829ef..043dd7c6884 100644
--- a/myisam/mi_key.c
+++ b/myisam/mi_key.c
@@ -25,9 +25,12 @@
#define CHECK_KEYS
-#define FIX_LENGTH if (length > char_length) \
- char_length= my_charpos(cs, pos, pos+length, char_length); \
- set_if_smaller(char_length,length); \
+#define FIX_LENGTH \
+ do { \
+ if (length > char_length) \
+ char_length= my_charpos(cs, pos, pos+length, char_length); \
+ set_if_smaller(char_length,length); \
+ } while(0)
static int _mi_put_key_in_record(MI_INFO *info,uint keynr,byte *record);
@@ -157,7 +160,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
FIX_LENGTH;
memcpy((byte*) key, pos, char_length);
if (length > char_length)
- bfill(key+char_length, length-char_length, ' ');
+ cs->cset->fill(cs, key+char_length, length-char_length, ' ');
key+= length;
}
_mi_dpointer(info,key,filepos);
@@ -267,7 +270,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
FIX_LENGTH;
memcpy((byte*) key, pos, char_length);
if (length > char_length)
- bfill(key+char_length, length-char_length, ' ');
+ cs->cset->fill(cs,key+char_length, length-char_length, ' ');
key+= length;
k_length-=length;
}