mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
3c46af6cf4
Don't read character set files if we are using only the default charset. In most cases the user will not anymore get a warning about missing character set files Compare strings with space extend instead of space strip. Now the following comparisons holds: "a" == "a " and "a\t" < "a". (Bug #3152). Note: Because of the above fix, one has to do a REPAIR on any table that has an ascii character < 32 last in a CHAR/VARCHAR/TEXT columns. heap/hp_hash.c: Comments and DBUG information include/my_handler.h: Updated prototype for mi_compare_text myisam/ft_boolean_search.c: Updated calls to mi_compare_text myisam/ft_nlq_search.c: Updated calls to mi_compare_text myisam/ft_parser.c: Updated calls to mi_compare_text myisam/ft_stopwords.c: Updated calls to mi_compare_text myisam/ft_update.c: Updated calls to mi_compare_text myisam/mi_check.c: Updated calls to mi_compare_text myisam/mi_search.c: Changed all string comparisons that removed end space to instead extend the shorter string with space myisam/mi_unique.c: Updated calls to mi_compare_text myisam/mi_write.c: Updated calls to mi_compare_text myisam/myisam_ftdump.c: Removed compiler warning mysql-test/r/ctype_collate.result: Fixed wrong result mysql-test/r/heap_btree.result: More tests mysql-test/t/heap_btree.test: more tests mysys/charset.c: Don't read charsets if we are only using default charset Don't require 'init_available_charsets' to succeed. mysys/my_handler.c: Compare strings with space extend instead of space strip mysys/tree.c: Fixed code to get better results for range optimzier sql/field.cc: Compare strings with space extend instead of space strip sql/filesort.cc: Compare strings with space extend instead of space strip sql/ha_heap.cc: Created bit map for keys that are using BTREE. This allows the optimzer to use BTREE's for sorting sql/ha_heap.h: Created bit map for keys that are using BTREE. This allows the optimzer to use BTREE's for sorting strings/ctype-big5.c: Compare strings with space extend instead of space strip strings/ctype-czech.c: Indentation cleanup. Should be fixed to use space extend strings/ctype-gbk.c: Compare strings with space extend instead of space strip strings/ctype-latin1.c: Compare strings with space extend instead of space strip Added missing my_hash_sort_latin1_de function strings/ctype-mb.c: For binary strings, don't remove end space when comparing strings/ctype-simple.c: Compare strings with space extend instead of space strip strings/ctype-sjis.c: Compare strings with space extend instead of space strip strings/ctype-tis620.c: Added comments that we should fix end space handling strings/ctype-ucs2.c: indentation fixes strings/ctype-utf8.c: Added comments that we should fix end space handling strings/ctype-win1250ch.c: Added comments that we should fix end space handling
66 lines
2.1 KiB
C
66 lines
2.1 KiB
C
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with this library; if not, write to the Free
|
|
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
MA 02111-1307, USA */
|
|
|
|
#ifndef _my_handler_h
|
|
#define _my_handler_h
|
|
|
|
#include "my_global.h"
|
|
#include "my_base.h"
|
|
#include "m_ctype.h"
|
|
#include "myisampack.h"
|
|
|
|
typedef struct st_HA_KEYSEG /* Key-portion */
|
|
{
|
|
uint8 type; /* Type of key (for sort) */
|
|
uint8 language;
|
|
uint8 null_bit; /* bitmask to test for NULL */
|
|
uint8 bit_start,bit_end; /* if bit field */
|
|
uint16 flag;
|
|
uint16 length; /* Keylength */
|
|
uint32 start; /* Start of key in record */
|
|
uint32 null_pos; /* position to NULL indicator */
|
|
CHARSET_INFO *charset;
|
|
} HA_KEYSEG;
|
|
|
|
#define get_key_length(length,key) \
|
|
{ if ((uchar) *(key) != 255) \
|
|
length= (uint) (uchar) *((key)++); \
|
|
else \
|
|
{ length=mi_uint2korr((key)+1); (key)+=3; } \
|
|
}
|
|
|
|
#define get_key_length_rdonly(length,key) \
|
|
{ if ((uchar) *(key) != 255) \
|
|
length= ((uint) (uchar) *((key))); \
|
|
else \
|
|
{ length=mi_uint2korr((key)+1); } \
|
|
}
|
|
|
|
#define get_key_pack_length(length,length_pack,key) \
|
|
{ if ((uchar) *(key) != 255) \
|
|
{ length= (uint) (uchar) *((key)++); length_pack=1; }\
|
|
else \
|
|
{ length=mi_uint2korr((key)+1); (key)+=3; length_pack=3; } \
|
|
}
|
|
|
|
extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
|
my_bool, my_bool);
|
|
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
|
register uchar *b, uint key_length, uint nextflag,
|
|
uint *diff_pos);
|
|
|
|
#endif /* _my_handler_h */
|