Commit b73cba22 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Manual merge from mysql-next-mr.

Conflicts:
  - sql/item.cc
parents 41110ca1 06ca4ae3
......@@ -22,15 +22,15 @@ IF(NOT DEFAULT_COLLATIONS)
SET(DEFAULT_COLLATION "latin1_swedish_ci")
ENDIF()
SET(CHARSETS ${DEFAULT_CHARSET} latin1 utf8 utf8mb3)
SET(CHARSETS_COMPLEX big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8 utf8mb3 utf16 utf32)
SET(CHARSETS ${DEFAULT_CHARSET} latin1 utf8 utf8mb4)
SET(CHARSETS_COMPLEX big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8 utf8mb4 utf16 utf32)
SET(CHARSETS_AVAILABLE
binary armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257
cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8
greek hebrew hp8 keybcs2 koi8r koi8u
latin1 latin2 latin5 latin7 macce macroman
sjis swe7 tis620 ucs2 ujis utf8 utf8mb3 utf16 utf32)
sjis swe7 tis620 ucs2 ujis utf8 utf8mb4 utf16 utf32)
SET (EXTRA_CHARSETS "all")
......
......@@ -13,11 +13,11 @@ define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8)
define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8)
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32)
DEFAULT_CHARSET=latin1
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
CHARSETS_COMPLEX="big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8"
CHARSETS_COMPLEX="big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32"
AC_DIVERT_POP
......@@ -50,7 +50,7 @@ AC_ARG_WITH(extra-charsets,
AC_MSG_CHECKING("character sets")
CHARSETS="$default_charset latin1 utf8"
CHARSETS="$default_charset latin1 utf8mb4 utf8"
if test "$extra_charsets" = no; then
CHARSETS="$CHARSETS"
......@@ -195,8 +195,23 @@ do
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf8mb4)
AC_DEFINE(HAVE_CHARSET_utf8mb4, 1, [Define to enable utf8mb4])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf8)
AC_DEFINE(HAVE_CHARSET_utf8, 1, [Define to enable ut8])
AC_DEFINE(HAVE_CHARSET_utf8, 1, [Define to enable utf8])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf16)
AC_DEFINE(HAVE_CHARSET_utf16, 1, [Define to enable utf16])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
utf32)
AC_DEFINE(HAVE_CHARSET_utf32, 1, [Define to enable utf32])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
......@@ -381,6 +396,48 @@ case $default_charset in
fi
default_charset_collations="$UTFC"
;;
utf8mb4)
default_charset_default_collation="utf8mb4_general_ci"
define(UTFC1, utf8mb4_general_ci utf8mb4_bin)
define(UTFC2, utf8mb4_czech_ci utf8mb4_danish_ci)
define(UTFC3, utf8mb4_esperanto_ci utf8mb4_estonian_ci utf8mb4_hungarian_ci)
define(UTFC4, utf8mb4_icelandic_ci utf8mb4_latvian_ci utf8mb4_lithuanian_ci)
define(UTFC5, utf8mb4_persian_ci utf8mb4_polish_ci utf8mb4_romanian_ci)
define(UTFC6, utf8mb4_sinhala_ci utf8mb4_slovak_ci utf8mb4_slovenian_ci)
define(UTFC7, utf8mb4_spanish2_ci utf8mb4_spanish_ci)
define(UTFC8, utf8mb4_swedish_ci utf8mb4_turkish_ci)
define(UTFC9, utf8mb4_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
utf16)
default_charset_default_collation="utf16_general_ci"
define(UTFC1, utf16_general_ci utf16_bin)
define(UTFC2, utf16_czech_ci utf16_danish_ci)
define(UTFC3, utf16_esperanto_ci utf16_estonian_ci utf16_hungarian_ci)
define(UTFC4, utf16_icelandic_ci utf16_latvian_ci utf16_lithuanian_ci)
define(UTFC5, utf16_persian_ci utf16_polish_ci utf16_romanian_ci)
define(UTFC6, utf16_sinhala_ci utf16_slovak_ci utf16_slovenian_ci)
define(UTFC7, utf16_spanish2_ci utf16_spanish_ci)
define(UTFC8, utf16_swedish_ci utf16_turkish_ci)
define(UTFC9, utf16_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
utf32)
default_charset_default_collation="utf32_general_ci"
define(UTFC1, utf32_general_ci utf32_bin)
define(UTFC2, utf32_czech_ci utf32_danish_ci)
define(UTFC3, utf32_esperanto_ci utf32_estonian_ci utf32_hungarian_ci)
define(UTFC4, utf32_icelandic_ci utf32_latvian_ci utf32_lithuanian_ci)
define(UTFC5, utf32_persian_ci utf32_polish_ci utf32_romanian_ci)
define(UTFC6, utf32_sinhala_ci utf32_slovak_ci utf32_slovenian_ci)
define(UTFC7, utf32_spanish2_ci utf32_spanish_ci)
define(UTFC8, utf32_swedish_ci utf32_turkish_ci)
define(UTFC9, utf32_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
default_charset_collations="$UTFC"
;;
*)
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.])
......
......@@ -432,6 +432,9 @@ inline ulonglong double2ulonglong(double d)
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8 1
#define HAVE_CHARSET_utf8mb4 1
#define HAVE_CHARSET_utf16 1
#define HAVE_CHARSET_utf32 1
#define HAVE_UCA_COLLATIONS 1
#define HAVE_BOOL 1
......
......@@ -98,13 +98,14 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
#define MY_CS_BINSORT 16 /* if binary sort order */
#define MY_CS_PRIMARY 32 /* if primary collation */
#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_UNICODE 128 /* is a charset is BMP Unicode */
#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
#define MY_CHARSET_UNDEFINED 0
/* Character repertoire flags */
......@@ -112,7 +113,6 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
typedef struct my_uni_idx_st
{
uint16 from;
......@@ -304,10 +304,14 @@ typedef struct charset_info_st
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
extern CHARSET_INFO my_charset_big5_chinese_ci;
extern CHARSET_INFO my_charset_big5_bin;
extern CHARSET_INFO my_charset_cp932_japanese_ci;
extern CHARSET_INFO my_charset_cp932_bin;
extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
extern CHARSET_INFO my_charset_eucjpms_bin;
extern CHARSET_INFO my_charset_euckr_korean_ci;
......@@ -316,7 +320,6 @@ extern CHARSET_INFO my_charset_gb2312_chinese_ci;
extern CHARSET_INFO my_charset_gb2312_bin;
extern CHARSET_INFO my_charset_gbk_chinese_ci;
extern CHARSET_INFO my_charset_gbk_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
extern CHARSET_INFO my_charset_latin1_german2_ci;
extern CHARSET_INFO my_charset_latin1_bin;
extern CHARSET_INFO my_charset_latin2_czech_ci;
......@@ -329,11 +332,22 @@ extern CHARSET_INFO my_charset_ucs2_bin;
extern CHARSET_INFO my_charset_ucs2_unicode_ci;
extern CHARSET_INFO my_charset_ujis_japanese_ci;
extern CHARSET_INFO my_charset_ujis_bin;
extern CHARSET_INFO my_charset_utf16_bin;
extern CHARSET_INFO my_charset_utf16_general_ci;
extern CHARSET_INFO my_charset_utf16_unicode_ci;
extern CHARSET_INFO my_charset_utf32_bin;
extern CHARSET_INFO my_charset_utf32_general_ci;
extern CHARSET_INFO my_charset_utf32_unicode_ci;
extern CHARSET_INFO my_charset_utf8_general_ci;
extern CHARSET_INFO my_charset_utf8_unicode_ci;
extern CHARSET_INFO my_charset_utf8_bin;
extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
extern CHARSET_INFO my_charset_utf8mb4_bin;
extern CHARSET_INFO my_charset_utf8mb4_general_ci;
extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
#define MY_UTF8MB3 "utf8"
#define MY_UTF8MB4 "utf8mb4"
/* declarations for simple charsets */
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
......@@ -430,6 +444,19 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length);
my_bool my_like_range_utf16(CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length);
my_bool my_like_range_utf32(CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length);
int my_wildcmp_8bit(CHARSET_INFO *,
const char *str,const char *str_end,
......@@ -480,6 +507,31 @@ uint my_instr_mb(struct charset_info_st *,
const char *s, size_t s_length,
my_match_t *match, uint nmatch);
int my_strnncoll_mb_bin(CHARSET_INFO * cs,
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix);
int my_strnncollsp_mb_bin(CHARSET_INFO *cs,
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool diff_if_only_endspace_difference);
int my_wildcmp_mb_bin(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many);
int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
const char *s, const char *t);
void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2);
size_t my_strnxfrm_unicode(CHARSET_INFO *,
uchar *dst, size_t dstlen,
const uchar *src, size_t srclen);
int my_wildcmp_unicode(CHARSET_INFO *cs,
const char *str, const char *str_end,
const char *wildstr, const char *wildend,
......
......@@ -937,10 +937,10 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
strlen(server_field.org_table_name), cs, thd_cs);
client_field->org_name= dup_str_aux(field_alloc, server_field.org_col_name,
strlen(server_field.org_col_name), cs, thd_cs);
if (item->collation.collation == &my_charset_bin || thd_cs == NULL)
if (item->charset_for_protocol() == &my_charset_bin || thd_cs == NULL)
{
/* No conversion */
client_field->charsetnr= server_field.charsetnr;
client_field->charsetnr= item->charset_for_protocol()->number;
client_field->length= server_field.length;
}
else
......
#
# Bug#32390 Character sets: casting utf32 to/from date doesn't work
#
CREATE TABLE t1 AS SELECT repeat('a',20) AS s1 LIMIT 0;
SET timestamp=1216359724;
INSERT INTO t1 VALUES (current_date);
INSERT INTO t1 VALUES (current_time);
INSERT INTO t1 VALUES (current_timestamp);
SELECT s1, hex(s1) FROM t1;
DROP TABLE t1;
SET timestamp=0;
select @@collation_connection;
#
# Create a table with a nullable varchar(10) column
# using currect character_set_connection.
create table t1 as select repeat(' ',10) as a union select null;
alter table t1 add key(a);
show create table t1;
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain select * from t1 where a like 'abc%';
explain select * from t1 where a like concat('abc','%');
select * from t1 where a like "abc%";
select * from t1 where a like concat("abc","%");
select * from t1 where a like "ABC%";
select * from t1 where a like "test%";
select * from t1 where a like "te_t";
select * from t1 where a like "%a%";
select * from t1 where a like "%abcd%";
select * from t1 where a like "%abc\d%";
drop table t1;
#
# Bug #2619 ucs2 LIKE comparison fails in some cases
#
select 'AA' like 'AA';
select 'AA' like 'A%A';
select 'AA' like 'A%%A';
select 'AA' like 'AA%';
select 'AA' like '%AA%';
select 'AA' like '%A';
select 'AA' like '%AA';
select 'AA' like 'A%A%';
select 'AA' like '_%_%';
select 'AA' like '%A%A';
select 'AAA'like 'A%A%A';
select 'AZ' like 'AZ';
select 'AZ' like 'A%Z';
select 'AZ' like 'A%%Z';
select 'AZ' like 'AZ%';
select 'AZ' like '%AZ%';
select 'AZ' like '%Z';
select 'AZ' like '%AZ';
select 'AZ' like 'A%Z%';
select 'AZ' like '_%_%';
select 'AZ' like '%A%Z';
select 'AZ' like 'A_';
select 'AZ' like '_Z';
select 'AMZ'like 'A%M%Z';
This diff is collapsed.
-- require r/have_utf16.require
disable_query_log;
show collation like 'utf16_general_ci';
enable_query_log;
-- require r/have_utf32.require
disable_query_log;
show collation like 'utf32_general_ci';
enable_query_log;
--require r/have_utf8mb4.require
--disable_query_log
SHOW COLLATION LIKE 'utf8mb4_general_ci';
--enable_query_log
......@@ -101,16 +101,16 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c3` varbinary(1) NOT NULL DEFAULT '',
`c4` varbinary(1) NOT NULL DEFAULT '',
`c5` varbinary(4) NOT NULL DEFAULT '',
`c6` varbinary(4) NOT NULL DEFAULT '',
`c3` varchar(1) NOT NULL DEFAULT '',
`c4` varchar(1) NOT NULL DEFAULT '',
`c5` varchar(4) NOT NULL DEFAULT '',
`c6` varchar(4) NOT NULL DEFAULT '',
`c7` decimal(2,1) NOT NULL DEFAULT '0.0',
`c8` decimal(2,1) NOT NULL DEFAULT '0.0',
`c9` decimal(2,1) DEFAULT NULL,
`c10` double NOT NULL DEFAULT '0',
`c11` double NOT NULL DEFAULT '0',
`c12` varbinary(5) NOT NULL DEFAULT ''
`c12` varchar(5) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
......@@ -155,8 +155,8 @@ t1 CREATE TABLE `t1` (
`COALESCE(1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE('a')` varchar(1) NOT NULL DEFAULT '',
`COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '',
`COALESCE(1.1,'1')` varbinary(4) NOT NULL DEFAULT '',
`COALESCE(1,'1')` varchar(1) NOT NULL DEFAULT '',
`COALESCE(1.1,'1')` varchar(4) NOT NULL DEFAULT '',
`COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
......
......@@ -438,7 +438,7 @@ explain t2;
Field Type Null Key Default Extra
a int(11) YES NULL
b bigint(11) NO 0
c bigint(11) unsigned NO 0
c bigint(10) unsigned NO 0
d date YES NULL
e varchar(1) NO
f datetime YES NULL
......@@ -457,7 +457,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`ifnull(a,a)` tinyint(4) DEFAULT NULL,
`ifnull(b,b)` smallint(6) DEFAULT NULL,
`ifnull(c,c)` mediumint(8) DEFAULT NULL,
`ifnull(c,c)` mediumint(9) DEFAULT NULL,
`ifnull(d,d)` int(11) DEFAULT NULL,
`ifnull(e,e)` bigint(20) DEFAULT NULL,
`ifnull(f,f)` float(3,2) DEFAULT NULL,
......
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.
......@@ -1899,6 +1899,20 @@ CONVERT(a, CHAR) CONVERT(b, CHAR)
DROP TABLE t1;
End of 5.0 tests
Start of 5.4 tests
SET NAMES utf8mb3;
SHOW VARIABLES LIKE 'character_set_results%';
Variable_name Value
character_set_results utf8
CREATE TABLE t1 (a CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT _utf8mb3'test';
test
test
CREATE TABLE t1 (
clipid INT NOT NULL,
Tape TINYTEXT,
......
This diff is collapsed.
......@@ -625,7 +625,7 @@ insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
select f2,group_concat(f1) from t1 group by f2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 f2 f2 253 255 255 Y 0 0 8
def group_concat(f1) 253 400 1 Y 128 0 63
def group_concat(f1) 253 400 1 Y 0 0 8
f2 group_concat(f1)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2
......@@ -737,7 +737,7 @@ insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
select f2,group_concat(f1) from t1 group by f2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 f2 f2 253 255 255 Y 0 0 8
def group_concat(f1) 252 1024 1 Y 128 0 63
def group_concat(f1) 252 1024 1 Y 0 0 8
f2 group_concat(f1)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2
......
......@@ -761,7 +761,7 @@ latin2 latin2_general_ci 2
drop table t1;
select charset(null), collation(null), coercibility(null);
charset(null) collation(null) coercibility(null)
binary binary 5
binary binary 6
CREATE TABLE t1 (a int, b int);
CREATE TABLE t2 (a int, b int);
INSERT INTO t1 VALUES (1,1),(2,2);
......@@ -777,7 +777,7 @@ a b a b
1 1 NULL NULL
2 2 2 2
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
where coercibility(t2.a) = 2 order by t1.a,t2.a;
where coercibility(t2.a) = 5 order by t1.a,t2.a;
a b a b
1 1 NULL NULL
2 2 2 2
......@@ -1230,13 +1230,13 @@ create table t1 (i int);
insert into t1 values (1000000000),(1);
select lpad(i, 7, ' ') as t from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def t 253 7 7 Y 128 31 63
def t 253 7 7 Y 0 31 8
t
1000000
1
select rpad(i, 7, ' ') as t from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def t 253 7 7 Y 128 31 63
def t 253 7 7 Y 0 31 8
t
1000000
1
......
Collation Charset Id Default Compiled Sortlen
utf16_general_ci utf16 54 Yes Yes 1
Collation Charset Id Default Compiled Sortlen
utf32_general_ci utf32 60 Yes Yes 1
Collation Charset Id Default Compiled Sortlen
utf8mb4_general_ci utf8mb4 45 Yes Yes 1
......@@ -126,7 +126,7 @@ renamed
1
select * from v3 where renamed=1 group by renamed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
def v3 v3 renamed renamed 8 11 0 Y 32896 0 63
renamed
drop table t1;
drop view v1,v2,v3;
......
......@@ -1788,11 +1788,11 @@ t5 CREATE TABLE `t5` (
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date DEFAULT NULL,
`param07` longblob,
`param07` longtext,
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`param09` longtext,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
......@@ -1818,11 +1818,11 @@ def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 1 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
def test t5 t5 const07 const07 10 10 10 Y 128 0 63
def test t5 t5 param07 param07 252 4294967295 10 Y 144 0 63
def test t5 t5 param07 param07 252 4294967295 10 Y 16 0 8
def test t5 t5 const08 const08 253 19 19 N 1 0 8
def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8
def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 144 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 3 10 9 N 32769 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
......@@ -1929,10 +1929,10 @@ def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
def @arg11 246 83 6 Y 32896 30 63
def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 8 Y 128 31 63
def @arg13 251 16777216 10 Y 0 31 8
def @arg14 251 16777216 19 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
......@@ -1976,10 +1976,10 @@ def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
def @arg11 246 83 0 Y 32896 30 63
def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 0 Y 128 31 63
def @arg13 251 16777216 0 Y 0 31 8
def @arg14 251 16777216 0 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
......@@ -2026,10 +2026,10 @@ def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
def @arg11 246 83 6 Y 32896 30 63
def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 8 Y 128 31 63
def @arg13 251 16777216 10 Y 0 31 8
def @arg14 251 16777216 19 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
......@@ -2066,10 +2066,10 @@ def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
def @arg11 246 83 0 Y 32896 30 63
def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 0 Y 128 31 63
def @arg13 251 16777216 0 Y 0 31 8
def @arg14 251 16777216 0 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
......@@ -2114,10 +2114,10 @@ def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
def @arg11 246 83 6 Y 32896 30 63
def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 8 Y 128 31 63
def @arg13 251 16777216 10 Y 0 31 8
def @arg14 251 16777216 19 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
......@@ -2158,10 +2158,10 @@ def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
def @arg11 246 83 0 Y 32896 30 63
def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 0 Y 128 31 63
def @arg13 251 16777216 0 Y 0 31 8
def @arg14 251 16777216 0 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
......@@ -2204,10 +2204,10 @@ def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
def @arg11 246 83 6 Y 32896 30 63
def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 8 Y 128 31 63
def @arg13 251 16777216 10 Y 0 31 8
def @arg14 251 16777216 19 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 8 Y 0 31 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
......@@ -2242,10 +2242,10 @@ def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
def @arg11 246 83 0 Y 32896 30 63
def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
def @arg16 251 16777216 0 Y 128 31 63
def @arg13 251 16777216 0 Y 0 31 8
def @arg14 251 16777216 0 Y 0 31 8
def @arg15 251 16777216 19 Y 0 31 8
def @arg16 251 16777216 0 Y 0 31 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -449,11 +449,11 @@ f4 datetime YES NULL
create table t5 as select coalesce(f1,f3) as f4 from t1;
desc t5;
Field Type Null Key Default Extra
f4 varbinary(20) YES NULL
f4 varchar(20) YES NULL
create table t6 as select coalesce(f2,f3) as f4 from t1;
desc t6;
Field Type Null Key Default Extra
f4 varbinary(20) YES NULL
f4 varchar(20) YES NULL
create table t7 as select coalesce(makedate(1997,1),f2) as f4 from t1;
desc t7;
Field Type Null Key Default Extra
......
......@@ -271,7 +271,7 @@ drop table t2;
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
show full columns from t2;
Field Type Collation Null Key Default Extra Privileges Comment
auto bigint(12) unsigned NULL NO PRI 0 #
auto int(6) unsigned NULL NO PRI 0 #
t1 int(1) NULL NO 0 #
t2 varchar(1) latin1_swedish_ci NO #
t3 varchar(256) latin1_swedish_ci NO #
......
......@@ -554,7 +554,7 @@ aa
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varbinary(2) NOT NULL DEFAULT ''
`a` varchar(2) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT 12 as a UNION select 12.2 as a;
......@@ -655,7 +655,7 @@ f
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f` varbinary(12) DEFAULT NULL
`f` varchar(12) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT y from t2 UNION select da from t2;
......@@ -666,7 +666,7 @@ y
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`y` varbinary(10) DEFAULT NULL
`y` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT y from t2 UNION select dt from t2;
......@@ -677,7 +677,7 @@ y
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`y` varbinary(19) DEFAULT NULL
`y` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT da from t2 UNION select dt from t2;
......@@ -699,7 +699,7 @@ testc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`dt` varbinary(19) DEFAULT NULL
`dt` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT dt from t2 UNION select sv from t2;
......@@ -710,7 +710,7 @@ testv
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`dt` varbinary(19) DEFAULT NULL
`dt` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT sc from t2 UNION select sv from t2;
......
......@@ -33,6 +33,36 @@
</collation>
</charset>
<charset name="utf8mb4">
<collation name="utf8mb4_test_ci" id="326">
<rules>
<reset>a</reset>
<s>b</s>
</rules>
</collation>
</charset>
<charset name="utf16">
<collation name="utf16_test_ci" id="327">
<rules>
<reset>a</reset>
<s>b</s>
</rules>
</collation>
</charset>
<charset name="utf32">
<collation name="utf32_test_ci" id="391">
<rules>
<reset>a</reset>
<s>b</s>
</rules>
</collation>
</charset>
<charset name="ucs2">
<collation name="ucs2_test_ci" id="358">
<rules>
......
This diff is collapsed.
......@@ -3,6 +3,10 @@ source include/not_embedded.inc;
source include/have_innodb.inc;
source include/master-slave.inc;
# -- [DISABLED Bug#49557]
# This test case fails on Windows due to Bug#49557.
source include/not_windows.inc;
let $engine_type= InnoDB;
#let $engine_type= MyISAM;
......
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.
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