Commit 2c6d6200 authored by Igor Babaev's avatar Igor Babaev

Merge branch '10.2' into bb-10.2-mdev9864

parents 2f83cc63 2d36e5aa
...@@ -362,6 +362,8 @@ struct my_collation_handler_st ...@@ -362,6 +362,8 @@ struct my_collation_handler_st
extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
/* Some typedef to make it easy for C++ to make function pointers */ /* Some typedef to make it easy for C++ to make function pointers */
...@@ -585,49 +587,81 @@ struct charset_info_st ...@@ -585,49 +587,81 @@ struct charset_info_st
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin; extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1; extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_nopad;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename; extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_ci; extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_ci;
extern struct charset_info_st my_charset_big5_bin; extern struct charset_info_st my_charset_big5_bin;
extern struct charset_info_st my_charset_big5_chinese_ci; extern struct charset_info_st my_charset_big5_chinese_ci;
extern struct charset_info_st my_charset_big5_nopad_bin;
extern struct charset_info_st my_charset_big5_chinese_nopad_ci;
extern struct charset_info_st my_charset_cp1250_czech_ci; extern struct charset_info_st my_charset_cp1250_czech_ci;
extern struct charset_info_st my_charset_cp932_bin; extern struct charset_info_st my_charset_cp932_bin;
extern struct charset_info_st my_charset_cp932_japanese_ci; extern struct charset_info_st my_charset_cp932_japanese_ci;
extern struct charset_info_st my_charset_cp932_nopad_bin;
extern struct charset_info_st my_charset_cp932_japanese_nopad_ci;
extern struct charset_info_st my_charset_eucjpms_bin; extern struct charset_info_st my_charset_eucjpms_bin;
extern struct charset_info_st my_charset_eucjpms_japanese_ci; extern struct charset_info_st my_charset_eucjpms_japanese_ci;
extern struct charset_info_st my_charset_eucjpms_nopad_bin;
extern struct charset_info_st my_charset_eucjpms_japanese_nopad_ci;
extern struct charset_info_st my_charset_euckr_bin; extern struct charset_info_st my_charset_euckr_bin;
extern struct charset_info_st my_charset_euckr_korean_ci; extern struct charset_info_st my_charset_euckr_korean_ci;
extern struct charset_info_st my_charset_euckr_nopad_bin;
extern struct charset_info_st my_charset_euckr_korean_nopad_ci;
extern struct charset_info_st my_charset_gb2312_bin; extern struct charset_info_st my_charset_gb2312_bin;
extern struct charset_info_st my_charset_gb2312_chinese_ci; extern struct charset_info_st my_charset_gb2312_chinese_ci;
extern struct charset_info_st my_charset_gb2312_nopad_bin;
extern struct charset_info_st my_charset_gb2312_chinese_nopad_ci;
extern struct charset_info_st my_charset_gbk_bin; extern struct charset_info_st my_charset_gbk_bin;
extern struct charset_info_st my_charset_gbk_chinese_ci; extern struct charset_info_st my_charset_gbk_chinese_ci;
extern struct charset_info_st my_charset_gbk_nopad_bin;
extern struct charset_info_st my_charset_gbk_chinese_nopad_ci;
extern struct charset_info_st my_charset_latin1_bin; extern struct charset_info_st my_charset_latin1_bin;
extern struct charset_info_st my_charset_latin1_nopad_bin;
extern struct charset_info_st my_charset_latin1_german2_ci; extern struct charset_info_st my_charset_latin1_german2_ci;
extern struct charset_info_st my_charset_latin2_czech_ci; extern struct charset_info_st my_charset_latin2_czech_ci;
extern struct charset_info_st my_charset_sjis_bin; extern struct charset_info_st my_charset_sjis_bin;
extern struct charset_info_st my_charset_sjis_japanese_ci; extern struct charset_info_st my_charset_sjis_japanese_ci;
extern struct charset_info_st my_charset_sjis_nopad_bin;
extern struct charset_info_st my_charset_sjis_japanese_nopad_ci;
extern struct charset_info_st my_charset_tis620_bin; extern struct charset_info_st my_charset_tis620_bin;
extern struct charset_info_st my_charset_tis620_thai_ci; extern struct charset_info_st my_charset_tis620_thai_ci;
extern struct charset_info_st my_charset_tis620_nopad_bin;
extern struct charset_info_st my_charset_tis620_thai_nopad_ci;
extern struct charset_info_st my_charset_ucs2_bin; extern struct charset_info_st my_charset_ucs2_bin;
extern struct charset_info_st my_charset_ucs2_general_ci; extern struct charset_info_st my_charset_ucs2_general_ci;
extern struct charset_info_st my_charset_ucs2_nopad_bin;
extern struct charset_info_st my_charset_ucs2_general_nopad_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci; extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ucs2_unicode_ci; extern struct charset_info_st my_charset_ucs2_unicode_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci; extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ujis_bin; extern struct charset_info_st my_charset_ujis_bin;
extern struct charset_info_st my_charset_ujis_japanese_ci; extern struct charset_info_st my_charset_ujis_japanese_ci;
extern struct charset_info_st my_charset_ujis_nopad_bin;
extern struct charset_info_st my_charset_ujis_japanese_nopad_ci;
extern struct charset_info_st my_charset_utf16_bin; extern struct charset_info_st my_charset_utf16_bin;
extern struct charset_info_st my_charset_utf16_general_ci; extern struct charset_info_st my_charset_utf16_general_ci;
extern struct charset_info_st my_charset_utf16_unicode_ci; extern struct charset_info_st my_charset_utf16_unicode_ci;
extern struct charset_info_st my_charset_utf16le_bin; extern struct charset_info_st my_charset_utf16le_bin;
extern struct charset_info_st my_charset_utf16le_general_ci; extern struct charset_info_st my_charset_utf16le_general_ci;
extern struct charset_info_st my_charset_utf16_general_nopad_ci;
extern struct charset_info_st my_charset_utf16_nopad_bin;
extern struct charset_info_st my_charset_utf16le_nopad_bin;
extern struct charset_info_st my_charset_utf16le_general_nopad_ci;
extern struct charset_info_st my_charset_utf32_bin; extern struct charset_info_st my_charset_utf32_bin;
extern struct charset_info_st my_charset_utf32_general_ci; extern struct charset_info_st my_charset_utf32_general_ci;
extern struct charset_info_st my_charset_utf32_unicode_ci; extern struct charset_info_st my_charset_utf32_unicode_ci;
extern struct charset_info_st my_charset_utf32_nopad_bin;
extern struct charset_info_st my_charset_utf32_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_bin; extern struct charset_info_st my_charset_utf8_bin;
extern struct charset_info_st my_charset_utf8_nopad_bin;
extern struct charset_info_st my_charset_utf8_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_general_mysql500_ci; extern struct charset_info_st my_charset_utf8_general_mysql500_ci;
extern struct charset_info_st my_charset_utf8_unicode_ci; extern struct charset_info_st my_charset_utf8_unicode_ci;
extern struct charset_info_st my_charset_utf8mb4_bin; extern struct charset_info_st my_charset_utf8mb4_bin;
extern struct charset_info_st my_charset_utf8mb4_general_ci; extern struct charset_info_st my_charset_utf8mb4_general_ci;
extern struct charset_info_st my_charset_utf8mb4_nopad_bin;
extern struct charset_info_st my_charset_utf8mb4_general_nopad_ci;
extern struct charset_info_st my_charset_utf8mb4_unicode_ci; extern struct charset_info_st my_charset_utf8mb4_unicode_ci;
#define MY_UTF8MB3 "utf8" #define MY_UTF8MB3 "utf8"
...@@ -653,6 +687,11 @@ extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t, ...@@ -653,6 +687,11 @@ extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
extern void my_hash_sort_simple(CHARSET_INFO *cs, extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len, const uchar *key, size_t len,
ulong *nr1, ulong *nr2); ulong *nr1, ulong *nr2);
extern void my_hash_sort_simple_nopad(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2);
extern void my_hash_sort_bin(CHARSET_INFO *cs, extern void my_hash_sort_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1, const uchar *key, size_t len, ulong *nr1,
ulong *nr2); ulong *nr2);
...@@ -824,18 +863,38 @@ int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), ...@@ -824,18 +863,38 @@ int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)), void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2); const uchar *key, size_t len,ulong *nr1, ulong *nr2);
void my_hash_sort_mb_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2);
size_t my_strnxfrm_mb(CHARSET_INFO *, size_t my_strnxfrm_mb(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 my_strnxfrm_mb_nopad(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrm_unicode(CHARSET_INFO *, size_t my_strnxfrm_unicode(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 my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *, size_t my_strnxfrm_unicode_nopad(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 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); size_t my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *, size_t);
int my_wildcmp_unicode(CHARSET_INFO *cs, int my_wildcmp_unicode(CHARSET_INFO *cs,
...@@ -873,6 +932,10 @@ void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, ...@@ -873,6 +932,10 @@ void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend, uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level); 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);
......
...@@ -137,6 +137,7 @@ typedef unsigned long long my_ulonglong; ...@@ -137,6 +137,7 @@ typedef unsigned long long my_ulonglong;
/* backward compatibility define - to be removed eventually */ /* backward compatibility define - to be removed eventually */
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
#define WARN_PLUGIN_DELETE_BUILTIN ER_PLUGIN_DELETE_BUILTIN #define WARN_PLUGIN_DELETE_BUILTIN ER_PLUGIN_DELETE_BUILTIN
#define ER_FK_DUP_NAME ER_DUP_CONSTRAINT_NAME
typedef struct st_mysql_rows { typedef struct st_mysql_rows {
struct st_mysql_rows *next; /* list of rows */ struct st_mysql_rows *next; /* list of rows */
......
--echo #
--echo # Start of ctype_pad.inc
--echo #
--echo #
--echo # Unique indexes
--echo #
eval CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE $coll;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
SELECT HEX(a), a FROM t1 ORDER BY a;
SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
--echo #
--echo # UNION
--echo #
eval CREATE TABLE t2 (a VARCHAR(10)) COLLATE $coll;
INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
DROP TABLE t1;
DROP TABLE t2;
--echo #
--echo # DISTINCT, COUNT, MAX
--echo #
eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll;
INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
SELECT HEX(MAX(a)), MAX(a) FROM t1;
--echo #
--echo # GROUP BY
--echo #
eval CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE $coll;
INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
DROP TABLE t2;
--echo #
--echo # Weights
--echo #
SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
DROP TABLE t1;
--echo #
--echo # IF, CASE, LEAST
--echo #
eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad');
eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END;
eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc '));
eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc '));
--echo #
--echo # Collation mix
--echo #
eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll_pad;
INSERT INTO t1 VALUES ('a'),('a ');
SELECT COUNT(*) FROM t1 WHERE a='a';
eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad;
eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll;
eval ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE $coll;
SELECT COUNT(*) FROM t1 WHERE a='a';
eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad;
eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll;
DROP TABLE t1;
--echo #
--echo # End of ctype_pad.inc
--echo #
SET STORAGE_ENGINE=MyISAM;
--source include/ctype_pad.inc
SET STORAGE_ENGINE=HEAP;
--source include/ctype_pad.inc
SET STORAGE_ENGINE=Default;
...@@ -2057,3 +2057,26 @@ t1 CREATE TABLE `t1` ( ...@@ -2057,3 +2057,26 @@ t1 CREATE TABLE `t1` (
KEY `i1` (`a`) COMMENT 'comment2' KEY `i1` (`a`) COMMENT 'comment2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-10421 duplicate CHECK CONSTRAINTs
#
CREATE TABLE t1 (a INT, b INT) engine=myisam;
ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
ALTER TABLE t1 ADD CONSTRAINT `min` CHECK (a+b > 100);
ERROR HY000: Duplicate CHECK constraint name 'min'
ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
Warnings:
Note 1826 Duplicate CHECK constraint name 'min'
ALTER TABLE t1 ADD CONSTRAINT `mini` CHECK (a+b > 100);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
CONSTRAINT `min` CHECK (a+b > 100),
CONSTRAINT `mini` CHECK (a+b > 100)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(a INT, b INT, CONSTRAINT min check (a>5),
CONSTRAINT min check (b>5));
ERROR HY000: Duplicate CHECK constraint name 'min'
...@@ -1611,3 +1611,24 @@ EXPLAIN ...@@ -1611,3 +1611,24 @@ EXPLAIN
} }
} }
drop table t1; drop table t1;
#
# MDEV-10737: recursive union with several anchors at the end
#
WITH RECURSIVE cte(n) AS
( SELECT n+1 FROM cte WHERE n < 5 UNION SELECT 1 UNION SELECT 1 )
SELECT * FROM cte;
n
1
2
3
4
5
#
# MDEV-10736: recursive definition with anchor over a table with blob
#
CREATE TABLE t1 (f VARCHAR(1024));
WITH RECURSIVE cte(f) AS
(SELECT t1.f FROM t1 UNION ALL SELECT cte.f FROM cte)
SELECT * FROM cte;
f
DROP TABLE t1;
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -273,6 +273,8 @@ latin1_bin latin1 47 # 1 ...@@ -273,6 +273,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1 latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1 latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1 latin1_spanish_ci latin1 94 # 1
latin1_swedish_nopad_ci latin1 1032 # 1
latin1_nopad_bin latin1 1071 # 1
SHOW COLLATION LIKE 'latin1%'; SHOW COLLATION LIKE 'latin1%';
Collation Charset Id Default Compiled Sortlen Collation Charset Id Default Compiled Sortlen
latin1_german1_ci latin1 5 # 1 latin1_german1_ci latin1 5 # 1
...@@ -283,6 +285,8 @@ latin1_bin latin1 47 # 1 ...@@ -283,6 +285,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1 latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1 latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1 latin1_spanish_ci latin1 94 # 1
latin1_swedish_nopad_ci latin1 1032 # 1
latin1_nopad_bin latin1 1071 # 1
SHOW COLLATION WHERE collation like 'latin1%'; SHOW COLLATION WHERE collation like 'latin1%';
Collation Charset Id Default Compiled Sortlen Collation Charset Id Default Compiled Sortlen
latin1_german1_ci latin1 5 # 1 latin1_german1_ci latin1 5 # 1
...@@ -293,6 +297,8 @@ latin1_bin latin1 47 # 1 ...@@ -293,6 +297,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1 latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1 latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1 latin1_spanish_ci latin1 94 # 1
latin1_swedish_nopad_ci latin1 1032 # 1
latin1_nopad_bin latin1 1071 # 1
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
where COLLATION_NAME like 'latin1%'; where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
...@@ -304,6 +310,8 @@ latin1_bin latin1 ...@@ -304,6 +310,8 @@ latin1_bin latin1
latin1_general_ci latin1 latin1_general_ci latin1
latin1_general_cs latin1 latin1_general_cs latin1
latin1_spanish_ci latin1 latin1_spanish_ci latin1
latin1_swedish_nopad_ci latin1
latin1_nopad_bin latin1
drop procedure if exists sel2; drop procedure if exists sel2;
drop function if exists sub1; drop function if exists sub1;
drop function if exists sub2; drop function if exists sub2;
...@@ -440,6 +448,8 @@ latin1_bin ...@@ -440,6 +448,8 @@ latin1_bin
latin1_general_ci latin1_general_ci
latin1_general_cs latin1_general_cs
latin1_spanish_ci latin1_spanish_ci
latin1_swedish_nopad_ci
latin1_nopad_bin
show keys from v4; show keys from v4;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
select * from information_schema.views where TABLE_NAME like "v%"; select * from information_schema.views where TABLE_NAME like "v%";
......
This diff is collapsed.
...@@ -116,6 +116,12 @@ ...@@ -116,6 +116,12 @@
<collation name="ascii2_bin" flag="binary"/> <collation name="ascii2_bin" flag="binary"/>
<collation name="ascii2_general_inherited_ci">
<rules>
<import source="ascii2_general_ci"/>
</rules>
</collation>
</charset> </charset>
</charsets> </charsets>
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.
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.
...@@ -2079,6 +2079,9 @@ bool DTCollation::aggregate(const DTCollation &dt, uint flags) ...@@ -2079,6 +2079,9 @@ bool DTCollation::aggregate(const DTCollation &dt, uint flags)
set(0, DERIVATION_NONE, 0); set(0, DERIVATION_NONE, 0);
return 1; return 1;
} }
if (collation->state & MY_CS_BINSORT &&
dt.collation->state & MY_CS_BINSORT)
return 1;
if (collation->state & MY_CS_BINSORT) if (collation->state & MY_CS_BINSORT)
return 0; return 0;
if (dt.collation->state & MY_CS_BINSORT) if (dt.collation->state & MY_CS_BINSORT)
......
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.
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