diff options
author | lars@black.(none) <> | 2006-11-13 12:45:31 +0100 |
---|---|---|
committer | lars@black.(none) <> | 2006-11-13 12:45:31 +0100 |
commit | 63c906f74983ea9c8f8728c9e1903fbc55f26e87 (patch) | |
tree | eb796a1a532ee9d10c8c44e5cd764977260d29a0 /storage | |
parent | f5d2077061217b00fe5c8792cad25e7220a1c76e (diff) | |
parent | 2b2529de79dfe4211d0b3d23cc9d8bb49d031687 (diff) | |
download | mariadb-git-63c906f74983ea9c8f8728c9e1903fbc55f26e87.tar.gz |
Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into mysql.com:/home/bk/MERGE/mysql-5.1-merge
Diffstat (limited to 'storage')
-rw-r--r-- | storage/federated/ha_federated.cc | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 2 | ||||
-rw-r--r-- | storage/myisam/mi_key.c | 15 | ||||
-rw-r--r-- | storage/myisam/mi_open.c | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 51c9f4c192e..53c2ba5a0ee 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1534,7 +1534,7 @@ int ha_federated::close(void) 0 otherwise */ -inline uint field_in_record_is_null(TABLE *table, +static inline uint field_in_record_is_null(TABLE *table, Field *field, char *record) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ec86b9a2e68..83266a22255 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2510,7 +2510,7 @@ get_field_offset( /****************************************************************** Checks if a field in a record is SQL NULL. Uses the record format information in table to track the null bit in record. */ -inline +static inline uint field_in_record_is_null( /*====================*/ diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c index 01bd0c43119..c6f9799bd67 100644 --- a/storage/myisam/mi_key.c +++ b/storage/myisam/mi_key.c @@ -52,7 +52,7 @@ static int _mi_put_key_in_record(MI_INFO *info,uint keynr,byte *record); uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, const byte *record, my_off_t filepos) { - byte *pos,*end; + byte *pos; uchar *start; reg1 HA_KEYSEG *keyseg; my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT; @@ -107,18 +107,17 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, } if (keyseg->flag & HA_SPACE_PACK) { - end= pos + length; if (type != HA_KEYTYPE_NUM) { - while (end > pos && end[-1] == ' ') - end--; + length= cs->cset->lengthsp(cs, pos, length); } else { + byte *end= pos + length; while (pos < end && pos[0] == ' ') pos++; + length=(uint) (end-pos); } - length=(uint) (end-pos); FIX_LENGTH(cs, pos, length, char_length); store_key_length_inc(key,char_length); memcpy((byte*) key,(byte*) pos,(size_t) char_length); @@ -403,8 +402,10 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr, pos= record+keyseg->start; if (keyseg->type != (int) HA_KEYTYPE_NUM) { - memcpy(pos,key,(size_t) length); - bfill(pos+length,keyseg->length-length,' '); + memcpy(pos,key,(size_t) length); + keyseg->charset->cset->fill(keyseg->charset, + pos + length, keyseg->length - length, + ' '); } else { diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 7d1f18d3906..010f7233c32 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -348,6 +348,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) goto err; } } + else if (pos->type == HA_KEYTYPE_BINARY) + pos->charset= &my_charset_bin; } if (share->keyinfo[i].flag & HA_SPATIAL) { |