Commit 882aa0a2 authored by Alexander Barkov's avatar Alexander Barkov Committed by Sergei Golubchik

MDEV-27277 Add a warning when max_sort_length is reached

Step#1: fixing the return type of strnxfrm() from size_t to this structure:

typedef struct
{
  size_t m_output_length;
  size_t m_source_length_used;
  uint m_warnings;
} my_strnxfrm_ret_t;
parent dee4a4a6
...@@ -434,6 +434,25 @@ typedef struct ...@@ -434,6 +434,25 @@ typedef struct
uint mb_len; uint mb_len;
} my_match_t; } my_match_t;
#define MY_STRNXFRM_TRUNCATED_WEIGHT_TRAILING_SPACE 1
#define MY_STRNXFRM_TRUNCATED_WEIGHT_REAL_CHAR 2
typedef struct
{
size_t m_result_length;
size_t m_source_length_used;
uint m_warnings;
} my_strnxfrm_ret_t;
typedef struct
{
size_t m_result_length;
uint m_warnings;
} my_strnxfrm_pad_ret_t;
enum my_lex_states enum my_lex_states
{ {
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT, MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
...@@ -532,9 +551,9 @@ struct my_collation_handler_st ...@@ -532,9 +551,9 @@ struct my_collation_handler_st
const uchar *str2, size_t len2, const uchar *str2, size_t len2,
size_t nchars, size_t nchars,
uint flags); uint flags);
size_t (*strnxfrm)(CHARSET_INFO *, my_strnxfrm_ret_t (*strnxfrm)(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights, uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags); const uchar *src, size_t srclen, uint flags);
size_t (*strnxfrmlen)(CHARSET_INFO *, size_t); size_t (*strnxfrmlen)(CHARSET_INFO *, size_t);
my_bool (*like_range)(CHARSET_INFO *, my_bool (*like_range)(CHARSET_INFO *,
const char *s, size_t s_length, const char *s, size_t s_length,
...@@ -1086,22 +1105,22 @@ struct charset_info_st ...@@ -1086,22 +1105,22 @@ struct charset_info_st
(uchar *) b.str, b.length); (uchar *) b.str, b.length);
} }
size_t strnxfrm(char *dst, size_t dstlen, uint nweights, my_strnxfrm_ret_t strnxfrm(char *dst, size_t dstlen, uint nweights,
const char *src, size_t srclen, uint flags) const const char *src, size_t srclen, uint flags) const
{ {
return (coll->strnxfrm)(this, return (coll->strnxfrm)(this,
(uchar *) dst, dstlen, nweights, (uchar *) dst, dstlen, nweights,
(const uchar *) src, srclen, flags); (const uchar *) src, srclen, flags);
} }
size_t strnxfrm(uchar *dst, size_t dstlen, uint nweights, my_strnxfrm_ret_t strnxfrm(uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags) const const uchar *src, size_t srclen, uint flags) const
{ {
return (coll->strnxfrm)(this, return (coll->strnxfrm)(this,
dst, dstlen, nweights, dst, dstlen, nweights,
src, srclen, flags); src, srclen, flags);
} }
size_t strnxfrm(uchar *dst, size_t dstlen, my_strnxfrm_ret_t strnxfrm(uchar *dst, size_t dstlen,
const uchar *src, size_t srclen) const const uchar *src, size_t srclen) const
{ {
return (coll->strnxfrm)(this, return (coll->strnxfrm)(this,
dst, dstlen, (uint) dstlen, dst, dstlen, (uint) dstlen,
...@@ -1523,10 +1542,6 @@ const uint16 *my_cs_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, ...@@ -1523,10 +1542,6 @@ const uint16 *my_cs_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1,
my_wc_t wc2); my_wc_t wc2);
/* declarations for simple charsets */ /* declarations for simple charsets */
extern size_t my_strnxfrm_simple(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t, my_bool); const uchar *, size_t, my_bool);
...@@ -1716,27 +1731,6 @@ void my_hash_sort_mb_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), ...@@ -1716,27 +1731,6 @@ void my_hash_sort_mb_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len, const uchar *key, size_t len,
ulong *nr1, ulong *nr2); ulong *nr1, ulong *nr2);
size_t my_strnxfrm_mb(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrm_mb_nopad(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
uchar *dst, size_t dstlen,
uint nweights, const uchar *src,
size_t srclen, uint flags);
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *,
uchar *dst, size_t dstlen,
uint nweights, const uchar *src,
size_t srclen, uint flags);
size_t my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *, size_t);
extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader,
const char *buf, size_t buflen); const char *buf, size_t buflen);
...@@ -1768,13 +1762,6 @@ my_repertoire_t my_charset_repertoire(CHARSET_INFO *cs); ...@@ -1768,13 +1762,6 @@ my_repertoire_t my_charset_repertoire(CHARSET_INFO *cs);
uint my_strxfrm_flag_normalize(CHARSET_INFO *cs, uint flags); uint my_strxfrm_flag_normalize(CHARSET_INFO *cs, uint flags);
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
uint flags, uint level); uint flags, uint level);
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level);
size_t my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
uchar *str, uchar *frmend,
uchar *strend, uint nweights,
uint flags, uint level);
const MY_CONTRACTIONS *my_charset_get_contractions(CHARSET_INFO *cs, const MY_CONTRACTIONS *my_charset_get_contractions(CHARSET_INFO *cs,
int level); int level);
......
...@@ -609,7 +609,7 @@ hex(weight_string('abc', 5, 2, 0xC0)) ...@@ -609,7 +609,7 @@ hex(weight_string('abc', 5, 2, 0xC0))
0304050103 0304050103
select hex(weight_string('abc',25, 2, 0xC0)); select hex(weight_string('abc',25, 2, 0xC0));
hex(weight_string('abc',25, 2, 0xC0)) hex(weight_string('abc',25, 2, 0xC0))
0304050103090A01030F1101030F1100202020202020202020 0304050103090A01030F1101030F1100000000000000000000
select hex(weight_string('abc', 1, 3, 0xC0)); select hex(weight_string('abc', 1, 3, 0xC0));
hex(weight_string('abc', 1, 3, 0xC0)) hex(weight_string('abc', 1, 3, 0xC0))
03 03
...@@ -627,7 +627,7 @@ hex(weight_string('abc', 5, 3, 0xC0)) ...@@ -627,7 +627,7 @@ hex(weight_string('abc', 5, 3, 0xC0))
0304050103 0304050103
select hex(weight_string('abc',25, 3, 0xC0)); select hex(weight_string('abc',25, 3, 0xC0));
hex(weight_string('abc',25, 3, 0xC0)) hex(weight_string('abc',25, 3, 0xC0))
0304050103090A01030F1101030F1100202020202020202020 0304050103090A01030F1101030F1100000000000000000000
select hex(weight_string('abc', 1, 4, 0xC0)); select hex(weight_string('abc', 1, 4, 0xC0));
hex(weight_string('abc', 1, 4, 0xC0)) hex(weight_string('abc', 1, 4, 0xC0))
03 03
...@@ -645,7 +645,7 @@ hex(weight_string('abc', 5, 4, 0xC0)) ...@@ -645,7 +645,7 @@ hex(weight_string('abc', 5, 4, 0xC0))
0304050103 0304050103
select hex(weight_string('abc',25, 4, 0xC0)); select hex(weight_string('abc',25, 4, 0xC0));
hex(weight_string('abc',25, 4, 0xC0)) hex(weight_string('abc',25, 4, 0xC0))
0304050103090A01030F1101030F1100202020202020202020 0304050103090A01030F1101030F1100000000000000000000
select @@collation_connection; select @@collation_connection;
@@collation_connection @@collation_connection
latin2_czech_cs latin2_czech_cs
...@@ -717,7 +717,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0)) ...@@ -717,7 +717,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 2, 0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)); select hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0));
hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0)) hex(weight_string(cast(_latin1 0x6368DF as char),25, 2, 0xC0))
0C0119012F012FE20020202020202020202020202020202020 0C0119012F012FE20000000000000000000000000000000000
select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)); select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0));
hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0)) hex(weight_string(cast(_latin1 0x6368DF as char), 1, 3, 0xC0))
0C 0C
...@@ -732,7 +732,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0)) ...@@ -732,7 +732,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 3, 0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)); select hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0));
hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0)) hex(weight_string(cast(_latin1 0x6368DF as char),25, 3, 0xC0))
0C0119012F012FE20020202020202020202020202020202020 0C0119012F012FE20000000000000000000000000000000000
select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)); select hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0));
hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0)) hex(weight_string(cast(_latin1 0x6368DF as char), 1, 4, 0xC0))
0C 0C
...@@ -747,7 +747,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0)) ...@@ -747,7 +747,7 @@ hex(weight_string(cast(_latin1 0x6368DF as char), 4, 4, 0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)); select hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0));
hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0)) hex(weight_string(cast(_latin1 0x6368DF as char),25, 4, 0xC0))
0C0119012F012FE20020202020202020202020202020202020 0C0119012F012FE20000000000000000000000000000000000
select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 2,0xC0))
0C 0C
...@@ -762,7 +762,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0)) ...@@ -762,7 +762,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 2,0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char),25, 2,0xC0))
0C0119012F01E22F0020202020202020202020202020202020 0C0119012F01E22F0000000000000000000000000000000000
select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 3,0xC0))
0C 0C
...@@ -777,7 +777,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0)) ...@@ -777,7 +777,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 3,0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char),25, 3,0xC0))
0C0119012F01E22F0020202020202020202020202020202020 0C0119012F01E22F0000000000000000000000000000000000
select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char), 1, 4,0xC0))
0C 0C
...@@ -792,7 +792,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0)) ...@@ -792,7 +792,7 @@ hex(weight_string(cast(_latin1 0xDF6368 as char), 4, 4,0xC0))
0C011901 0C011901
select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)); select hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0));
hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0)) hex(weight_string(cast(_latin1 0xDF6368 as char),25, 4,0xC0))
0C0119012F01E22F0020202020202020202020202020202020 0C0119012F01E22F0000000000000000000000000000000000
select @@collation_connection; select @@collation_connection;
@@collation_connection @@collation_connection
latin2_czech_cs latin2_czech_cs
......
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_bin);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 61_
2 a 1 1 61 6120_
3 a 1 1 61 612020_
4 a 1 1 61 61202020_
5 a 1 1 61 6120202020_
6 a 1 1 61 612020202020_
7 a 1 1 61 61202020202020_
8 a 1 1 61 6120202020202020_
9 a 1 1 61 612020202020202020_
10 a 1 0 61 61202020202020202020
11 a 1 0 61 6120202020202020202020
12 a 1 0 61 612020202020202020202020
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616120_
4 aa 2 1 6161 61612020_
5 aa 2 1 6161 6161202020_
6 aa 2 1 6161 616120202020_
7 aa 2 1 6161 61612020202020_
8 aa 2 1 6161 6161202020202020_
9 aa 2 1 6161 616120202020202020_
10 aa 2 0 6161 61612020202020202020
11 aa 2 0 6161 6161202020202020202020
12 aa 2 0 6161 616120202020202020202020
1 aA 1 3 61A2CF 61^
2 aA 3 3 61A2CF 61A2^
3 aA 3 1 61A2CF 61A2CF_
4 aA 3 1 61A2CF 61A2CF20_
5 aA 3 1 61A2CF 61A2CF2020_
6 aA 3 1 61A2CF 61A2CF202020_
7 aA 3 1 61A2CF 61A2CF20202020_
8 aA 3 1 61A2CF 61A2CF2020202020_
9 aA 3 1 61A2CF 61A2CF202020202020_
10 aA 3 1 61A2CF 61A2CF20202020202020_
11 aA 3 0 61A2CF 61A2CF2020202020202020
12 aA 3 0 61A2CF 61A2CF202020202020202020
1 A 2 3 A2CF A2^
2 A 2 1 A2CF A2CF_
3 A 2 1 A2CF A2CF20_
4 A 2 1 A2CF A2CF2020_
5 A 2 1 A2CF A2CF202020_
6 A 2 1 A2CF A2CF20202020_
7 A 2 1 A2CF A2CF2020202020_
8 A 2 1 A2CF A2CF202020202020_
9 A 2 1 A2CF A2CF20202020202020_
10 A 2 1 A2CF A2CF2020202020202020_
11 A 2 0 A2CF A2CF202020202020202020
12 A 2 0 A2CF A2CF20202020202020202020
1 Aa 2 3 A2CF61 A2^
2 Aa 2 3 A2CF61 A2CF^
3 Aa 3 1 A2CF61 A2CF61_
4 Aa 3 1 A2CF61 A2CF6120_
5 Aa 3 1 A2CF61 A2CF612020_
6 Aa 3 1 A2CF61 A2CF61202020_
7 Aa 3 1 A2CF61 A2CF6120202020_
8 Aa 3 1 A2CF61 A2CF612020202020_
9 Aa 3 1 A2CF61 A2CF61202020202020_
10 Aa 3 1 A2CF61 A2CF6120202020202020_
11 Aa 3 0 A2CF61 A2CF612020202020202020
12 Aa 3 0 A2CF61 A2CF61202020202020202020
1 AA 2 3 A2CFA2CF A2^
2 AA 2 3 A2CFA2CF A2CF^
3 AA 4 3 A2CFA2CF A2CFA2^
4 AA 4 1 A2CFA2CF A2CFA2CF_
5 AA 4 1 A2CFA2CF A2CFA2CF20_
6 AA 4 1 A2CFA2CF A2CFA2CF2020_
7 AA 4 1 A2CFA2CF A2CFA2CF202020_
8 AA 4 1 A2CFA2CF A2CFA2CF20202020_
9 AA 4 1 A2CFA2CF A2CFA2CF2020202020_
10 AA 4 1 A2CFA2CF A2CFA2CF202020202020_
11 AA 4 1 A2CFA2CF A2CFA2CF20202020202020_
12 AA 4 0 A2CFA2CF A2CFA2CF2020202020202020
DROP TABLE t1;
--source include/have_big5.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_bin);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_chinese_ci);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 41_
2 a 1 1 61 4120_
3 a 1 1 61 412020_
4 a 1 1 61 41202020_
5 a 1 1 61 4120202020_
6 a 1 1 61 412020202020_
7 a 1 1 61 41202020202020_
8 a 1 1 61 4120202020202020_
9 a 1 1 61 412020202020202020_
10 a 1 0 61 41202020202020202020
11 a 1 0 61 4120202020202020202020
12 a 1 0 61 412020202020202020202020
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414120_
4 aa 2 1 6161 41412020_
5 aa 2 1 6161 4141202020_
6 aa 2 1 6161 414120202020_
7 aa 2 1 6161 41412020202020_
8 aa 2 1 6161 4141202020202020_
9 aa 2 1 6161 414120202020202020_
10 aa 2 0 6161 41412020202020202020
11 aa 2 0 6161 4141202020202020202020
12 aa 2 0 6161 414120202020202020202020
1 aA 1 3 61A2CF 41^
2 aA 3 3 61A2CF 41A1^
3 aA 3 1 61A2CF 41A140_
4 aA 3 1 61A2CF 41A14020_
5 aA 3 1 61A2CF 41A1402020_
6 aA 3 1 61A2CF 41A140202020_
7 aA 3 1 61A2CF 41A14020202020_
8 aA 3 1 61A2CF 41A1402020202020_
9 aA 3 1 61A2CF 41A140202020202020_
10 aA 3 1 61A2CF 41A14020202020202020_
11 aA 3 0 61A2CF 41A1402020202020202020
12 aA 3 0 61A2CF 41A140202020202020202020
1 A 2 3 A2CF A1^
2 A 2 1 A2CF A140_
3 A 2 1 A2CF A14020_
4 A 2 1 A2CF A1402020_
5 A 2 1 A2CF A140202020_
6 A 2 1 A2CF A14020202020_
7 A 2 1 A2CF A1402020202020_
8 A 2 1 A2CF A140202020202020_
9 A 2 1 A2CF A14020202020202020_
10 A 2 1 A2CF A1402020202020202020_
11 A 2 0 A2CF A140202020202020202020
12 A 2 0 A2CF A14020202020202020202020
1 Aa 2 3 A2CF61 A1^
2 Aa 2 3 A2CF61 A140^
3 Aa 3 1 A2CF61 A14041_
4 Aa 3 1 A2CF61 A1404120_
5 Aa 3 1 A2CF61 A140412020_
6 Aa 3 1 A2CF61 A14041202020_
7 Aa 3 1 A2CF61 A1404120202020_
8 Aa 3 1 A2CF61 A140412020202020_
9 Aa 3 1 A2CF61 A14041202020202020_
10 Aa 3 1 A2CF61 A1404120202020202020_
11 Aa 3 0 A2CF61 A140412020202020202020
12 Aa 3 0 A2CF61 A14041202020202020202020
1 AA 2 3 A2CFA2CF A1^
2 AA 2 3 A2CFA2CF A140^
3 AA 4 3 A2CFA2CF A140A1^
4 AA 4 1 A2CFA2CF A140A140_
5 AA 4 1 A2CFA2CF A140A14020_
6 AA 4 1 A2CFA2CF A140A1402020_
7 AA 4 1 A2CFA2CF A140A140202020_
8 AA 4 1 A2CFA2CF A140A14020202020_
9 AA 4 1 A2CFA2CF A140A1402020202020_
10 AA 4 1 A2CFA2CF A140A140202020202020_
11 AA 4 1 A2CFA2CF A140A14020202020202020_
12 AA 4 0 A2CFA2CF A140A1402020202020202020
DROP TABLE t1;
--source include/have_big5.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_chinese_ci);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_chinese_nopad_ci);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 41_
2 a 1 1 61 4100_
3 a 1 1 61 410000_
4 a 1 1 61 41000000_
5 a 1 1 61 4100000000_
6 a 1 1 61 410000000000_
7 a 1 1 61 41000000000000_
8 a 1 1 61 4100000000000000_
9 a 1 1 61 410000000000000000_
10 a 1 0 61 41000000000000000000
11 a 1 0 61 4100000000000000000000
12 a 1 0 61 410000000000000000000000
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414100_
4 aa 2 1 6161 41410000_
5 aa 2 1 6161 4141000000_
6 aa 2 1 6161 414100000000_
7 aa 2 1 6161 41410000000000_
8 aa 2 1 6161 4141000000000000_
9 aa 2 1 6161 414100000000000000_
10 aa 2 0 6161 41410000000000000000
11 aa 2 0 6161 4141000000000000000000
12 aa 2 0 6161 414100000000000000000000
1 aA 1 3 61A2CF 41^
2 aA 3 3 61A2CF 41A1^
3 aA 3 1 61A2CF 41A140_
4 aA 3 1 61A2CF 41A14000_
5 aA 3 1 61A2CF 41A1400000_
6 aA 3 1 61A2CF 41A140000000_
7 aA 3 1 61A2CF 41A14000000000_
8 aA 3 1 61A2CF 41A1400000000000_
9 aA 3 1 61A2CF 41A140000000000000_
10 aA 3 1 61A2CF 41A14000000000000000_
11 aA 3 0 61A2CF 41A1400000000000000000
12 aA 3 0 61A2CF 41A140000000000000000000
1 A 2 3 A2CF A1^
2 A 2 1 A2CF A140_
3 A 2 1 A2CF A14000_
4 A 2 1 A2CF A1400000_
5 A 2 1 A2CF A140000000_
6 A 2 1 A2CF A14000000000_
7 A 2 1 A2CF A1400000000000_
8 A 2 1 A2CF A140000000000000_
9 A 2 1 A2CF A14000000000000000_
10 A 2 1 A2CF A1400000000000000000_
11 A 2 0 A2CF A140000000000000000000
12 A 2 0 A2CF A14000000000000000000000
1 Aa 2 3 A2CF61 A1^
2 Aa 2 3 A2CF61 A140^
3 Aa 3 1 A2CF61 A14041_
4 Aa 3 1 A2CF61 A1404100_
5 Aa 3 1 A2CF61 A140410000_
6 Aa 3 1 A2CF61 A14041000000_
7 Aa 3 1 A2CF61 A1404100000000_
8 Aa 3 1 A2CF61 A140410000000000_
9 Aa 3 1 A2CF61 A14041000000000000_
10 Aa 3 1 A2CF61 A1404100000000000000_
11 Aa 3 0 A2CF61 A140410000000000000000
12 Aa 3 0 A2CF61 A14041000000000000000000
1 AA 2 3 A2CFA2CF A1^
2 AA 2 3 A2CFA2CF A140^
3 AA 4 3 A2CFA2CF A140A1^
4 AA 4 1 A2CFA2CF A140A140_
5 AA 4 1 A2CFA2CF A140A14000_
6 AA 4 1 A2CFA2CF A140A1400000_
7 AA 4 1 A2CFA2CF A140A140000000_
8 AA 4 1 A2CFA2CF A140A14000000000_
9 AA 4 1 A2CFA2CF A140A1400000000000_
10 AA 4 1 A2CFA2CF A140A140000000000000_
11 AA 4 1 A2CFA2CF A140A14000000000000000_
12 AA 4 0 A2CFA2CF A140A1400000000000000000
DROP TABLE t1;
--source include/have_big5.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_chinese_nopad_ci);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_nopad_bin);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
1 aA 1 3 61A2CF 61^
2 aA 3 3 61A2CF 61A2^
3 aA 3 1 61A2CF 61A2CF_
4 aA 3 1 61A2CF 61A2CF00_
5 aA 3 1 61A2CF 61A2CF0000_
6 aA 3 1 61A2CF 61A2CF000000_
7 aA 3 1 61A2CF 61A2CF00000000_
8 aA 3 1 61A2CF 61A2CF0000000000_
9 aA 3 1 61A2CF 61A2CF000000000000_
10 aA 3 1 61A2CF 61A2CF00000000000000_
11 aA 3 0 61A2CF 61A2CF0000000000000000
12 aA 3 0 61A2CF 61A2CF000000000000000000
1 A 2 3 A2CF A2^
2 A 2 1 A2CF A2CF_
3 A 2 1 A2CF A2CF00_
4 A 2 1 A2CF A2CF0000_
5 A 2 1 A2CF A2CF000000_
6 A 2 1 A2CF A2CF00000000_
7 A 2 1 A2CF A2CF0000000000_
8 A 2 1 A2CF A2CF000000000000_
9 A 2 1 A2CF A2CF00000000000000_
10 A 2 1 A2CF A2CF0000000000000000_
11 A 2 0 A2CF A2CF000000000000000000
12 A 2 0 A2CF A2CF00000000000000000000
1 Aa 2 3 A2CF61 A2^
2 Aa 2 3 A2CF61 A2CF^
3 Aa 3 1 A2CF61 A2CF61_
4 Aa 3 1 A2CF61 A2CF6100_
5 Aa 3 1 A2CF61 A2CF610000_
6 Aa 3 1 A2CF61 A2CF61000000_
7 Aa 3 1 A2CF61 A2CF6100000000_
8 Aa 3 1 A2CF61 A2CF610000000000_
9 Aa 3 1 A2CF61 A2CF61000000000000_
10 Aa 3 1 A2CF61 A2CF6100000000000000_
11 Aa 3 0 A2CF61 A2CF610000000000000000
12 Aa 3 0 A2CF61 A2CF61000000000000000000
1 AA 2 3 A2CFA2CF A2^
2 AA 2 3 A2CFA2CF A2CF^
3 AA 4 3 A2CFA2CF A2CFA2^
4 AA 4 1 A2CFA2CF A2CFA2CF_
5 AA 4 1 A2CFA2CF A2CFA2CF00_
6 AA 4 1 A2CFA2CF A2CFA2CF0000_
7 AA 4 1 A2CFA2CF A2CFA2CF000000_
8 AA 4 1 A2CFA2CF A2CFA2CF00000000_
9 AA 4 1 A2CFA2CF A2CFA2CF0000000000_
10 AA 4 1 A2CFA2CF A2CFA2CF000000000000_
11 AA 4 1 A2CFA2CF A2CFA2CF00000000000000_
12 AA 4 0 A2CFA2CF A2CFA2CF0000000000000000
DROP TABLE t1;
--source include/have_big5.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET big5 COLLATE big5_nopad_bin);
CALL populate_t1('big5');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str VARBINARY(3));
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str VARBINARY(3));
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
--source include/have_cp1250_ch.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t0 (a TEXT CHARACTER SET utf8mb4);
INSERT INTO t0 VALUES (''),('c'),('h'),('C'),('H');
CREATE VIEW v0 AS SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
CREATE TABLE t1 (str TEXT CHARACTER SET cp1250 COLLATE cp1250_czech_cs);
INSERT INTO t1 SELECT * FROM v0;
CALL test_strnxfrm(10,12);
DROP TABLE t1;
DROP VIEW v0;
DROP TABLE t0;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_bin);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 61_
2 a 1 1 61 6120_
3 a 1 1 61 612020_
4 a 1 1 61 61202020_
5 a 1 1 61 6120202020_
6 a 1 1 61 612020202020_
7 a 1 1 61 61202020202020_
8 a 1 1 61 6120202020202020_
9 a 1 1 61 612020202020202020_
10 a 1 0 61 61202020202020202020
11 a 1 0 61 6120202020202020202020
12 a 1 0 61 612020202020202020202020
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616120_
4 aa 2 1 6161 61612020_
5 aa 2 1 6161 6161202020_
6 aa 2 1 6161 616120202020_
7 aa 2 1 6161 61612020202020_
8 aa 2 1 6161 6161202020202020_
9 aa 2 1 6161 616120202020202020_
10 aa 2 0 6161 61612020202020202020
11 aa 2 0 6161 6161202020202020202020
12 aa 2 0 6161 616120202020202020202020
1 aA 1 3 61A3C1 61^
2 aA 3 3 61A3C1 61A3^
3 aA 3 1 61A3C1 61A3C1_
4 aA 3 1 61A3C1 61A3C120_
5 aA 3 1 61A3C1 61A3C12020_
6 aA 3 1 61A3C1 61A3C1202020_
7 aA 3 1 61A3C1 61A3C120202020_
8 aA 3 1 61A3C1 61A3C12020202020_
9 aA 3 1 61A3C1 61A3C1202020202020_
10 aA 3 1 61A3C1 61A3C120202020202020_
11 aA 3 0 61A3C1 61A3C12020202020202020
12 aA 3 0 61A3C1 61A3C1202020202020202020
1 A 2 3 A3C1 A3^
2 A 2 1 A3C1 A3C1_
3 A 2 1 A3C1 A3C120_
4 A 2 1 A3C1 A3C12020_
5 A 2 1 A3C1 A3C1202020_
6 A 2 1 A3C1 A3C120202020_
7 A 2 1 A3C1 A3C12020202020_
8 A 2 1 A3C1 A3C1202020202020_
9 A 2 1 A3C1 A3C120202020202020_
10 A 2 1 A3C1 A3C12020202020202020_
11 A 2 0 A3C1 A3C1202020202020202020
12 A 2 0 A3C1 A3C120202020202020202020
1 Aa 2 3 A3C161 A3^
2 Aa 2 3 A3C161 A3C1^
3 Aa 3 1 A3C161 A3C161_
4 Aa 3 1 A3C161 A3C16120_
5 Aa 3 1 A3C161 A3C1612020_
6 Aa 3 1 A3C161 A3C161202020_
7 Aa 3 1 A3C161 A3C16120202020_
8 Aa 3 1 A3C161 A3C1612020202020_
9 Aa 3 1 A3C161 A3C161202020202020_
10 Aa 3 1 A3C161 A3C16120202020202020_
11 Aa 3 0 A3C161 A3C1612020202020202020
12 Aa 3 0 A3C161 A3C161202020202020202020
1 AA 2 3 A3C1A3C1 A3^
2 AA 2 3 A3C1A3C1 A3C1^
3 AA 4 3 A3C1A3C1 A3C1A3^
4 AA 4 1 A3C1A3C1 A3C1A3C1_
5 AA 4 1 A3C1A3C1 A3C1A3C120_
6 AA 4 1 A3C1A3C1 A3C1A3C12020_
7 AA 4 1 A3C1A3C1 A3C1A3C1202020_
8 AA 4 1 A3C1A3C1 A3C1A3C120202020_
9 AA 4 1 A3C1A3C1 A3C1A3C12020202020_
10 AA 4 1 A3C1A3C1 A3C1A3C1202020202020_
11 AA 4 1 A3C1A3C1 A3C1A3C120202020202020_
12 AA 4 0 A3C1A3C1 A3C1A3C12020202020202020
DROP TABLE t1;
--source include/have_gb2312.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_bin);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 41_
2 a 1 1 61 4120_
3 a 1 1 61 412020_
4 a 1 1 61 41202020_
5 a 1 1 61 4120202020_
6 a 1 1 61 412020202020_
7 a 1 1 61 41202020202020_
8 a 1 1 61 4120202020202020_
9 a 1 1 61 412020202020202020_
10 a 1 0 61 41202020202020202020
11 a 1 0 61 4120202020202020202020
12 a 1 0 61 412020202020202020202020
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414120_
4 aa 2 1 6161 41412020_
5 aa 2 1 6161 4141202020_
6 aa 2 1 6161 414120202020_
7 aa 2 1 6161 41412020202020_
8 aa 2 1 6161 4141202020202020_
9 aa 2 1 6161 414120202020202020_
10 aa 2 0 6161 41412020202020202020
11 aa 2 0 6161 4141202020202020202020
12 aa 2 0 6161 414120202020202020202020
1 aA 1 3 61A3C1 41^
2 aA 3 3 61A3C1 41A3^
3 aA 3 1 61A3C1 41A3C1_
4 aA 3 1 61A3C1 41A3C120_
5 aA 3 1 61A3C1 41A3C12020_
6 aA 3 1 61A3C1 41A3C1202020_
7 aA 3 1 61A3C1 41A3C120202020_
8 aA 3 1 61A3C1 41A3C12020202020_
9 aA 3 1 61A3C1 41A3C1202020202020_
10 aA 3 1 61A3C1 41A3C120202020202020_
11 aA 3 0 61A3C1 41A3C12020202020202020
12 aA 3 0 61A3C1 41A3C1202020202020202020
1 A 2 3 A3C1 A3^
2 A 2 1 A3C1 A3C1_
3 A 2 1 A3C1 A3C120_
4 A 2 1 A3C1 A3C12020_
5 A 2 1 A3C1 A3C1202020_
6 A 2 1 A3C1 A3C120202020_
7 A 2 1 A3C1 A3C12020202020_
8 A 2 1 A3C1 A3C1202020202020_
9 A 2 1 A3C1 A3C120202020202020_
10 A 2 1 A3C1 A3C12020202020202020_
11 A 2 0 A3C1 A3C1202020202020202020
12 A 2 0 A3C1 A3C120202020202020202020
1 Aa 2 3 A3C161 A3^
2 Aa 2 3 A3C161 A3C1^
3 Aa 3 1 A3C161 A3C141_
4 Aa 3 1 A3C161 A3C14120_
5 Aa 3 1 A3C161 A3C1412020_
6 Aa 3 1 A3C161 A3C141202020_
7 Aa 3 1 A3C161 A3C14120202020_
8 Aa 3 1 A3C161 A3C1412020202020_
9 Aa 3 1 A3C161 A3C141202020202020_
10 Aa 3 1 A3C161 A3C14120202020202020_
11 Aa 3 0 A3C161 A3C1412020202020202020
12 Aa 3 0 A3C161 A3C141202020202020202020
1 AA 2 3 A3C1A3C1 A3^
2 AA 2 3 A3C1A3C1 A3C1^
3 AA 4 3 A3C1A3C1 A3C1A3^
4 AA 4 1 A3C1A3C1 A3C1A3C1_
5 AA 4 1 A3C1A3C1 A3C1A3C120_
6 AA 4 1 A3C1A3C1 A3C1A3C12020_
7 AA 4 1 A3C1A3C1 A3C1A3C1202020_
8 AA 4 1 A3C1A3C1 A3C1A3C120202020_
9 AA 4 1 A3C1A3C1 A3C1A3C12020202020_
10 AA 4 1 A3C1A3C1 A3C1A3C1202020202020_
11 AA 4 1 A3C1A3C1 A3C1A3C120202020202020_
12 AA 4 0 A3C1A3C1 A3C1A3C12020202020202020
DROP TABLE t1;
--source include/have_gb2312.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_chinese_nopad_ci);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 41_
2 a 1 1 61 4100_
3 a 1 1 61 410000_
4 a 1 1 61 41000000_
5 a 1 1 61 4100000000_
6 a 1 1 61 410000000000_
7 a 1 1 61 41000000000000_
8 a 1 1 61 4100000000000000_
9 a 1 1 61 410000000000000000_
10 a 1 0 61 41000000000000000000
11 a 1 0 61 4100000000000000000000
12 a 1 0 61 410000000000000000000000
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414100_
4 aa 2 1 6161 41410000_
5 aa 2 1 6161 4141000000_
6 aa 2 1 6161 414100000000_
7 aa 2 1 6161 41410000000000_
8 aa 2 1 6161 4141000000000000_
9 aa 2 1 6161 414100000000000000_
10 aa 2 0 6161 41410000000000000000
11 aa 2 0 6161 4141000000000000000000
12 aa 2 0 6161 414100000000000000000000
1 aA 1 3 61A3C1 41^
2 aA 3 3 61A3C1 41A3^
3 aA 3 1 61A3C1 41A3C1_
4 aA 3 1 61A3C1 41A3C100_
5 aA 3 1 61A3C1 41A3C10000_
6 aA 3 1 61A3C1 41A3C1000000_
7 aA 3 1 61A3C1 41A3C100000000_
8 aA 3 1 61A3C1 41A3C10000000000_
9 aA 3 1 61A3C1 41A3C1000000000000_
10 aA 3 1 61A3C1 41A3C100000000000000_
11 aA 3 0 61A3C1 41A3C10000000000000000
12 aA 3 0 61A3C1 41A3C1000000000000000000
1 A 2 3 A3C1 A3^
2 A 2 1 A3C1 A3C1_
3 A 2 1 A3C1 A3C100_
4 A 2 1 A3C1 A3C10000_
5 A 2 1 A3C1 A3C1000000_
6 A 2 1 A3C1 A3C100000000_
7 A 2 1 A3C1 A3C10000000000_
8 A 2 1 A3C1 A3C1000000000000_
9 A 2 1 A3C1 A3C100000000000000_
10 A 2 1 A3C1 A3C10000000000000000_
11 A 2 0 A3C1 A3C1000000000000000000
12 A 2 0 A3C1 A3C100000000000000000000
1 Aa 2 3 A3C161 A3^
2 Aa 2 3 A3C161 A3C1^
3 Aa 3 1 A3C161 A3C141_
4 Aa 3 1 A3C161 A3C14100_
5 Aa 3 1 A3C161 A3C1410000_
6 Aa 3 1 A3C161 A3C141000000_
7 Aa 3 1 A3C161 A3C14100000000_
8 Aa 3 1 A3C161 A3C1410000000000_
9 Aa 3 1 A3C161 A3C141000000000000_
10 Aa 3 1 A3C161 A3C14100000000000000_
11 Aa 3 0 A3C161 A3C1410000000000000000
12 Aa 3 0 A3C161 A3C141000000000000000000
1 AA 2 3 A3C1A3C1 A3^
2 AA 2 3 A3C1A3C1 A3C1^
3 AA 4 3 A3C1A3C1 A3C1A3^
4 AA 4 1 A3C1A3C1 A3C1A3C1_
5 AA 4 1 A3C1A3C1 A3C1A3C100_
6 AA 4 1 A3C1A3C1 A3C1A3C10000_
7 AA 4 1 A3C1A3C1 A3C1A3C1000000_
8 AA 4 1 A3C1A3C1 A3C1A3C100000000_
9 AA 4 1 A3C1A3C1 A3C1A3C10000000000_
10 AA 4 1 A3C1A3C1 A3C1A3C1000000000000_
11 AA 4 1 A3C1A3C1 A3C1A3C100000000000000_
12 AA 4 0 A3C1A3C1 A3C1A3C10000000000000000
DROP TABLE t1;
--source include/have_gb2312.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_chinese_nopad_ci);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_nopad_bin);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
1 aA 1 3 61A3C1 61^
2 aA 3 3 61A3C1 61A3^
3 aA 3 1 61A3C1 61A3C1_
4 aA 3 1 61A3C1 61A3C100_
5 aA 3 1 61A3C1 61A3C10000_
6 aA 3 1 61A3C1 61A3C1000000_
7 aA 3 1 61A3C1 61A3C100000000_
8 aA 3 1 61A3C1 61A3C10000000000_
9 aA 3 1 61A3C1 61A3C1000000000000_
10 aA 3 1 61A3C1 61A3C100000000000000_
11 aA 3 0 61A3C1 61A3C10000000000000000
12 aA 3 0 61A3C1 61A3C1000000000000000000
1 A 2 3 A3C1 A3^
2 A 2 1 A3C1 A3C1_
3 A 2 1 A3C1 A3C100_
4 A 2 1 A3C1 A3C10000_
5 A 2 1 A3C1 A3C1000000_
6 A 2 1 A3C1 A3C100000000_
7 A 2 1 A3C1 A3C10000000000_
8 A 2 1 A3C1 A3C1000000000000_
9 A 2 1 A3C1 A3C100000000000000_
10 A 2 1 A3C1 A3C10000000000000000_
11 A 2 0 A3C1 A3C1000000000000000000
12 A 2 0 A3C1 A3C100000000000000000000
1 Aa 2 3 A3C161 A3^
2 Aa 2 3 A3C161 A3C1^
3 Aa 3 1 A3C161 A3C161_
4 Aa 3 1 A3C161 A3C16100_
5 Aa 3 1 A3C161 A3C1610000_
6 Aa 3 1 A3C161 A3C161000000_
7 Aa 3 1 A3C161 A3C16100000000_
8 Aa 3 1 A3C161 A3C1610000000000_
9 Aa 3 1 A3C161 A3C161000000000000_
10 Aa 3 1 A3C161 A3C16100000000000000_
11 Aa 3 0 A3C161 A3C1610000000000000000
12 Aa 3 0 A3C161 A3C161000000000000000000
1 AA 2 3 A3C1A3C1 A3^
2 AA 2 3 A3C1A3C1 A3C1^
3 AA 4 3 A3C1A3C1 A3C1A3^
4 AA 4 1 A3C1A3C1 A3C1A3C1_
5 AA 4 1 A3C1A3C1 A3C1A3C100_
6 AA 4 1 A3C1A3C1 A3C1A3C10000_
7 AA 4 1 A3C1A3C1 A3C1A3C1000000_
8 AA 4 1 A3C1A3C1 A3C1A3C100000000_
9 AA 4 1 A3C1A3C1 A3C1A3C10000000000_
10 AA 4 1 A3C1A3C1 A3C1A3C1000000000000_
11 AA 4 1 A3C1A3C1 A3C1A3C100000000000000_
12 AA 4 0 A3C1A3C1 A3C1A3C10000000000000000
DROP TABLE t1;
--source include/have_gb2312.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET gb2312 COLLATE gb2312_nopad_bin);
CALL populate_t1('gb2312');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 61_
2 a 1 1 61 6120_
3 a 1 1 61 612020_
4 a 1 1 61 61202020_
5 a 1 1 61 6120202020_
6 a 1 1 61 612020202020_
7 a 1 1 61 61202020202020_
8 a 1 1 61 6120202020202020_
9 a 1 1 61 612020202020202020_
10 a 1 0 61 61202020202020202020
11 a 1 0 61 6120202020202020202020
12 a 1 0 61 612020202020202020202020
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616120_
4 aa 2 1 6161 61612020_
5 aa 2 1 6161 6161202020_
6 aa 2 1 6161 616120202020_
7 aa 2 1 6161 61612020202020_
8 aa 2 1 6161 6161202020202020_
9 aa 2 1 6161 616120202020202020_
10 aa 2 0 6161 61612020202020202020
11 aa 2 0 6161 6161202020202020202020
12 aa 2 0 6161 616120202020202020202020
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t0 (a TEXT CHARACTER SET latin1);
INSERT INTO t0 VALUES (''),('a'),('e'),('s'),('u');
INSERT INTO t0 VALUES ('ae'),('oe'),('ue');
INSERT INTO t0 VALUES
(_latin1 0xC4),(_latin1 0xD6),(_latin1 0xDC),(_latin1 0xDF);
CREATE VIEW v0 AS SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_german2_ci);
INSERT INTO t1 SELECT * FROM v0;
CALL test_strnxfrm(10,12);
DROP TABLE t1;
DROP VIEW v0;
DROP TABLE t0;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 41_
2 a 1 1 61 4120_
3 a 1 1 61 412020_
4 a 1 1 61 41202020_
5 a 1 1 61 4120202020_
6 a 1 1 61 412020202020_
7 a 1 1 61 41202020202020_
8 a 1 1 61 4120202020202020_
9 a 1 1 61 412020202020202020_
10 a 1 0 61 41202020202020202020
11 a 1 0 61 4120202020202020202020
12 a 1 0 61 412020202020202020202020
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414120_
4 aa 2 1 6161 41412020_
5 aa 2 1 6161 4141202020_
6 aa 2 1 6161 414120202020_
7 aa 2 1 6161 41412020202020_
8 aa 2 1 6161 4141202020202020_
9 aa 2 1 6161 414120202020202020_
10 aa 2 0 6161 41412020202020202020
11 aa 2 0 6161 4141202020202020202020
12 aa 2 0 6161 414120202020202020202020
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_swedish_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 41_
2 a 1 1 61 4100_
3 a 1 1 61 410000_
4 a 1 1 61 41000000_
5 a 1 1 61 4100000000_
6 a 1 1 61 410000000000_
7 a 1 1 61 41000000000000_
8 a 1 1 61 4100000000000000_
9 a 1 1 61 410000000000000000_
10 a 1 0 61 41000000000000000000
11 a 1 0 61 4100000000000000000000
12 a 1 0 61 410000000000000000000000
1 aa 1 3 6161 41^
2 aa 2 1 6161 4141_
3 aa 2 1 6161 414100_
4 aa 2 1 6161 41410000_
5 aa 2 1 6161 4141000000_
6 aa 2 1 6161 414100000000_
7 aa 2 1 6161 41410000000000_
8 aa 2 1 6161 4141000000000000_
9 aa 2 1 6161 414100000000000000_
10 aa 2 0 6161 41410000000000000000
11 aa 2 0 6161 4141000000000000000000
12 aa 2 0 6161 414100000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET latin1 COLLATE latin1_swedish_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
-- source include/have_latin2_ch.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t0 (a TEXT CHARACTER SET utf8mb4);
INSERT INTO t0 VALUES (''),('c'),('h'),('C'),('H');
CREATE VIEW v0 AS SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
CREATE TABLE t1 (str TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs);
INSERT INTO t1 SELECT * FROM v0;
CALL test_strnxfrm(10,12);
DROP TABLE t1;
DROP VIEW v0;
DROP TABLE t0;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 61_
2 a 1 1 61 6120_
3 a 1 1 61 612020_
4 a 1 1 61 61202020_
5 a 1 1 61 6120202020_
6 a 1 1 61 612020202020_
7 a 1 1 61 61202020202020_
8 a 1 1 61 6120202020202020_
9 a 1 1 61 612020202020202020_
10 a 1 0 61 61202020202020202020
11 a 1 0 61 6120202020202020202020
12 a 1 0 61 612020202020202020202020
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616120_
4 aa 2 1 6161 61612020_
5 aa 2 1 6161 6161202020_
6 aa 2 1 6161 616120202020_
7 aa 2 1 6161 61612020202020_
8 aa 2 1 6161 6161202020202020_
9 aa 2 1 6161 616120202020202020_
10 aa 2 0 6161 61612020202020202020
11 aa 2 0 6161 6161202020202020202020
12 aa 2 0 6161 616120202020202020202020
DROP TABLE t1;
--source include/have_tis620.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
DROP TABLE t1;
--source include/have_tis620.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_thai_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 20_
2 0 1 2020_
3 0 1 202020_
4 0 1 20202020_
5 0 1 2020202020_
6 0 1 202020202020_
7 0 1 20202020202020_
8 0 1 2020202020202020_
9 0 1 202020202020202020_
10 0 0 20202020202020202020
11 0 0 2020202020202020202020
12 0 0 202020202020202020202020
1 a 1 1 61 61_
2 a 1 1 61 6120_
3 a 1 1 61 612020_
4 a 1 1 61 61202020_
5 a 1 1 61 6120202020_
6 a 1 1 61 612020202020_
7 a 1 1 61 61202020202020_
8 a 1 1 61 6120202020202020_
9 a 1 1 61 612020202020202020_
10 a 1 0 61 61202020202020202020
11 a 1 0 61 6120202020202020202020
12 a 1 0 61 612020202020202020202020
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616120_
4 aa 2 1 6161 61612020_
5 aa 2 1 6161 6161202020_
6 aa 2 1 6161 616120202020_
7 aa 2 1 6161 61612020202020_
8 aa 2 1 6161 6161202020202020_
9 aa 2 1 6161 616120202020202020_
10 aa 2 0 6161 61612020202020202020
11 aa 2 0 6161 6161202020202020202020
12 aa 2 0 6161 616120202020202020202020
DROP TABLE t1;
--source include/have_tis620.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_thai_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_thai_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 0 00000000000000000000
11 0 0 0000000000000000000000
12 0 0 000000000000000000000000
1 a 1 1 61 61_
2 a 1 1 61 6100_
3 a 1 1 61 610000_
4 a 1 1 61 61000000_
5 a 1 1 61 6100000000_
6 a 1 1 61 610000000000_
7 a 1 1 61 61000000000000_
8 a 1 1 61 6100000000000000_
9 a 1 1 61 610000000000000000_
10 a 1 0 61 61000000000000000000
11 a 1 0 61 6100000000000000000000
12 a 1 0 61 610000000000000000000000
1 aa 1 3 6161 61^
2 aa 2 1 6161 6161_
3 aa 2 1 6161 616100_
4 aa 2 1 6161 61610000_
5 aa 2 1 6161 6161000000_
6 aa 2 1 6161 616100000000_
7 aa 2 1 6161 61610000000000_
8 aa 2 1 6161 6161000000000000_
9 aa 2 1 6161 616100000000000000_
10 aa 2 0 6161 61610000000000000000
11 aa 2 0 6161 6161000000000000000000
12 aa 2 0 6161 616100000000000000000000
DROP TABLE t1;
--source include/have_tis620.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET tis620 COLLATE tis620_thai_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,12);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0020_
3 0 1 002000_
4 0 1 00200020_
5 0 1 0020002000_
6 0 1 002000200020_
7 0 1 00200020002000_
8 0 1 0020002000200020_
9 0 1 002000200020002000_
10 0 1 00200020002000200020_
11 0 1 0020002000200020002000_
12 0 1 002000200020002000200020_
13 0 1 00200020002000200020002000_
14 0 1 0020002000200020002000200020_
15 0 1 002000200020002000200020002000_
16 0 1 00200020002000200020002000200020_
17 0 1 0020002000200020002000200020002000_
18 0 1 002000200020002000200020002000200020_
19 0 1 00200020002000200020002000200020002000_
20 0 0 0020002000200020002000200020002000200020
21 0 0 002000200020002000200020002000200020002000
22 0 0 00200020002000200020002000200020002000200020
1 a 1 3 61 00^
2 a 1 1 61 0061_
3 a 1 1 61 006100_
4 a 1 1 61 00610020_
5 a 1 1 61 0061002000_
6 a 1 1 61 006100200020_
7 a 1 1 61 00610020002000_
8 a 1 1 61 0061002000200020_
9 a 1 1 61 006100200020002000_
10 a 1 1 61 00610020002000200020_
11 a 1 1 61 0061002000200020002000_
12 a 1 1 61 006100200020002000200020_
13 a 1 1 61 00610020002000200020002000_
14 a 1 1 61 0061002000200020002000200020_
15 a 1 1 61 006100200020002000200020002000_
16 a 1 1 61 00610020002000200020002000200020_
17 a 1 1 61 0061002000200020002000200020002000_
18 a 1 1 61 006100200020002000200020002000200020_
19 a 1 1 61 00610020002000200020002000200020002000_
20 a 1 0 61 0061002000200020002000200020002000200020
21 a 1 0 61 006100200020002000200020002000200020002000
22 a 1 0 61 00610020002000200020002000200020002000200020
1 aa 1 3 6161 00^
2 aa 1 3 6161 0061^
3 aa 2 3 6161 006100^
4 aa 2 1 6161 00610061_
5 aa 2 1 6161 0061006100_
6 aa 2 1 6161 006100610020_
7 aa 2 1 6161 00610061002000_
8 aa 2 1 6161 0061006100200020_
9 aa 2 1 6161 006100610020002000_
10 aa 2 1 6161 00610061002000200020_
11 aa 2 1 6161 0061006100200020002000_
12 aa 2 1 6161 006100610020002000200020_
13 aa 2 1 6161 00610061002000200020002000_
14 aa 2 1 6161 0061006100200020002000200020_
15 aa 2 1 6161 006100610020002000200020002000_
16 aa 2 1 6161 00610061002000200020002000200020_
17 aa 2 1 6161 0061006100200020002000200020002000_
18 aa 2 1 6161 006100610020002000200020002000200020_
19 aa 2 1 6161 00610061002000200020002000200020002000_
20 aa 2 0 6161 0061006100200020002000200020002000200020
21 aa 2 0 6161 006100610020002000200020002000200020002000
22 aa 2 0 6161 00610061002000200020002000200020002000200020
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0020_
3 0 1 002000_
4 0 1 00200020_
5 0 1 0020002000_
6 0 1 002000200020_
7 0 1 00200020002000_
8 0 1 0020002000200020_
9 0 1 002000200020002000_
10 0 1 00200020002000200020_
11 0 1 0020002000200020002000_
12 0 1 002000200020002000200020_
13 0 1 00200020002000200020002000_
14 0 1 0020002000200020002000200020_
15 0 1 002000200020002000200020002000_
16 0 1 00200020002000200020002000200020_
17 0 1 0020002000200020002000200020002000_
18 0 1 002000200020002000200020002000200020_
19 0 1 00200020002000200020002000200020002000_
20 0 0 0020002000200020002000200020002000200020
21 0 0 002000200020002000200020002000200020002000
22 0 0 00200020002000200020002000200020002000200020
1 a 1 3 61 00^
2 a 1 1 61 0041_
3 a 1 1 61 004100_
4 a 1 1 61 00410020_
5 a 1 1 61 0041002000_
6 a 1 1 61 004100200020_
7 a 1 1 61 00410020002000_
8 a 1 1 61 0041002000200020_
9 a 1 1 61 004100200020002000_
10 a 1 1 61 00410020002000200020_
11 a 1 1 61 0041002000200020002000_
12 a 1 1 61 004100200020002000200020_
13 a 1 1 61 00410020002000200020002000_
14 a 1 1 61 0041002000200020002000200020_
15 a 1 1 61 004100200020002000200020002000_
16 a 1 1 61 00410020002000200020002000200020_
17 a 1 1 61 0041002000200020002000200020002000_
18 a 1 1 61 004100200020002000200020002000200020_
19 a 1 1 61 00410020002000200020002000200020002000_
20 a 1 0 61 0041002000200020002000200020002000200020
21 a 1 0 61 004100200020002000200020002000200020002000
22 a 1 0 61 00410020002000200020002000200020002000200020
1 aa 1 3 6161 00^
2 aa 1 3 6161 0041^
3 aa 2 3 6161 004100^
4 aa 2 1 6161 00410041_
5 aa 2 1 6161 0041004100_
6 aa 2 1 6161 004100410020_
7 aa 2 1 6161 00410041002000_
8 aa 2 1 6161 0041004100200020_
9 aa 2 1 6161 004100410020002000_
10 aa 2 1 6161 00410041002000200020_
11 aa 2 1 6161 0041004100200020002000_
12 aa 2 1 6161 004100410020002000200020_
13 aa 2 1 6161 00410041002000200020002000_
14 aa 2 1 6161 0041004100200020002000200020_
15 aa 2 1 6161 004100410020002000200020002000_
16 aa 2 1 6161 00410041002000200020002000200020_
17 aa 2 1 6161 0041004100200020002000200020002000_
18 aa 2 1 6161 004100410020002000200020002000200020_
19 aa 2 1 6161 00410041002000200020002000200020002000_
20 aa 2 0 6161 0041004100200020002000200020002000200020
21 aa 2 0 6161 004100410020002000200020002000200020002000
22 aa 2 0 6161 00410041002000200020002000200020002000200020
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 1 00000000000000000000_
11 0 1 0000000000000000000000_
12 0 1 000000000000000000000000_
13 0 1 00000000000000000000000000_
14 0 1 0000000000000000000000000000_
15 0 1 000000000000000000000000000000_
16 0 1 00000000000000000000000000000000_
17 0 1 0000000000000000000000000000000000_
18 0 1 000000000000000000000000000000000000_
19 0 1 00000000000000000000000000000000000000_
20 0 0 0000000000000000000000000000000000000000
21 0 0 000000000000000000000000000000000000000000
22 0 0 00000000000000000000000000000000000000000000
1 a 1 3 61 00^
2 a 1 1 61 0041_
3 a 1 1 61 004100_
4 a 1 1 61 00410000_
5 a 1 1 61 0041000000_
6 a 1 1 61 004100000000_
7 a 1 1 61 00410000000000_
8 a 1 1 61 0041000000000000_
9 a 1 1 61 004100000000000000_
10 a 1 1 61 00410000000000000000_
11 a 1 1 61 0041000000000000000000_
12 a 1 1 61 004100000000000000000000_
13 a 1 1 61 00410000000000000000000000_
14 a 1 1 61 0041000000000000000000000000_
15 a 1 1 61 004100000000000000000000000000_
16 a 1 1 61 00410000000000000000000000000000_
17 a 1 1 61 0041000000000000000000000000000000_
18 a 1 1 61 004100000000000000000000000000000000_
19 a 1 1 61 00410000000000000000000000000000000000_
20 a 1 0 61 0041000000000000000000000000000000000000
21 a 1 0 61 004100000000000000000000000000000000000000
22 a 1 0 61 00410000000000000000000000000000000000000000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0041^
3 aa 2 3 6161 004100^
4 aa 2 1 6161 00410041_
5 aa 2 1 6161 0041004100_
6 aa 2 1 6161 004100410000_
7 aa 2 1 6161 00410041000000_
8 aa 2 1 6161 0041004100000000_
9 aa 2 1 6161 004100410000000000_
10 aa 2 1 6161 00410041000000000000_
11 aa 2 1 6161 0041004100000000000000_
12 aa 2 1 6161 004100410000000000000000_
13 aa 2 1 6161 00410041000000000000000000_
14 aa 2 1 6161 0041004100000000000000000000_
15 aa 2 1 6161 004100410000000000000000000000_
16 aa 2 1 6161 00410041000000000000000000000000_
17 aa 2 1 6161 0041004100000000000000000000000000_
18 aa 2 1 6161 004100410000000000000000000000000000_
19 aa 2 1 6161 00410041000000000000000000000000000000_
20 aa 2 0 6161 0041004100000000000000000000000000000000
21 aa 2 0 6161 004100410000000000000000000000000000000000
22 aa 2 0 6161 00410041000000000000000000000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 1 00000000000000000000_
11 0 1 0000000000000000000000_
12 0 1 000000000000000000000000_
13 0 1 00000000000000000000000000_
14 0 1 0000000000000000000000000000_
15 0 1 000000000000000000000000000000_
16 0 1 00000000000000000000000000000000_
17 0 1 0000000000000000000000000000000000_
18 0 1 000000000000000000000000000000000000_
19 0 1 00000000000000000000000000000000000000_
20 0 0 0000000000000000000000000000000000000000
21 0 0 000000000000000000000000000000000000000000
22 0 0 00000000000000000000000000000000000000000000
1 a 1 3 61 00^
2 a 1 1 61 0061_
3 a 1 1 61 006100_
4 a 1 1 61 00610000_
5 a 1 1 61 0061000000_
6 a 1 1 61 006100000000_
7 a 1 1 61 00610000000000_
8 a 1 1 61 0061000000000000_
9 a 1 1 61 006100000000000000_
10 a 1 1 61 00610000000000000000_
11 a 1 1 61 0061000000000000000000_
12 a 1 1 61 006100000000000000000000_
13 a 1 1 61 00610000000000000000000000_
14 a 1 1 61 0061000000000000000000000000_
15 a 1 1 61 006100000000000000000000000000_
16 a 1 1 61 00610000000000000000000000000000_
17 a 1 1 61 0061000000000000000000000000000000_
18 a 1 1 61 006100000000000000000000000000000000_
19 a 1 1 61 00610000000000000000000000000000000000_
20 a 1 0 61 0061000000000000000000000000000000000000
21 a 1 0 61 006100000000000000000000000000000000000000
22 a 1 0 61 00610000000000000000000000000000000000000000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0061^
3 aa 2 3 6161 006100^
4 aa 2 1 6161 00610061_
5 aa 2 1 6161 0061006100_
6 aa 2 1 6161 006100610000_
7 aa 2 1 6161 00610061000000_
8 aa 2 1 6161 0061006100000000_
9 aa 2 1 6161 006100610000000000_
10 aa 2 1 6161 00610061000000000000_
11 aa 2 1 6161 0061006100000000000000_
12 aa 2 1 6161 006100610000000000000000_
13 aa 2 1 6161 00610061000000000000000000_
14 aa 2 1 6161 0061006100000000000000000000_
15 aa 2 1 6161 006100610000000000000000000000_
16 aa 2 1 6161 00610061000000000000000000000000_
17 aa 2 1 6161 0061006100000000000000000000000000_
18 aa 2 1 6161 006100610000000000000000000000000000_
19 aa 2 1 6161 00610061000000000000000000000000000000_
20 aa 2 0 6161 0061006100000000000000000000000000000000
21 aa 2 0 6161 006100610000000000000000000000000000000000
22 aa 2 0 6161 00610061000000000000000000000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000020_
4 0 1 00002000_
5 0 1 0000200000_
6 0 1 000020000020_
7 0 1 00002000002000_
8 0 1 0000200000200000_
9 0 1 000020000020000020_
10 0 1 00002000002000002000_
11 0 1 0000200000200000200000_
12 0 1 000020000020000020000020_
13 0 1 00002000002000002000002000_
14 0 1 0000200000200000200000200000_
15 0 1 000020000020000020000020000020_
16 0 1 00002000002000002000002000002000_
17 0 1 0000200000200000200000200000200000_
18 0 1 000020000020000020000020000020000020_
19 0 1 00002000002000002000002000002000002000_
20 0 1 0000200000200000200000200000200000200000_
21 0 1 000020000020000020000020000020000020000020_
22 0 1 00002000002000002000002000002000002000002000_
23 0 1 0000200000200000200000200000200000200000200000_
24 0 1 000020000020000020000020000020000020000020000020_
25 0 1 00002000002000002000002000002000002000002000002000_
26 0 1 0000200000200000200000200000200000200000200000200000_
27 0 1 000020000020000020000020000020000020000020000020000020_
28 0 1 00002000002000002000002000002000002000002000002000002000_
29 0 1 0000200000200000200000200000200000200000200000200000200000_
30 0 0 000020000020000020000020000020000020000020000020000020000020
31 0 0 00002000002000002000002000002000002000002000002000002000002000
32 0 0 0000200000200000200000200000200000200000200000200000200000200000
1 a 1 1 61 00_
2 a 1 1 61 0000_
3 a 1 1 61 000061_
4 a 1 1 61 00006100_
5 a 1 1 61 0000610000_
6 a 1 1 61 000061000020_
7 a 1 1 61 00006100002000_
8 a 1 1 61 0000610000200000_
9 a 1 1 61 000061000020000020_
10 a 1 1 61 00006100002000002000_
11 a 1 1 61 0000610000200000200000_
12 a 1 1 61 000061000020000020000020_
13 a 1 1 61 00006100002000002000002000_
14 a 1 1 61 0000610000200000200000200000_
15 a 1 1 61 000061000020000020000020000020_
16 a 1 1 61 00006100002000002000002000002000_
17 a 1 1 61 0000610000200000200000200000200000_
18 a 1 1 61 000061000020000020000020000020000020_
19 a 1 1 61 00006100002000002000002000002000002000_
20 a 1 1 61 0000610000200000200000200000200000200000_
21 a 1 1 61 000061000020000020000020000020000020000020_
22 a 1 1 61 00006100002000002000002000002000002000002000_
23 a 1 1 61 0000610000200000200000200000200000200000200000_
24 a 1 1 61 000061000020000020000020000020000020000020000020_
25 a 1 1 61 00006100002000002000002000002000002000002000002000_
26 a 1 1 61 0000610000200000200000200000200000200000200000200000_
27 a 1 1 61 000061000020000020000020000020000020000020000020000020_
28 a 1 1 61 00006100002000002000002000002000002000002000002000002000_
29 a 1 1 61 0000610000200000200000200000200000200000200000200000200000_
30 a 1 0 61 000061000020000020000020000020000020000020000020000020000020
31 a 1 0 61 00006100002000002000002000002000002000002000002000002000002000
32 a 1 0 61 0000610000200000200000200000200000200000200000200000200000200000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0000^
3 aa 1 3 6161 000061^
4 aa 2 1 6161 00006100_
5 aa 2 1 6161 0000610000_
6 aa 2 1 6161 000061000061_
7 aa 2 1 6161 00006100006100_
8 aa 2 1 6161 0000610000610000_
9 aa 2 1 6161 000061000061000020_
10 aa 2 1 6161 00006100006100002000_
11 aa 2 1 6161 0000610000610000200000_
12 aa 2 1 6161 000061000061000020000020_
13 aa 2 1 6161 00006100006100002000002000_
14 aa 2 1 6161 0000610000610000200000200000_
15 aa 2 1 6161 000061000061000020000020000020_
16 aa 2 1 6161 00006100006100002000002000002000_
17 aa 2 1 6161 0000610000610000200000200000200000_
18 aa 2 1 6161 000061000061000020000020000020000020_
19 aa 2 1 6161 00006100006100002000002000002000002000_
20 aa 2 1 6161 0000610000610000200000200000200000200000_
21 aa 2 1 6161 000061000061000020000020000020000020000020_
22 aa 2 1 6161 00006100006100002000002000002000002000002000_
23 aa 2 1 6161 0000610000610000200000200000200000200000200000_
24 aa 2 1 6161 000061000061000020000020000020000020000020000020_
25 aa 2 1 6161 00006100006100002000002000002000002000002000002000_
26 aa 2 1 6161 0000610000610000200000200000200000200000200000200000_
27 aa 2 1 6161 000061000061000020000020000020000020000020000020000020_
28 aa 2 1 6161 00006100006100002000002000002000002000002000002000002000_
29 aa 2 1 6161 0000610000610000200000200000200000200000200000200000200000_
30 aa 2 0 6161 000061000061000020000020000020000020000020000020000020000020
31 aa 2 0 6161 00006100006100002000002000002000002000002000002000002000002000
32 aa 2 0 6161 0000610000610000200000200000200000200000200000200000200000200000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general1400_as_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000020_
4 0 1 00002000_
5 0 1 0000200000_
6 0 1 000020000020_
7 0 1 00002000002000_
8 0 1 0000200000200000_
9 0 1 000020000020000020_
10 0 1 00002000002000002000_
11 0 1 0000200000200000200000_
12 0 1 000020000020000020000020_
13 0 1 00002000002000002000002000_
14 0 1 0000200000200000200000200000_
15 0 1 000020000020000020000020000020_
16 0 1 00002000002000002000002000002000_
17 0 1 0000200000200000200000200000200000_
18 0 1 000020000020000020000020000020000020_
19 0 1 00002000002000002000002000002000002000_
20 0 1 0000200000200000200000200000200000200000_
21 0 1 000020000020000020000020000020000020000020_
22 0 1 00002000002000002000002000002000002000002000_
23 0 1 0000200000200000200000200000200000200000200000_
24 0 1 000020000020000020000020000020000020000020000020_
25 0 1 00002000002000002000002000002000002000002000002000_
26 0 1 0000200000200000200000200000200000200000200000200000_
27 0 1 000020000020000020000020000020000020000020000020000020_
28 0 1 00002000002000002000002000002000002000002000002000002000_
29 0 1 0000200000200000200000200000200000200000200000200000200000_
30 0 0 000020000020000020000020000020000020000020000020000020000020
31 0 0 00002000002000002000002000002000002000002000002000002000002000
32 0 0 0000200000200000200000200000200000200000200000200000200000200000
1 a 1 3 61 00^
2 a 1 3 61 0000^
3 a 1 1 61 000041_
4 a 1 1 61 00004100_
5 a 1 1 61 0000410000_
6 a 1 1 61 000041000020_
7 a 1 1 61 00004100002000_
8 a 1 1 61 0000410000200000_
9 a 1 1 61 000041000020000020_
10 a 1 1 61 00004100002000002000_
11 a 1 1 61 0000410000200000200000_
12 a 1 1 61 000041000020000020000020_
13 a 1 1 61 00004100002000002000002000_
14 a 1 1 61 0000410000200000200000200000_
15 a 1 1 61 000041000020000020000020000020_
16 a 1 1 61 00004100002000002000002000002000_
17 a 1 1 61 0000410000200000200000200000200000_
18 a 1 1 61 000041000020000020000020000020000020_
19 a 1 1 61 00004100002000002000002000002000002000_
20 a 1 1 61 0000410000200000200000200000200000200000_
21 a 1 1 61 000041000020000020000020000020000020000020_
22 a 1 1 61 00004100002000002000002000002000002000002000_
23 a 1 1 61 0000410000200000200000200000200000200000200000_
24 a 1 1 61 000041000020000020000020000020000020000020000020_
25 a 1 1 61 00004100002000002000002000002000002000002000002000_
26 a 1 1 61 0000410000200000200000200000200000200000200000200000_
27 a 1 1 61 000041000020000020000020000020000020000020000020000020_
28 a 1 1 61 00004100002000002000002000002000002000002000002000002000_
29 a 1 1 61 0000410000200000200000200000200000200000200000200000200000_
30 a 1 0 61 000041000020000020000020000020000020000020000020000020000020
31 a 1 0 61 00004100002000002000002000002000002000002000002000002000002000
32 a 1 0 61 0000410000200000200000200000200000200000200000200000200000200000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0000^
3 aa 1 3 6161 000041^
4 aa 2 3 6161 00004100^
5 aa 2 3 6161 0000410000^
6 aa 2 1 6161 000041000041_
7 aa 2 1 6161 00004100004100_
8 aa 2 1 6161 0000410000410000_
9 aa 2 1 6161 000041000041000020_
10 aa 2 1 6161 00004100004100002000_
11 aa 2 1 6161 0000410000410000200000_
12 aa 2 1 6161 000041000041000020000020_
13 aa 2 1 6161 00004100004100002000002000_
14 aa 2 1 6161 0000410000410000200000200000_
15 aa 2 1 6161 000041000041000020000020000020_
16 aa 2 1 6161 00004100004100002000002000002000_
17 aa 2 1 6161 0000410000410000200000200000200000_
18 aa 2 1 6161 000041000041000020000020000020000020_
19 aa 2 1 6161 00004100004100002000002000002000002000_
20 aa 2 1 6161 0000410000410000200000200000200000200000_
21 aa 2 1 6161 000041000041000020000020000020000020000020_
22 aa 2 1 6161 00004100004100002000002000002000002000002000_
23 aa 2 1 6161 0000410000410000200000200000200000200000200000_
24 aa 2 1 6161 000041000041000020000020000020000020000020000020_
25 aa 2 1 6161 00004100004100002000002000002000002000002000002000_
26 aa 2 1 6161 0000410000410000200000200000200000200000200000200000_
27 aa 2 1 6161 000041000041000020000020000020000020000020000020000020_
28 aa 2 1 6161 00004100004100002000002000002000002000002000002000002000_
29 aa 2 1 6161 0000410000410000200000200000200000200000200000200000200000_
30 aa 2 0 6161 000041000041000020000020000020000020000020000020000020000020
31 aa 2 0 6161 00004100004100002000002000002000002000002000002000002000002000
32 aa 2 0 6161 0000410000410000200000200000200000200000200000200000200000200000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general1400_as_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0020_
3 0 1 002000_
4 0 1 00200020_
5 0 1 0020002000_
6 0 1 002000200020_
7 0 1 00200020002000_
8 0 1 0020002000200020_
9 0 1 002000200020002000_
10 0 1 00200020002000200020_
11 0 1 0020002000200020002000_
12 0 1 002000200020002000200020_
13 0 1 00200020002000200020002000_
14 0 1 0020002000200020002000200020_
15 0 1 002000200020002000200020002000_
16 0 1 00200020002000200020002000200020_
17 0 1 0020002000200020002000200020002000_
18 0 1 002000200020002000200020002000200020_
19 0 1 00200020002000200020002000200020002000_
20 0 0 0020002000200020002000200020002000200020
21 0 0 002000200020002000200020002000200020002000
22 0 0 00200020002000200020002000200020002000200020
1 a 1 3 61 00^
2 a 1 1 61 0041_
3 a 1 1 61 004100_
4 a 1 1 61 00410020_
5 a 1 1 61 0041002000_
6 a 1 1 61 004100200020_
7 a 1 1 61 00410020002000_
8 a 1 1 61 0041002000200020_
9 a 1 1 61 004100200020002000_
10 a 1 1 61 00410020002000200020_
11 a 1 1 61 0041002000200020002000_
12 a 1 1 61 004100200020002000200020_
13 a 1 1 61 00410020002000200020002000_
14 a 1 1 61 0041002000200020002000200020_
15 a 1 1 61 004100200020002000200020002000_
16 a 1 1 61 00410020002000200020002000200020_
17 a 1 1 61 0041002000200020002000200020002000_
18 a 1 1 61 004100200020002000200020002000200020_
19 a 1 1 61 00410020002000200020002000200020002000_
20 a 1 0 61 0041002000200020002000200020002000200020
21 a 1 0 61 004100200020002000200020002000200020002000
22 a 1 0 61 00410020002000200020002000200020002000200020
1 aa 1 3 6161 00^
2 aa 1 3 6161 0041^
3 aa 2 3 6161 004100^
4 aa 2 1 6161 00410041_
5 aa 2 1 6161 0041004100_
6 aa 2 1 6161 004100410020_
7 aa 2 1 6161 00410041002000_
8 aa 2 1 6161 0041004100200020_
9 aa 2 1 6161 004100410020002000_
10 aa 2 1 6161 00410041002000200020_
11 aa 2 1 6161 0041004100200020002000_
12 aa 2 1 6161 004100410020002000200020_
13 aa 2 1 6161 00410041002000200020002000_
14 aa 2 1 6161 0041004100200020002000200020_
15 aa 2 1 6161 004100410020002000200020002000_
16 aa 2 1 6161 00410041002000200020002000200020_
17 aa 2 1 6161 0041004100200020002000200020002000_
18 aa 2 1 6161 004100410020002000200020002000200020_
19 aa 2 1 6161 00410041002000200020002000200020002000_
20 aa 2 0 6161 0041004100200020002000200020002000200020
21 aa 2 0 6161 004100410020002000200020002000200020002000
22 aa 2 0 6161 00410041002000200020002000200020002000200020
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 1 00000000000000000000_
11 0 1 0000000000000000000000_
12 0 1 000000000000000000000000_
13 0 1 00000000000000000000000000_
14 0 1 0000000000000000000000000000_
15 0 1 000000000000000000000000000000_
16 0 1 00000000000000000000000000000000_
17 0 1 0000000000000000000000000000000000_
18 0 1 000000000000000000000000000000000000_
19 0 1 00000000000000000000000000000000000000_
20 0 0 0000000000000000000000000000000000000000
21 0 0 000000000000000000000000000000000000000000
22 0 0 00000000000000000000000000000000000000000000
1 a 1 3 61 00^
2 a 1 1 61 0041_
3 a 1 1 61 004100_
4 a 1 1 61 00410000_
5 a 1 1 61 0041000000_
6 a 1 1 61 004100000000_
7 a 1 1 61 00410000000000_
8 a 1 1 61 0041000000000000_
9 a 1 1 61 004100000000000000_
10 a 1 1 61 00410000000000000000_
11 a 1 1 61 0041000000000000000000_
12 a 1 1 61 004100000000000000000000_
13 a 1 1 61 00410000000000000000000000_
14 a 1 1 61 0041000000000000000000000000_
15 a 1 1 61 004100000000000000000000000000_
16 a 1 1 61 00410000000000000000000000000000_
17 a 1 1 61 0041000000000000000000000000000000_
18 a 1 1 61 004100000000000000000000000000000000_
19 a 1 1 61 00410000000000000000000000000000000000_
20 a 1 0 61 0041000000000000000000000000000000000000
21 a 1 0 61 004100000000000000000000000000000000000000
22 a 1 0 61 00410000000000000000000000000000000000000000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0041^
3 aa 2 3 6161 004100^
4 aa 2 1 6161 00410041_
5 aa 2 1 6161 0041004100_
6 aa 2 1 6161 004100410000_
7 aa 2 1 6161 00410041000000_
8 aa 2 1 6161 0041004100000000_
9 aa 2 1 6161 004100410000000000_
10 aa 2 1 6161 00410041000000000000_
11 aa 2 1 6161 0041004100000000000000_
12 aa 2 1 6161 004100410000000000000000_
13 aa 2 1 6161 00410041000000000000000000_
14 aa 2 1 6161 0041004100000000000000000000_
15 aa 2 1 6161 004100410000000000000000000000_
16 aa 2 1 6161 00410041000000000000000000000000_
17 aa 2 1 6161 0041004100000000000000000000000000_
18 aa 2 1 6161 004100410000000000000000000000000000_
19 aa 2 1 6161 00410041000000000000000000000000000000_
20 aa 2 0 6161 0041004100000000000000000000000000000000
21 aa 2 0 6161 004100410000000000000000000000000000000000
22 aa 2 0 6161 00410041000000000000000000000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_nopad_ci);
CALL populate_t1('simple');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
mul
1
seq str srcused warn h ws
1 0 1 00_
2 0 1 0000_
3 0 1 000000_
4 0 1 00000000_
5 0 1 0000000000_
6 0 1 000000000000_
7 0 1 00000000000000_
8 0 1 0000000000000000_
9 0 1 000000000000000000_
10 0 1 00000000000000000000_
11 0 1 0000000000000000000000_
12 0 1 000000000000000000000000_
13 0 1 00000000000000000000000000_
14 0 1 0000000000000000000000000000_
15 0 1 000000000000000000000000000000_
16 0 1 00000000000000000000000000000000_
17 0 1 0000000000000000000000000000000000_
18 0 1 000000000000000000000000000000000000_
19 0 1 00000000000000000000000000000000000000_
20 0 1 0000000000000000000000000000000000000000_
21 0 1 000000000000000000000000000000000000000000_
22 0 1 00000000000000000000000000000000000000000000_
23 0 1 0000000000000000000000000000000000000000000000_
24 0 1 000000000000000000000000000000000000000000000000_
25 0 1 00000000000000000000000000000000000000000000000000_
26 0 1 0000000000000000000000000000000000000000000000000000_
27 0 1 000000000000000000000000000000000000000000000000000000_
28 0 1 00000000000000000000000000000000000000000000000000000000_
29 0 1 0000000000000000000000000000000000000000000000000000000000_
30 0 0 000000000000000000000000000000000000000000000000000000000000
31 0 0 00000000000000000000000000000000000000000000000000000000000000
32 0 0 0000000000000000000000000000000000000000000000000000000000000000
1 a 1 1 61 00_
2 a 1 1 61 0000_
3 a 1 1 61 000061_
4 a 1 1 61 00006100_
5 a 1 1 61 0000610000_
6 a 1 1 61 000061000000_
7 a 1 1 61 00006100000000_
8 a 1 1 61 0000610000000000_
9 a 1 1 61 000061000000000000_
10 a 1 1 61 00006100000000000000_
11 a 1 1 61 0000610000000000000000_
12 a 1 1 61 000061000000000000000000_
13 a 1 1 61 00006100000000000000000000_
14 a 1 1 61 0000610000000000000000000000_
15 a 1 1 61 000061000000000000000000000000_
16 a 1 1 61 00006100000000000000000000000000_
17 a 1 1 61 0000610000000000000000000000000000_
18 a 1 1 61 000061000000000000000000000000000000_
19 a 1 1 61 00006100000000000000000000000000000000_
20 a 1 1 61 0000610000000000000000000000000000000000_
21 a 1 1 61 000061000000000000000000000000000000000000_
22 a 1 1 61 00006100000000000000000000000000000000000000_
23 a 1 1 61 0000610000000000000000000000000000000000000000_
24 a 1 1 61 000061000000000000000000000000000000000000000000_
25 a 1 1 61 00006100000000000000000000000000000000000000000000_
26 a 1 1 61 0000610000000000000000000000000000000000000000000000_
27 a 1 1 61 000061000000000000000000000000000000000000000000000000_
28 a 1 1 61 00006100000000000000000000000000000000000000000000000000_
29 a 1 1 61 0000610000000000000000000000000000000000000000000000000000_
30 a 1 0 61 000061000000000000000000000000000000000000000000000000000000
31 a 1 0 61 00006100000000000000000000000000000000000000000000000000000000
32 a 1 0 61 0000610000000000000000000000000000000000000000000000000000000000
1 aa 1 3 6161 00^
2 aa 1 3 6161 0000^
3 aa 1 3 6161 000061^
4 aa 2 1 6161 00006100_
5 aa 2 1 6161 0000610000_
6 aa 2 1 6161 000061000061_
7 aa 2 1 6161 00006100006100_
8 aa 2 1 6161 0000610000610000_
9 aa 2 1 6161 000061000061000000_
10 aa 2 1 6161 00006100006100000000_
11 aa 2 1 6161 0000610000610000000000_
12 aa 2 1 6161 000061000061000000000000_
13 aa 2 1 6161 00006100006100000000000000_
14 aa 2 1 6161 0000610000610000000000000000_
15 aa 2 1 6161 000061000061000000000000000000_
16 aa 2 1 6161 00006100006100000000000000000000_
17 aa 2 1 6161 0000610000610000000000000000000000_
18 aa 2 1 6161 000061000061000000000000000000000000_
19 aa 2 1 6161 00006100006100000000000000000000000000_
20 aa 2 1 6161 0000610000610000000000000000000000000000_
21 aa 2 1 6161 000061000061000000000000000000000000000000_
22 aa 2 1 6161 00006100006100000000000000000000000000000000_
23 aa 2 1 6161 0000610000610000000000000000000000000000000000_
24 aa 2 1 6161 000061000061000000000000000000000000000000000000_
25 aa 2 1 6161 00006100006100000000000000000000000000000000000000_
26 aa 2 1 6161 0000610000610000000000000000000000000000000000000000_
27 aa 2 1 6161 000061000061000000000000000000000000000000000000000000_
28 aa 2 1 6161 00006100006100000000000000000000000000000000000000000000_
29 aa 2 1 6161 0000610000610000000000000000000000000000000000000000000000_
30 aa 2 0 6161 000061000061000000000000000000000000000000000000000000000000
31 aa 2 0 6161 00006100006100000000000000000000000000000000000000000000000000
32 aa 2 0 6161 0000610000610000000000000000000000000000000000000000000000000000
DROP TABLE t1;
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_nopad_bin);
CALL populate_t1('simple');
CALL test_strnxfrm(10,32);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci);
CALL populate_t1('uca');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_as_ci);
CALL populate_t1('uca');
CALL test_strnxfrm(10,42);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_as_cs);
CALL populate_t1('uca');
CALL test_strnxfrm(10,62);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_czech_ai_ci);
CALL populate_t1('uca');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci);
CALL populate_t1('uca');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
SET NAMES utf8mb4;
--source strnxfrm_sp_create.inc
CREATE TABLE t1 (str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci);
CALL populate_t1('uca');
CALL test_strnxfrm(10,22);
DROP TABLE t1;
--source strnxfrm_sp_drop.inc
--disable_query_log
DELIMITER $$;
CREATE PROCEDURE test_strnxfrm(nweights INT, maxsz INT)
BEGIN
-- DECLARE flags INT DEFAULT 0x00000040/*MY_STRXFRM_PAD_WITH_SPACE*/ |
-- 0x00000080/*MY_STRXFRM_PAD_TO_MAXLEN*/;
DECLARE cl VARCHAR(64) DEFAULT (SELECT COLLATION_NAME
FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME='t1' and COLUMN_NAME='str');
DECLARE mul INT DEFAULT CASE
WHEN cl LIKE '%_as_cs' THEN 3
ELSE 1
END;
DECLARE v1_def TEXT DEFAULT
'CREATE VIEW v1_tmp AS SELECT '
' seq, str, '
' strnxfrm_source_length_used(str,seq,nweights,0xC0) AS srcused, '
' strnxfrm_warnings(str,seq,nweights,0xC0) AS warn, '
' RPAD(HEX(str),16) AS h, '
' hex(strnxfrm(str,seq,nweights,0xC0)) AS ws '
'FROM t1, seq '
'GROUP BY BINARY str, seq';
CREATE TABLE seq (seq INT);
FOR i IN 1..maxsz
DO
INSERT INTO seq VALUES (i);
END FOR;
EXECUTE IMMEDIATE REPLACE(v1_def, 'nweights', nweights);
SELECT mul;
SELECT seq, str, srcused, warn, h,
CONCAT(ws,
CASE WHEN warn & 2 THEN '^'
WHEN warn & 1 THEN '_'
ELSE ''
END) AS ws
FROM v1_tmp;
DROP VIEW v1_tmp;
DROP TABLE seq;
END;
$$
DELIMITER ;$$
DELIMITER $$;
CREATE PROCEDURE populate_t1(test VARCHAR(64))
BEGIN
-- U+FEFF ZERO WIDTH NO-BREAK SPACE (an ignorable character)
DECLARE zwnbsp TEXT CHARACTER SET utf8mb4 DEFAULT 0xEFBBBF;
DECLARE fwA TEXT CHARACTER SET utf8mb4 DEFAULT 0xEFBCA1;
CREATE TEMPORARY TABLE t0 (a TEXT CHARACTER SET utf8mb4);
IF test='simple'
THEN
INSERT INTO t0 VALUES (''),('a');
INSERT INTO t1 SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
END IF;
IF test='gb2312' OR test='big5'
THEN
INSERT INTO t0 VALUES (''),('a'),(fwA);
INSERT INTO t1 SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
END IF;
IF test='uca'
THEN
INSERT INTO t0 VALUES (''),('c'),('h'),('ß');
INSERT INTO t0 VALUES (CONCAT('c',zwnbsp));
INSERT INTO t0 VALUES (CONCAT(zwnbsp,'c'));
INSERT INTO t1 SELECT CONCAT(t1.a, t2.a) AS str FROM t0 t1, t0 t2;
END IF;
DROP TEMPORARY TABLE t0;
END;
$$
DELIMITER ;$$
--enable_query_log
--disable_query_log
DROP PROCEDURE test_strnxfrm;
DROP PROCEDURE populate_t1;
--enable_query_log
...@@ -71,6 +71,210 @@ Item* Create_func_sysconst_test::create_builder(THD *thd) ...@@ -71,6 +71,210 @@ Item* Create_func_sysconst_test::create_builder(THD *thd)
static Plugin_function static Plugin_function
plugin_descriptor_function_sysconst_test(BUILDER(Create_func_sysconst_test)); plugin_descriptor_function_sysconst_test(BUILDER(Create_func_sysconst_test));
class Strnxfrm_args: public Null_flag
{
StringBuffer<128> m_srcbuf;
public:
String *m_src;
longlong m_dstlen;
longlong m_nweights;
longlong m_flags;
Strnxfrm_args(Item **args)
:Null_flag(true)
{
if (!(m_src= args[0]->val_str(&m_srcbuf)))
return;
m_dstlen= args[1]->val_int();
if (args[1]->null_value || m_dstlen < 0)
return;
m_nweights= args[2]->val_int();
if (args[2]->null_value || m_nweights < 0)
return;
m_flags= args[3]->val_int();
if (args[3]->null_value || m_flags < 0)
return;
m_is_null= false;
}
my_strnxfrm_ret_t exec(CHARSET_INFO *cs, String *to)
{
DBUG_ASSERT(!is_null());
if ((m_is_null= to->alloc(m_dstlen)))
return {0,0,0};
my_strnxfrm_ret_t rc= cs->strnxfrm((char*) to->ptr(),
(size_t)m_dstlen,
(uint) m_nweights,
m_src->ptr(), m_src->length(),
(uint) m_flags);
to->length((uint32) rc.m_result_length);
return rc;
}
};
class Item_func_strnxfrm_source_length_used: public Item_longlong_func
{
using Self = Item_func_strnxfrm_source_length_used;
public:
using Item_longlong_func::Item_longlong_func;
longlong val_int() override
{
Strnxfrm_args param(args);
if ((null_value= param.is_null()))
return 0;
StringBuffer<128> dstbuf;
my_strnxfrm_ret_t rc= param.exec(args[0]->collation.collation, &dstbuf);
if ((null_value= param.is_null()))
return 0;
return (longlong) rc.m_source_length_used;
}
LEX_CSTRING func_name_cstring() const override
{
static LEX_CSTRING name= "strnxfrm_source_length_used"_LEX_CSTRING;
return name;
}
Item *do_get_copy(THD *thd) const override
{
return get_item_copy<Self>(thd, this);
}
class Create_func : public Create_native_func
{
public:
using Create_native_func::Create_native_func;
Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) override
{
uint arg_count= item_list ? item_list->elements : 0;
if (arg_count != 4)
{
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name->str);
return nullptr;
}
return new (thd->mem_root) Self(thd, *item_list);
}
};
static Plugin_function *plugin_descriptor()
{
static Create_func creator;
static Plugin_function descriptor(&creator);
return &descriptor;
}
};
class Item_func_strnxfrm_warnings: public Item_long_func
{
using Self = Item_func_strnxfrm_warnings;
public:
using Item_long_func::Item_long_func;
longlong val_int() override
{
Strnxfrm_args param(args);
if ((null_value= param.is_null()))
return 0;
StringBuffer<128> dstbuf;
my_strnxfrm_ret_t rc= param.exec(args[0]->collation.collation, &dstbuf);
if ((null_value= param.is_null()))
return 0;
return (longlong) rc.m_warnings;
}
LEX_CSTRING func_name_cstring() const override
{
static LEX_CSTRING name= "strnxfrm_warnings"_LEX_CSTRING;
return name;
}
Item *do_get_copy(THD *thd) const override
{
return get_item_copy<Self>(thd, this);
}
class Create_func : public Create_native_func
{
public:
using Create_native_func::Create_native_func;
Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) override
{
uint arg_count= item_list ? item_list->elements : 0;
if (arg_count != 4)
{
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name->str);
return nullptr;
}
return new (thd->mem_root) Self(thd, *item_list);
}
};
static Plugin_function *plugin_descriptor()
{
static Create_func creator;
static Plugin_function descriptor(&creator);
return &descriptor;
}
};
class Item_func_strnxfrm: public Item_str_func
{
using Self = Item_func_strnxfrm;
public:
using Item_str_func::Item_str_func;
bool fix_length_and_dec(THD *thd) override
{
max_length= MAX_BLOB_WIDTH;
return false;
}
String *val_str(String *to) override
{
Strnxfrm_args param(args);
if ((null_value= param.is_null()))
return nullptr;
param.exec(args[0]->collation.collation, to);
if ((null_value= param.is_null()))
return nullptr;
return to;
}
LEX_CSTRING func_name_cstring() const override
{
static LEX_CSTRING name= "strnxfrm"_LEX_CSTRING;
return name;
}
Item *do_get_copy(THD *thd) const override
{
return get_item_copy<Self>(thd, this);
}
class Create_func : public Create_native_func
{
public:
using Create_native_func::Create_native_func;
Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) override
{
uint arg_count= item_list ? item_list->elements : 0;
if (arg_count != 4)
{
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name->str);
return nullptr;
}
return new (thd->mem_root) Self(thd, *item_list);
}
};
static Plugin_function *plugin_descriptor()
{
static Create_func creator;
static Plugin_function descriptor(&creator);
return &descriptor;
}
};
/*************************************************************************/ /*************************************************************************/
maria_declare_plugin(type_test) maria_declare_plugin(type_test)
...@@ -88,5 +292,50 @@ maria_declare_plugin(type_test) ...@@ -88,5 +292,50 @@ maria_declare_plugin(type_test)
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_EXPERIMENTAL // Maturity(see include/mysql/plugin.h)*/
},
{
MariaDB_FUNCTION_PLUGIN, // the plugin type
Item_func_strnxfrm::plugin_descriptor(),
"strnxfrm", // plugin name
"MariaDB Corporation", // plugin author
"Function STRNXFRM()", // the plugin description
PLUGIN_LICENSE_GPL, // the plugin license
0, // Pointer to plugin initialization function
0, // Pointer to plugin deinitialization function
0x0100, // Numeric version 0xAABB means AA.BB version
NULL, // Status variables
NULL, // System variables
"1.0", // String version representation
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL // Maturity
},
{
MariaDB_FUNCTION_PLUGIN, // the plugin type
Item_func_strnxfrm_source_length_used::plugin_descriptor(),
"strnxfrm_source_length_used",// plugin name
"MariaDB Corporation", // plugin author
"Function STRNXFRM_SOURCE_LENGTH_USED()", // the plugin description
PLUGIN_LICENSE_GPL, // the plugin license
0, // Pointer to plugin initialization function
0, // Pointer to plugin deinitialization function
0x0100, // Numeric version 0xAABB means AA.BB version
NULL, // Status variables
NULL, // System variables
"1.0", // String version representation
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL // Maturity
},
{
MariaDB_FUNCTION_PLUGIN, // the plugin type
Item_func_strnxfrm_warnings::plugin_descriptor(),
"strnxfrm_warnings",// plugin name
"MariaDB Corporation", // plugin author
"Function STRNXFRM_WARNINGS()", // the plugin description
PLUGIN_LICENSE_GPL, // the plugin license
0, // Pointer to plugin initialization function
0, // Pointer to plugin deinitialization function
0x0100, // Numeric version 0xAABB means AA.BB version
NULL, // Status variables
NULL, // System variables
"1.0", // String version representation
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL // Maturity
} }
maria_declare_plugin_end; maria_declare_plugin_end;
...@@ -7810,15 +7810,13 @@ int Field_string::cmp_prefix(const uchar *a_ptr, const uchar *b_ptr, ...@@ -7810,15 +7810,13 @@ int Field_string::cmp_prefix(const uchar *a_ptr, const uchar *b_ptr,
void Field_string::sort_string(uchar *to,uint length) void Field_string::sort_string(uchar *to,uint length)
{ {
#ifdef DBUG_ASSERT_EXISTS my_strnxfrm_ret_t rc=
size_t tmp=
#endif
field_charset()->strnxfrm(to, length, field_charset()->strnxfrm(to, length,
char_length() * field_charset()->strxfrm_multiply, char_length() * field_charset()->strxfrm_multiply,
ptr, field_length, ptr, field_length,
MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_WITH_SPACE |
MY_STRXFRM_PAD_TO_MAXLEN); MY_STRXFRM_PAD_TO_MAXLEN);
DBUG_ASSERT(tmp == length); DBUG_ASSERT(rc.m_result_length == length);
} }
...@@ -8266,15 +8264,13 @@ void Field_varstring::sort_string(uchar *to,uint length) ...@@ -8266,15 +8264,13 @@ void Field_varstring::sort_string(uchar *to,uint length)
length-= length_bytes; length-= length_bytes;
} }
#ifdef DBUG_ASSERT_EXISTS my_strnxfrm_ret_t rc=
size_t rc=
#endif
field_charset()->strnxfrm(to, length, field_charset()->strnxfrm(to, length,
char_length() * field_charset()->strxfrm_multiply, char_length() * field_charset()->strxfrm_multiply,
(const uchar *) buf.ptr(), buf.length(), (const uchar *) buf.ptr(), buf.length(),
MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_WITH_SPACE |
MY_STRXFRM_PAD_TO_MAXLEN); MY_STRXFRM_PAD_TO_MAXLEN);
DBUG_ASSERT(rc == length); DBUG_ASSERT(rc.m_result_length == length);
} }
...@@ -9156,14 +9152,12 @@ void Field_blob::sort_string(uchar *to,uint length) ...@@ -9156,14 +9152,12 @@ void Field_blob::sort_string(uchar *to,uint length)
store_bigendian(buf.length(), to + length, packlength); store_bigendian(buf.length(), to + length, packlength);
} }
#ifdef DBUG_ASSERT_EXISTS my_strnxfrm_ret_t rc=
size_t rc=
#endif
field_charset()->strnxfrm(to, length, length, field_charset()->strnxfrm(to, length, length,
(const uchar *) buf.ptr(), buf.length(), (const uchar *) buf.ptr(), buf.length(),
MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_WITH_SPACE |
MY_STRXFRM_PAD_TO_MAXLEN); MY_STRXFRM_PAD_TO_MAXLEN);
DBUG_ASSERT(rc == length); DBUG_ASSERT(rc.m_result_length == length);
} }
} }
......
This diff is collapsed.
...@@ -4208,7 +4208,7 @@ String *Item_func_weight_string::val_str(String *str) ...@@ -4208,7 +4208,7 @@ String *Item_func_weight_string::val_str(String *str)
frm_length= cs->strnxfrm((char*) str->ptr(), tmp_length, frm_length= cs->strnxfrm((char*) str->ptr(), tmp_length,
nweights ? nweights : (uint) tmp_length, nweights ? nweights : (uint) tmp_length,
res->ptr(), res->length(), res->ptr(), res->length(),
weigth_flags); weigth_flags).m_result_length;
DBUG_ASSERT(frm_length <= tmp_length); DBUG_ASSERT(frm_length <= tmp_length);
str->set_charset(&my_charset_bin); str->set_charset(&my_charset_bin);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment