summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_ctype.h17
-rw-r--r--include/my_base.h6
-rw-r--r--include/my_compare.h2
3 files changed, 15 insertions, 10 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 615ee6ac1c6..d22a0b1f987 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -325,8 +325,7 @@ struct my_collation_handler_st
int (*strnncoll)(CHARSET_INFO *,
const uchar *, size_t, const uchar *, size_t, my_bool);
int (*strnncollsp)(CHARSET_INFO *,
- const uchar *, size_t, const uchar *, size_t,
- my_bool diff_if_only_endspace_difference);
+ const uchar *, size_t, const uchar *, size_t);
size_t (*strnxfrm)(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
@@ -644,8 +643,7 @@ extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
- const uchar *, size_t,
- my_bool diff_if_only_endspace_difference);
+ const uchar *, size_t);
extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
@@ -654,6 +652,17 @@ extern void my_hash_sort_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1,
ulong *nr2);
+/**
+ Compare a string to an array of spaces, for PAD SPACE comparison.
+ The function iterates through the string and compares every byte to 0x20.
+ @param - the string
+ @param - its length
+ @return <0 - if a byte less than 0x20 was found in the string.
+ @return 0 - if all bytes in the string were 0x20, or if length was 0.
+ @return >0 - if a byte greater than 0x20 was found in the string.
+*/
+extern int my_strnncollsp_padspace_bin(const uchar *str, size_t length);
+
extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
extern uint my_instr_simple(CHARSET_INFO *,
diff --git a/include/my_base.h b/include/my_base.h
index 8b546edac43..1317639c528 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -298,11 +298,7 @@ enum ha_base_keytype {
#define HA_SWAP_KEY 64
#define HA_REVERSE_SORT 128 /* Sort key in reverse order */
#define HA_NO_SORT 256 /* do not bother sorting on this keyseg */
-/*
- End space in unique/varchar are considered equal. (Like 'a' and 'a ')
- Only needed for internal temporary tables.
-*/
-#define HA_END_SPACE_ARE_EQUAL 512
+
#define HA_BIT_PART 1024
#define HA_CAN_MEMCMP 2048 /* internal, never stored in frm */
diff --git a/include/my_compare.h b/include/my_compare.h
index 0db22b593f4..6b76483074b 100644
--- a/include/my_compare.h
+++ b/include/my_compare.h
@@ -108,7 +108,7 @@ typedef struct st_HA_KEYSEG /* Key-portion */
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
extern int ha_compare_text(CHARSET_INFO *, const uchar *, uint,
- const uchar *, uint , my_bool, my_bool);
+ const uchar *, uint , my_bool);
extern int ha_key_cmp(HA_KEYSEG *keyseg, const uchar *a,
const uchar *b, uint key_length, uint nextflag,
uint *diff_pos);