summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-03-19 10:22:27 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2015-03-19 10:22:27 +0200
commit81113dae1747e2dd75ff95761d0853dd4387e814 (patch)
tree7e5dae3e9b94f0fa1203a6bfd56882c172e2cfa8
parent69ae50652784178f98a308b50ce8afc94f9ab301 (diff)
parent64a290dc316c405ccc9b9dfb7ab72ce770935cf1 (diff)
downloadmariadb-git-81113dae1747e2dd75ff95761d0853dd4387e814.tar.gz
Merge branch '10.1' into bb-10.1-jan
-rw-r--r--mysql-test/r/cast.result8
-rw-r--r--mysql-test/r/ctype_big5.result132
-rw-r--r--mysql-test/r/ctype_cp1251.result2
-rw-r--r--mysql-test/r/ctype_cp932_binlog_stm.result195
-rw-r--r--mysql-test/r/ctype_eucjpms.result199
-rw-r--r--mysql-test/r/ctype_euckr.result130
-rw-r--r--mysql-test/r/ctype_gb2312.result130
-rw-r--r--mysql-test/r/ctype_gbk.result145
-rw-r--r--mysql-test/r/ctype_sjis.result195
-rw-r--r--mysql-test/r/ctype_ujis.result199
-rw-r--r--mysql-test/r/ctype_utf8.result12
-rw-r--r--mysql-test/r/ctype_utf8mb4.result12
-rw-r--r--mysql-test/r/ctype_utf8mb4_heap.result12
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result12
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result12
-rw-r--r--mysql-test/r/gis-precise.result772
-rw-r--r--mysql-test/r/gis.result11
-rw-r--r--mysql-test/r/max_statement_time.result1
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result8
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result8
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug59641.result2
-rw-r--r--mysql-test/suite/innodb/t/innodb.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug59641.test1
-rw-r--r--mysql-test/suite/jp/r/jp_convert_ucs2.result24
-rw-r--r--mysql-test/suite/jp/r/jp_convert_ujis.result96
-rw-r--r--mysql-test/suite/jp/r/jp_convert_utf8.result114
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_basic.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result6
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_basic.test27
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error.test2
-rw-r--r--mysql-test/t/ctype_gbk.test7
-rw-r--r--mysql-test/t/gis.test1
-rw-r--r--scripts/CMakeLists.txt2
-rw-r--r--scripts/maria_add_gis_sp.sql6
-rw-r--r--scripts/maria_add_gis_sp_bootstrap.sql34
-rw-r--r--scripts/mysql_install_db.pl.in29
-rw-r--r--scripts/mysql_install_db.sh14
-rw-r--r--sql/item.cc39
-rw-r--r--sql/item.h15
-rw-r--r--sql/item_strfunc.cc15
-rw-r--r--sql/item_timefunc.cc166
-rw-r--r--sql/item_timefunc.h5
-rw-r--r--sql/log_event.cc8
-rw-r--r--sql/mysqld.cc5
-rw-r--r--sql/rpl_gtid.cc15
-rw-r--r--sql/share/errmsg-utf8.txt2
-rw-r--r--sql/slave.h1
-rw-r--r--sql/sql_class.h5
-rw-r--r--sql/sql_string.h12
-rw-r--r--storage/innobase/fil/fil0crypt.cc306
-rw-r--r--storage/xtradb/fil/fil0crypt.cc306
52 files changed, 3082 insertions, 430 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index 29f5f0cf2d5..7d89a476e21 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -454,8 +454,8 @@ cast(_koi8r'Æ' AS nchar(2)) as c5;
c1 c2 c3 c4 c5
фг ф фг ф ф
Warnings:
-Warning 1292 Truncated incorrect CHAR(4) value: 'фгх'
-Warning 1292 Truncated incorrect CHAR(3) value: 'Ñ„ '
+Warning 1292 Truncated incorrect CHAR(2) value: 'фгх'
+Warning 1292 Truncated incorrect CHAR(2) value: 'Ñ„ '
create table t1 select
cast(_koi8r'ÆÇ' AS nchar) as c1,
cast(_koi8r'Æ ' AS nchar) as c2,
@@ -463,8 +463,8 @@ cast(_koi8r'ÆÇÈ' AS nchar(2)) as c3,
cast(_koi8r'Æ ' AS nchar(2)) as c4,
cast(_koi8r'Æ' AS nchar(2)) as c5;
Warnings:
-Warning 1292 Truncated incorrect CHAR(4) value: 'фгх'
-Warning 1292 Truncated incorrect CHAR(3) value: 'Ñ„ '
+Warning 1292 Truncated incorrect CHAR(2) value: 'фгх'
+Warning 1292 Truncated incorrect CHAR(2) value: 'Ñ„ '
select * from t1;
c1 c2 c3 c4 c5
фг ф фг ф ф
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index d18c2a00c6f..a443c6134d1 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -487,6 +487,8 @@ drop table t1;
select hex(convert(_big5 0xC84041 using ucs2));
hex(convert(_big5 0xC84041 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'big5' character 0xC840 to 'ucs2'
End of 4.1 tests
set names big5;
create table t1 (a blob);
@@ -762,6 +764,71 @@ A2BF â…¦
A2C0 â…§
A2C1 â…¨
A2C2 â…©
+Warnings:
+Warning 1976 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DF to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -776,6 +843,71 @@ C7D8 п
C7D9 р
C7DA Ñ
C7DB Ñ‚
+Warnings:
+Warning 1976 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3C9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3CF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D1 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D3 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D5 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D7 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3D9 to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DB to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DD to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DF to 'utf8'
+Warning 1976 Cannot convert 'big5' character 0xA3DF to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 8741ca74178..385d7c34d6f 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -385,6 +385,8 @@ FC FC FC D18C FC
FD FD FD D18D FD
FE FE FE D18E FE
FF FF FF D18F FF
+Warnings:
+Warning 1976 Cannot convert 'cp1251' character 0x98 to 'utf8'
DROP TABLE t1;
set global LC_TIME_NAMES=convert((-8388608) using cp1251);
ERROR HY000: Unknown locale: '-8388608'
diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result
index fd920223091..b07db029588 100644
--- a/mysql-test/r/ctype_cp932_binlog_stm.result
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result
@@ -386,10 +386,140 @@ WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
81F0 â„«
+Warnings:
+Warning 1976 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EA to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
+Warnings:
+Warning 1976 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EA to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test cp932->Unicode conversion
@@ -10064,6 +10194,71 @@ FC48 E9B5AB
FC49 EFA8AD
FC4A E9B899
FC4B E9BB91
+Warnings:
+Warning 1976 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EB to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EC to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81ED to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EE to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81EF to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81F8 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81F9 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81FA to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x81FB to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8240 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8241 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8242 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8243 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8244 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8245 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8246 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8247 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8248 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8249 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x824A to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x824B to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x824C to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x824D to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x824E to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x8259 to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825A to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825B to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825C to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825D to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825E to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x825F to 'utf8'
+Warning 1976 Cannot convert 'cp932' character 0x827A to 'utf8'
DROP TABLE t1;
#
# WL#3090 Japanese Character Set adjustments
diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result
index 49d86c18a3d..131e7043e58 100644
--- a/mysql-test/r/ctype_eucjpms.result
+++ b/mysql-test/r/ctype_eucjpms.result
@@ -9992,9 +9992,13 @@ DROP TABLE t1;
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
hex(convert(_eucjpms 0xA5FE41 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2'
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2'
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
ERROR HY000: Unknown locale: 'c'
#
@@ -10554,12 +10558,142 @@ WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
8FAABC Ģ
+Warnings:
+Warning 1976 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
8FA9C3 ð
8FABB9 ǵ
+Warnings:
+Warning 1976 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -25645,6 +25779,71 @@ FEFB EE8EA8
FEFC EE8EA9
FEFD EE8EAA
FEFE EE8EAB
+Warnings:
+Warning 1976 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
DROP TABLE t1;
#
# WL#3090 Japanese Character Set adjustments
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 0ee63bb76b2..fec3c937ec4 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -24712,6 +24712,71 @@ WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
A1CA â„«
+Warnings:
+Warning 1976 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BD to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -24743,6 +24808,71 @@ A8E4 ⓧ
A8E5 ⓨ
A8E6 â“©
A9A2 Ä‘
+Warnings:
+Warning 1976 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5AF to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BB to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BD to 'utf8'
+Warning 1976 Cannot convert 'euckr' character 0xA5BD to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index ceecb7786b0..a91d0d7d73e 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -740,6 +740,71 @@ A2F9 â…¨
A2FA â…©
A2FB â…ª
A2FC â…«
+Warnings:
+Warning 1976 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -770,6 +835,71 @@ A8B7 Çš
A8B8 ǜ
A8B9 ü
A8BA ê
+Warnings:
+Warning 1976 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
+Warning 1976 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
index 55561cfa289..3defbf1e035 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -464,6 +464,8 @@ DROP TABLE t1;
select hex(convert(_gbk 0xA14041 using ucs2));
hex(convert(_gbk 0xA14041 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'gbk' character 0xA140 to 'ucs2'
create table t1 (c1 text not null, c2 text not null) character set gbk;
alter table t1 change c1 c1 mediumtext character set gbk not null;
show create table t1;
@@ -770,6 +772,71 @@ HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
A2FB â…ª
A2FC â…«
+Warnings:
+Warning 1976 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA141 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA141 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA143 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA143 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA145 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA145 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA147 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA147 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA149 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA149 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA151 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA151 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA153 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA153 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA155 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA155 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA157 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA157 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA159 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA159 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15F to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -802,6 +869,71 @@ A8B9 ü
A8BA ê
A8BD Å„
A8BE ň
+Warnings:
+Warning 1976 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA141 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA141 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA143 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA143 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA145 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA145 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA147 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA147 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA149 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA149 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA14F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA151 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA151 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA153 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA153 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA155 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA155 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA157 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA157 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA159 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA159 to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15B to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15D to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15F to 'utf8'
+Warning 1976 Cannot convert 'gbk' character 0xA15F to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
@@ -5755,5 +5887,18 @@ DROP TABLE t1;
# END OF MDEV-6566 Different INSERT behaviour on bad bytes with and without character set conversion
#
#
+# MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
+#
+SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
+HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312))
+3F41
+Warnings:
+Warning 1300 Invalid gb2312 character string: '\xA3A'
+SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8));
+HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8))
+3F41
+Warnings:
+Warning 1300 Invalid gb2312 character string: '\xA3A'
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result
index b4ef6f8c7e5..b2ba9b06b32 100644
--- a/mysql-test/r/ctype_sjis.result
+++ b/mysql-test/r/ctype_sjis.result
@@ -659,10 +659,140 @@ WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
81F0 â„«
+Warnings:
+Warning 1976 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EA to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
+Warnings:
+Warning 1976 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EA to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -7612,6 +7742,71 @@ EAA1 E98199
EAA2 E791A4
EAA3 E5879C
EAA4 E78699
+Warnings:
+Warning 1976 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81CF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D1 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D3 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D5 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D7 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81D9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EA to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EB to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EC to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81ED to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EE to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81EF to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81F8 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81F9 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81FA to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x81FB to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8240 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8241 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8242 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8243 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8244 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8245 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8246 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8247 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8248 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8249 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x824A to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x824B to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x824C to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x824D to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x824E to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x8259 to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825A to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825B to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825C to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825D to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825E to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x825F to 'utf8'
+Warning 1976 Cannot convert 'sjis' character 0x827A to 'utf8'
DROP TABLE t1;
#
# WL#3090 Japanese Character Set adjustments
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 4074d98c00d..4ad47cbc84a 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -2480,9 +2480,13 @@ DROP TABLE t1;
select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0xA5FE to 'ucs2'
select hex(convert(_ujis 0x8FABF841 using ucs2));
hex(convert(_ujis 0x8FABF841 using ucs2))
003F0041
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2'
DROP TABLE IF EXISTS t1, t2;
DROP PROCEDURE IF EXISTS sp1;
set names ujis;
@@ -3046,12 +3050,142 @@ WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
8FAABC Ģ
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EC to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
8FA9C3 ð
8FABB9 ǵ
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EC to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -17948,6 +18082,71 @@ FEFB EE8EA8
FEFC EE8EA9
FEFD EE8EAA
FEFE EE8EAB
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2DB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2ED to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EE to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2EF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2FA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2FB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2FC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA2FD to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AD to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AE to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3AF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BA to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BB to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BC to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BD to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BE to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3BF to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
+Warning 1976 Cannot convert 'ujis' character 0xA3DB to 'utf8'
DROP TABLE t1;
#
# WL#3090 Japanese Character Set adjustments
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 90f679bc0db..1056c246f33 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1919,9 +1919,9 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
-
+??
Warnings:
-Warning 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: '\xFF\x8F'
set sql_mode=traditional;
select char(0xff,0x8f using utf8);
char(0xff,0x8f using utf8)
@@ -1947,7 +1947,7 @@ select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
NULL
Warnings:
-Warning 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8));
hex(convert(char(2557 using latin1) using utf8))
09C3BD
@@ -2116,7 +2116,7 @@ select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
NULL
Warnings:
-Warning 1300 Invalid utf8 character string: 'FF'
+Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF);
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
@@ -2133,9 +2133,9 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
-
+3F
Warnings:
-Warning 1300 Invalid utf8 character string: 'FF'
+Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF);
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index ee91c93cd5b..3894d58bf23 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -1944,9 +1944,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-
+??
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
@@ -1972,7 +1972,7 @@ select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
hex(convert(char(2557 using latin1) using utf8mb4))
09C3BD
@@ -2141,7 +2141,7 @@ select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
@@ -2158,9 +2158,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-
+3F
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result
index 7f5125ae2ba..52030d62047 100644
--- a/mysql-test/r/ctype_utf8mb4_heap.result
+++ b/mysql-test/r/ctype_utf8mb4_heap.result
@@ -1776,9 +1776,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-
+??
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
@@ -1804,7 +1804,7 @@ select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
hex(convert(char(2557 using latin1) using utf8mb4))
09C3BD
@@ -1973,7 +1973,7 @@ select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
@@ -1990,9 +1990,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-
+3F
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index 053e6de8fe1..243c000b6c4 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -1904,9 +1904,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-
+??
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
@@ -1932,7 +1932,7 @@ select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
hex(convert(char(2557 using latin1) using utf8mb4))
09C3BD
@@ -2101,7 +2101,7 @@ select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
@@ -2118,9 +2118,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-
+3F
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index 5bfdfe8ca71..acdd6d36af7 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -1904,9 +1904,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-
+??
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
@@ -1932,7 +1932,7 @@ select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF8F'
+Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
hex(convert(char(2557 using latin1) using utf8mb4))
09C3BD
@@ -2101,7 +2101,7 @@ select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
NULL
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
@@ -2118,9 +2118,9 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-
+3F
Warnings:
-Warning 1300 Invalid utf8mb4 character string: 'FF'
+Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
ERROR HY000: Invalid utf8mb4 character string: 'FF'
select hex(_utf8mb4 X'616263FF');
diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result
new file mode 100644
index 00000000000..953459d10fc
--- /dev/null
+++ b/mysql-test/r/gis-precise.result
@@ -0,0 +1,772 @@
+DROP TABLE IF EXISTS t1;
+select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))'));
+1 ST_Intersects(GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))'))
+1 1
+select 0, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))'));
+0 ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))'))
+0 0
+select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POINT(10 10)'));
+1 ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POINT(10 10)'))
+1 1
+select 1, ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
+1 ST_Intersects(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'))
+1 1
+select 0, ST_Within(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
+0 ST_Within(GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'))
+0 0
+select 1, ST_Within(GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))'));
+1 ST_Within(GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))'))
+1 1
+create table t1 (g point);
+insert into t1 values
+(GeomFromText('POINT(2 2)')), (GeomFromText('POINT(2 4)')), (GeomFromText('POINT(2 6)')), (GeomFromText('POINT(2 8)')),
+(GeomFromText('POINT(4 2)')), (GeomFromText('POINT(4 4)')), (GeomFromText('POINT(4 6)')), (GeomFromText('POINT(4 8)')),
+(GeomFromText('POINT(6 2)')), (GeomFromText('POINT(6 4)')), (GeomFromText('POINT(6 6)')), (GeomFromText('POINT(6 8)')),
+(GeomFromText('POINT(8 2)')), (GeomFromText('POINT(8 4)')), (GeomFromText('POINT(8 6)')), (GeomFromText('POINT(8 8)'));
+select astext(g) from t1 where ST_Within(g, GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'));
+astext(g)
+POINT(4 4)
+POINT(6 2)
+POINT(6 4)
+POINT(6 6)
+select 'Contains';
+Contains
+Contains
+select astext(g) from t1 where ST_Contains(GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g);
+astext(g)
+POINT(4 4)
+POINT(6 2)
+POINT(6 4)
+POINT(6 6)
+select 'Intersects';
+Intersects
+Intersects
+select astext(g) from t1 where ST_Intersects(GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g);
+astext(g)
+POINT(4 4)
+POINT(6 2)
+POINT(6 4)
+POINT(6 6)
+select 'Contains';
+Contains
+Contains
+select astext(g) from t1 where ST_Contains(GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g);
+astext(g)
+POINT(4 4)
+POINT(6 2)
+POINT(6 4)
+POINT(6 6)
+select 'Contains2';
+Contains2
+Contains2
+select astext(g) from t1 where ST_Contains(GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g);
+astext(g)
+POINT(4 4)
+POINT(6 2)
+POINT(6 6)
+POINT(8 4)
+DROP TABLE t1;
+select 0, ST_Within(GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
+0 ST_Within(GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'))
+0 0
+select 1, ST_Within(GeomFromText('LINESTRING(15 15, 16 16)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'));
+1 ST_Within(GeomFromText('LINESTRING(15 15, 16 16)'), GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))'))
+1 1
+select 1, ST_Intersects(GeomFromText('LINESTRING(15 15, 50 50)'), GeomFromText('LINESTRING(50 15, 15 50)'));
+1 ST_Intersects(GeomFromText('LINESTRING(15 15, 50 50)'), GeomFromText('LINESTRING(50 15, 15 50)'))
+1 1
+select 0, ST_Intersects(GeomFromText('LINESTRING(15 15, 50 50)'), GeomFromText('LINESTRING(16 16, 51 51)'));
+0 ST_Intersects(GeomFromText('LINESTRING(15 15, 50 50)'), GeomFromText('LINESTRING(16 16, 51 51)'))
+0 1
+select 1, ST_Intersects(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'));
+1 ST_Intersects(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))
+1 1
+select astext(ST_Union(geometryfromtext('point(1 1)'), geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))')));
+astext(ST_Union(geometryfromtext('point(1 1)'), geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))')))
+POLYGON((0 0,1 2,2 0,0 0))
+select astext(ST_Intersection(geometryfromtext('point(1 1)'), geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))')));
+astext(ST_Intersection(geometryfromtext('point(1 1)'), geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))')))
+POINT(1 1)
+select ST_Intersects(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'));
+ST_Intersects(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))
+1
+select ST_contains(GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), GeomFromText('POINT(5 10)'));
+ST_contains(GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), GeomFromText('POINT(5 10)'))
+0
+select ST_Disjoint(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))'));
+ST_Disjoint(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))'))
+1
+select ST_Disjoint(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))'));
+ST_Disjoint(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))'))
+0
+select ST_Overlaps(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))'));
+ST_Overlaps(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))'))
+1
+select ST_Overlaps(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))'));
+ST_Overlaps(GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))'))
+0
+select ST_DISTANCE(geomfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'));
+ST_DISTANCE(geomfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'))
+0.7071067811865475
+select ST_DISTANCE(geomfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), geomfromtext('linestring(0 1, 1 0)'));
+ST_DISTANCE(geomfromtext('polygon((0 0, 1 2, 2 1, 0 0))'), geomfromtext('linestring(0 1, 1 0)'))
+0
+select ST_DISTANCE(geomfromtext('polygon((0 0, 3 6, 6 3, 0 0))'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'));
+ST_DISTANCE(geomfromtext('polygon((0 0, 3 6, 6 3, 0 0))'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'))
+0
+select ST_DISTANCE(geomfromtext('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), geomfromtext('point(3 3)'));
+ST_DISTANCE(geomfromtext('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), geomfromtext('point(3 3)'))
+0.4472135954999579
+select ST_DISTANCE(geomfromtext('linestring(0 0, 3 6, 6 3, 0 0)'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'));
+ST_DISTANCE(geomfromtext('linestring(0 0, 3 6, 6 3, 0 0)'), geomfromtext('polygon((2 2, 3 4, 4 3, 2 2))'))
+0.8944271909999159
+select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')));
+astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')))
+POLYGON((26.47058823529412 23.823529411764707,21.951219512195124 27.439024390243905,23.855421686746986 29.819277108433734,29.289940828402365 26.36094674556213,26.47058823529412 23.823529411764707))
+select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)')));
+astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)')))
+MULTIPOINT(26.47058823529412 23.823529411764707,29.289940828402365 26.36094674556213,21.951219512195124 27.439024390243905,23.855421686746986 29.819277108433734)
+select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45)')));
+astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45)')))
+POINT(29.289940828402365 26.36094674556213)
+select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POINT(20 20)')));
+astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POINT(20 20)')))
+POINT(20 20)
+select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200)')));
+astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200)')))
+LINESTRING(0 0,46.666666666666664 46.666666666666664)
+select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')));
+astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')))
+MULTILINESTRING((0 0,46.666666666666664 46.666666666666664),(8 10,45.33333333333333 47.33333333333333))
+select astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')));
+astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')))
+GEOMETRYCOLLECTION(LINESTRING(-10 -10,0 0),LINESTRING(-11 -9,8 10),POLYGON((0 0,40 50,50 45,0 0)),LINESTRING(46.666666666666664 46.666666666666664,200 200,199 201,45.33333333333333 47.33333333333333))
+select astext(ST_intersection(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))')));
+astext(ST_intersection(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))')))
+POLYGON((0 0,0 1,0.5 0.5,0 0))
+select astext(ST_symdifference(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))')));
+astext(ST_symdifference(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))')))
+MULTIPOLYGON(((0 0,0.5 0.5,1 0,0 0)),((0.5 0.5,0 1,0 2,1 1,0.5 0.5)))
+select astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')));
+astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)')))
+GEOMETRYCOLLECTION(LINESTRING(-10 -10,0 0),LINESTRING(-11 -9,8 10),POLYGON((0 0,40 50,50 45,0 0)),LINESTRING(46.666666666666664 46.666666666666664,200 200,199 201,45.33333333333333 47.33333333333333))
+select astext(ST_buffer(geometryfromtext('point(1 1)'), 1));
+astext(ST_buffer(geometryfromtext('point(1 1)'), 1))
+POLYGON((1 0,0.950932325672582 0.001204543794827595,0.9019828596704393 0.004815273327803182,0.8532695255446382 0.010823490035218986,0.8049096779838717 0.01921471959676957,0.7570198200967361 0.029968746805456026,0.7097153227455377 0.043059664267791065,0.6631101466077799 0.058455934816979194,0.6173165676349102 0.07612046748871326,0.5724449065697179 0.09601070687655666,0.5286032631740024 0.11807873565164506,0.48589725580677834 0.14227138999972788,0.4444297669803978 0.16853038769745476,0.40430069550756664 0.19679246851935517,0.3656067158363545 0.226989546637263,0.32844104515298167 0.2590488746450409,0.29289321881345254 0.29289321881345254,0.2590488746450409 0.32844104515298167,0.226989546637263 0.3656067158363545,0.19679246851935517 0.40430069550756664,0.16853038769745476 0.4444297669803978,0.14227138999972788 0.48589725580677834,0.11807873565164506 0.5286032631740024,0.09601070687655666 0.5724449065697179,0.07612046748871326 0.6173165676349102,0.058455934816979194 0.6631101466077799,0.043059664267791065 0.7097153227455377,0.029968746805456026 0.7570198200967361,0.01921471959676957 0.8049096779838717,0.010823490035218986 0.8532695255446382,0.004815273327803182 0.9019828596704393,0.001204543794827595 0.950932325672582,0 1,0.004815273327803182 1.0980171403295607,0.010823490035218986 1.146730474455362,0.01921471959676957 1.1950903220161284,0.029968746805456026 1.2429801799032638,0.043059664267791065 1.2902846772544623,0.058455934816979194 1.3368898533922202,0.07612046748871326 1.3826834323650898,0.09601070687655666 1.427555093430282,0.11807873565164506 1.4713967368259975,0.14227138999972788 1.5141027441932216,0.16853038769745476 1.5555702330196022,0.19679246851935517 1.5956993044924332,0.226989546637263 1.6343932841636455,0.2590488746450409 1.6715589548470184,0.29289321881345254 1.7071067811865475,0.32844104515298167 1.7409511253549592,0.3656067158363545 1.7730104533627369,0.40430069550756664 1.8032075314806448,0.4444297669803978 1.8314696123025453,0.48589725580677834 1.8577286100002721,0.5286032631740024 1.881921264348355,0.5724449065697179 1.9039892931234434,0.6173165676349102 1.9238795325112867,0.6631101466077799 1.9415440651830207,0.7097153227455377 1.956940335732209,0.7570198200967361 1.970031253194544,0.8049096779838717 1.9807852804032304,0.8532695255446382 1.9891765099647811,0.9019828596704393 1.9951847266721967,0.950932325672582 1.9987954562051724,1 2,1.049067674327418 1.9987954562051724,1.0980171403295607 1.9951847266721967,1.146730474455362 1.9891765099647811,1.1950903220161284 1.9807852804032304,1.2429801799032638 1.970031253194544,1.2902846772544623 1.956940335732209,1.3368898533922202 1.9415440651830207,1.3826834323650898 1.9238795325112867,1.427555093430282 1.9039892931234434,1.4713967368259975 1.881921264348355,1.5141027441932216 1.8577286100002721,1.5555702330196022 1.8314696123025453,1.5956993044924332 1.8032075314806448,1.6343932841636455 1.7730104533627369,1.6715589548470184 1.7409511253549592,1.7071067811865475 1.7071067811865475,1.7409511253549592 1.6715589548470184,1.7730104533627369 1.6343932841636455,1.8032075314806448 1.5956993044924332,1.8314696123025453 1.5555702330196022,1.8577286100002721 1.5141027441932216,1.881921264348355 1.4713967368259975,1.9039892931234434 1.427555093430282,1.9238795325112867 1.3826834323650898,1.9415440651830207 1.3368898533922202,1.956940335732209 1.2902846772544623,1.970031253194544 1.2429801799032638,1.9807852804032304 1.1950903220161284,1.9891765099647811 1.146730474455362,1.9951847266721967 1.0980171403295607,1.9987954562051724 1.049067674327418,2 1,1.9951847266721967 0.9019828596704393,1.9891765099647811 0.8532695255446382,1.9807852804032304 0.8049096779838717,1.970031253194544 0.7570198200967361,1.956940335732209 0.7097153227455377,1.9415440651830207 0.6631101466077799,1.9238795325112867 0.6173165676349102,1.9039892931234434 0.5724449065697179,1.881921264348355 0.5286032631740024,1.8577286100002721 0.48589725580677834,1.8314696123025453 0.4444297669803978,1.8032075314806448 0.40430069550756664,1.7730104533627369 0.3656067158363545,1.7409511253549592 0.32844104515298167,1.7071067811865475 0.29289321881345254,1.6715589548470184 0.2590488746450409,1.6343932841636455 0.226989546637263,1.5956993044924332 0.19679246851935517,1.5555702330196022 0.16853038769745476,1.5141027441932216 0.14227138999972788,1.4713967368259975 0.11807873565164506,1.427555093430282 0.09601070687655666,1.3826834323650898 0.07612046748871326,1.3368898533922202 0.058455934816979194,1.2902846772544623 0.043059664267791065,1.2429801799032638 0.029968746805456026,1.1950903220161284 0.01921471959676957,1.146730474455362 0.010823490035218986,1.0980171403295607 0.004815273327803182,1.049067674327418 0.001204543794827595,1 0))
+create table t1(geom geometrycollection);
+insert into t1 values (geomfromtext('POLYGON((0 0, 10 10, 0 8, 0 0))'));
+insert into t1 values (geomfromtext('POLYGON((1 1, 10 10, 0 8, 1 1))'));
+select astext(geom), area(geom),round(area(ST_buffer(geom,2)), 7) from t1;
+astext(geom) area(geom) round(area(ST_buffer(geom,2)), 7)
+POLYGON((0 0,10 10,0 8,0 0)) 40 117.2416764
+POLYGON((1 1,10 10,0 8,1 1)) 36 108.5553959
+select ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2))) from t1;
+ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2)))
+133
+134
+set @geom=geomfromtext('LINESTRING(2 1, 4 2, 2 3, 2 5)');
+set @buff=ST_buffer(@geom,1);
+select ST_NUMPOINTS(ST_EXTERIORRING(@buff));
+ST_NUMPOINTS(ST_EXTERIORRING(@buff))
+202
+DROP TABLE t1;
+select st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)'));
+st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)'))
+0
+select st_touches(geomfromtext('point(1 1)'), geomfromtext('point(1 1)'));
+st_touches(geomfromtext('point(1 1)'), geomfromtext('point(1 1)'))
+0
+select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 1)'));
+st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 1)'))
+0
+select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 0)'));
+st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 0)'))
+0
+select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 2)'));
+st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('point(1 2)'))
+0
+select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('polygon((1 1.2, 1 0, 2 0, 1 1.2))'));
+st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('polygon((1 1.2, 1 0, 2 0, 1 1.2))'))
+1
+select st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('polygon((1 1, 1 0, 2 0, 1 1))'));
+st_touches(geomfromtext('polygon((0 0, 2 2, 0 4, 0 0))'), geomfromtext('polygon((1 1, 1 0, 2 0, 1 1))'))
+1
+SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13) )'),PolyFromText('POLYGON((67 13, 67 18, 59 19, 59 13, 59 13, 67 13) )')) as result;
+result
+0
+SELECT ST_Equals(PolyFromText('POLYGON((67 13, 67 18, 67 18, 59 18, 59 13, 67 13) )'),PolyFromText('POLYGON((67 13, 67 18, 59 18, 59 13, 59 13, 67 13) )')) as result;
+result
+1
+SELECT ST_Equals(PointFromText('POINT (12 13)'),PointFromText('POINT (12 13)')) as result;
+result
+1
+#
+# BUG#11755628/47429: INTERSECTION FUNCTION CRASHED MYSQLD
+# BUG#11759650/51979: UNION/INTERSECTION OF POLYGONS CRASHES MYSQL
+#
+SELECT ASTEXT(ST_UNION(GEOMFROMTEXT('POLYGON((525000 183300,525400
+183300,525400 18370, 525000 183700,525000 183300))'),
+geomfromtext('POLYGON((525298.67 183511.53,525296.57
+183510.39,525296.42 183510.31,525289.11 183506.62,525283.17
+183503.47,525280.98 183502.26,525278.63 183500.97,525278.39
+183500.84,525276.79 183500,525260.7 183491.55,525263.95
+183484.75,525265.58 183481.95,525278.97 183488.73,525276.5
+183493.45,525275.5 183495.7,525280.35 183498.2,525282.3
+183499.1,525282.2 183499.3,525283.55 183500,525301.75
+183509.35,525304.45 183504.25,525307.85 183504.95,525304.5
+183510.83,525302.81 183513.8,525298.67 183511.53),(525275.06
+183489.89,525272.06 183488.37,525268.94 183494.51,525271.94
+183496.03,525275.06 183489.89),(525263.26 183491.55,525266.15
+183493.04,525269.88 183485.82,525266.99 183484.33,525263.26
+183491.55))'))) st_u;
+st_u
+MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37)))
+SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F;
+SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t;
+t
+NULL
+SELECT astext(ST_UNION (
+PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'),
+ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))')))));
+astext(ST_UNION (
+PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'),
+ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))')))))
+GEOMETRYCOLLECTION(POLYGON((0 0,1 9,8 2,0 0),(2 2,2 7,3 2,2 2)),LINESTRING(0.5555555555555556 5,0 5,0 0,5 0,5 1.25),LINESTRING(2 5,2.4 5))
+SELECT astext(ST_BUFFER(LineStringFromText('LINESTRING(0 0,1 1)'),0));
+astext(ST_BUFFER(LineStringFromText('LINESTRING(0 0,1 1)'),0))
+LINESTRING(0 0,1 1)
+SELECT Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 7)'), 3)), 5);
+Round(ST_Area(ST_BUFFER(MultipointFromText('MULTIPOINT(7 7,3 7,7 2,7 4 ,7 7)'), 3)), 5)
+78.68426
+SELECT ST_INTERSECTION(NULL, NULL);
+ST_INTERSECTION(NULL, NULL)
+NULL
+SELECT ASTEXT(ST_INTERSECTION(
+MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),
+ ((0 5,3 5,3 0,0 0,0 1,2 1,2 2,0 2,0 5), (1 3,2 3,2 4,1 4,1 3)),
+ ((2 2,5 2,4 4,2 8,2 2)))'),
+MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 4,2 5,3 5)),
+ ((2 2,9 2,0 2,2 6,2 2)),
+ ((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),
+ ((9 9,6 8,7 0,9 9)))')));
+ASTEXT(ST_INTERSECTION(
+MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),
+ ((0 5,3 5,3 0,0 0,0 1,2 1,2 2,0 2,0 5), (1 3,2 3,2 4,1 4,1 3)),
+ ((2 2,5 2,4 4,2 8,2 2)))'),
+MULTIPOLY
+POLYGON((0 2,1 4,1 3,2 3,2 4,1 4,1.5 5,2 5,2 8,8 8,8 2,0 2),(4 4,4 6,6 6,6 4,4 4))
+SELECT ROUND(ST_LENGTH(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0),
+ (8 2,1 3,9 0,4 4))'),
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))), 7);
+ROUND(ST_LENGTH(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0),
+ (8 2,1 3,9 0,4 4))'),
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6)
+90.2783626
+SELECT ST_NUMGEOMETRIES((ST_UNION(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 0,4 2,0 2,1 5,0 3,7 0,8 5,5 8),
+ (6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0),
+ (7 8,3 1,0 9,6 0,4 8),
+ (9 3,0 4,5 9,6 4),
+ (8 2,1 3,9 0,4 4))'),
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 0,9 3,2 5,3 6,3 2),
+ (2 5,6 7,9 7,5 2,1 6,3 6))')),
+MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((7 7,3 7,3 1,7 8,7 7)),
+ ((3 5,2 4,2 5,3 5)),
+ ((7 7,8 7,3 7,7 7,7 7)),
+ ((0 5,3 5,3 4,1 4,1 3,3 3,3 0,0 0,0 5), (1 1,2 1,2 2,1 2,1 1)))'))));
+ST_NUMGEOMETRIES((ST_UNION(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 0,4 2,0 2,1 5,0 3,7 0,8 5,5 8),
+ (6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0),
+
+192
+SELECT Round(ST_AREA(ST_BUFFER( ST_UNION(
+POLYGONFROMTEXT('POLYGON((7 7, 7 7, 7 4, 7 7, 7 7))'),
+POLYGONFROMTEXT('POLYGON((7 7, 4 7, 2 9, 7 6, 7 7))')), 1)), 6);
+Round(ST_AREA(ST_BUFFER( ST_UNION(
+POLYGONFROMTEXT('POLYGON((7 7, 7 7, 7 4, 7 7, 7 7))'),
+POLYGONFROMTEXT('POLYGON((7 7, 4 7, 2 9, 7 6, 7 7))')), 1)), 6)
+21.901344
+SELECT AsText(ST_UNION(MultiPolygonFromText('
+ MULTIPOLYGON(((2 2, 2 8, 8 8, 8 2, 2 2), (4 4, 4 6, 6 6, 6 4, 4 4)),
+ ((0 0, 8 3, 7 4, 0 0)),
+ ((2 2, 2 8, 8 8, 8 2, 2 2), (4 4, 4 6, 6 6, 6 4, 4 4)))'),
+MultiPolygonFromText(' MULTIPOLYGON(((0 0, 1 9, 4 6, 0 0)),
+ ((0 5, 3 5, 3 4, 1 4, 1 3, 3 3, 3 0, 0 0, 0 5), (1 1, 2 1, 2 2, 1 2, 1 1)),
+ ((7 7, 4 7, 6 3, 7 2, 7 7)),
+ ((0 5, 3 5, 3 4, 1 4, 1 3, 3 3, 3 0, 0 0, 0 5), (1 1, 2 1, 2 2, 1 2, 1 1))) ')));
+AsText(ST_UNION(MultiPolygonFromText('
+ MULTIPOLYGON(((2 2, 2 8, 8 8, 8 2, 2 2), (4 4, 4 6, 6 6, 6 4, 4 4)),
+ ((0 0, 8 3, 7 4, 0 0)),
+ ((2 2, 2 8, 8 8, 8 2, 2 2), (4 4, 4 6, 6 6, 6 4, 4 4)))'),
+MultiPolygonFr
+POLYGON((0 0,0 5,0.5555555555555556 5,1 9,2 8,8 8,8 2,5.333333333333334 2,3 1.125,3 0,0 0),(1 1,1 1.5,1.3333333333333333 2,2 2,2 1.1428571428571428,1.75 1,1 1),(3 1.7142857142857142,3 2,3.5 2,3 1.7142857142857142),(4 4,4 6,4.5 6,5.5 4,4 4))
+SELECT AsText(ST_SYMDIFFERENCE(
+MultiLineStringFromText('MULTILINESTRING((7 7, 1 7, 8 5, 7 8, 7 7),
+ (6 3, 3 4, 1 1, 9 9, 9 0, 8 4, 9 9))'),
+Envelope(GeometryFromText('MULTIPOINT(7 9, 0 0, 3 7, 1 6, 0 0)'))));
+AsText(ST_SYMDIFFERENCE(
+MultiLineStringFromText('MULTILINESTRING((7 7, 1 7, 8 5, 7 8, 7 7),
+ (6 3, 3 4, 1 1, 9 9, 9 0, 8 4, 9 9))'),
+Envelope(GeometryFromText('MULTIPOINT(7 9, 0 0, 3 7, 1 6, 0 0)'))))
+GEOMETRYCOLLECTION(POLYGON((0 0,0 9,7 9,7 0,0 0)),LINESTRING(9 9,8 4,9 0,9 9),LINESTRING(7 5.285714285714286,8 5,7.25 7.25),LINESTRING(7 7,7.25 7.25),LINESTRING(7.25 7.25,7 8),LINESTRING(7.25 7.25,9 9))
+SELECT AsText(ST_UNION(
+MultiPolygonFromText('MULTIPOLYGON(((9 9, 7 9, 1 1, 9 9)),
+ ((2 2, 1 2, 3 3, 2 2, 2 2)),
+ ((0 0, 7 5, 9 6, 0 0)),
+ ((7 7, 5 7, 1 5, 7 1, 7 7)))'),
+MultiPolygonFromText('MULTIPOLYGON(((2 2, 2 2, 1 5, 2 7, 2 2)),
+ ((0 5, 3 5, 3 0, 0 0, 0 5), (1 1, 2 1, 2 4, 1 4, 1 1)))')));
+AsText(ST_UNION(
+MultiPolygonFromText('MULTIPOLYGON(((9 9, 7 9, 1 1, 9 9)),
+ ((2 2, 1 2, 3 3, 2 2, 2 2)),
+ ((0 0, 7 5, 9 6, 0 0)),
+
+POLYGON((0 0,0 5,1 5,2 7,2 5.5,5 7,5.5 7,7 9,9 9,7 7,7 5,9 6,7 4.666666666666667,7 1,4.25 2.833333333333333,3 2,3 0,0 0),(1 1,1 4,1.3333333333333333 4,1.8571428571428572 2.4285714285714284,1 2,1.75 2,1 1,2 2,2 1.4285714285714284,1.4 1,1 1),(1.5 1,2 1.3333333333333333,2 1,1.5 1),(3 2.142857142857143,3 3,3.4 3.4,4.1034482758620685 2.9310344827586206,3 2.142857142857143))
+SELECT AsText( ST_INTERSECTION(
+LinestringFromText('LINESTRING( 3 5, 2 5, 2 4, 3 4, 3 5 ) ') ,
+LinestringFromText('LINESTRING( 3 5, 2 4, 2 5, 3 5 ) ')
+));
+AsText( ST_INTERSECTION(
+LinestringFromText('LINESTRING( 3 5, 2 5, 2 4, 3 4, 3 5 ) ') ,
+LinestringFromText('LINESTRING( 3 5, 2 4, 2 5, 3 5 ) ')
+))
+LINESTRING(2 4,2 5,3 5)
+SELECT AsText( ST_UNION(
+PolygonFromText(' POLYGON( ( 2 2 , 3 2 , 7 5 , 2 0 , 2 2 ) ) ') ,
+PolygonFromText(' POLYGON( ( 2 2 , 3 2 , 3 3 , 2 5 , 2 2 ) ) ') ) );
+AsText( ST_UNION(
+PolygonFromText(' POLYGON( ( 2 2 , 3 2 , 7 5 , 2 0 , 2 2 ) ) ') ,
+PolygonFromText(' POLYGON( ( 2 2 , 3 2 , 3 3 , 2 5 , 2 2 ) ) ') ) )
+POLYGON((2 0,2 5,3 3,3 2,7 5,2 0))
+SELECT AsText(ST_INTERSECTION(LinestringFromText('LINESTRING(1 1, 2 2)'), GeometryFromText('LINESTRING(3 3, 4 4)')));
+AsText(ST_INTERSECTION(LinestringFromText('LINESTRING(1 1, 2 2)'), GeometryFromText('LINESTRING(3 3, 4 4)')))
+GEOMETRYCOLLECTION EMPTY
+SELECT AsText(ST_UNION(GEOMETRYFROMTEXT('POINT(8 1)') ,MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 5, 2 5, 2 4, 3 4, 3 5))')));
+AsText(ST_UNION(GEOMETRYFROMTEXT('POINT(8 1)') ,MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 5, 2 5, 2 4, 3 4, 3 5))')))
+GEOMETRYCOLLECTION(POINT(8 1),LINESTRING(2 4,2 5,3 5,3 4,2 4))
+SELECT ST_DISTANCE(POINTFROMTEXT('POINT(7 1)'),MULTILINESTRINGFROMTEXT('MULTILINESTRING(
+ (4 7,9 7,6 1,3 4,1 1), (3 5, 2 5, 2 4, 3 4, 3 5))'));
+ST_DISTANCE(POINTFROMTEXT('POINT(7 1)'),MULTILINESTRINGFROMTEXT('MULTILINESTRING(
+ (4 7,9 7,6 1,3 4,1 1), (3 5, 2 5, 2 4, 3 4, 3 5))'))
+1
+SELECT AsText(ST_UNION(POLYGONFROMTEXT('POLYGON((12 9, 3 6, 3 0, 12 9))'), POLYGONFROMTEXT('POLYGON((2 2, 7 2, 4 2, 2 0, 2 2))')));
+AsText(ST_UNION(POLYGONFROMTEXT('POLYGON((12 9, 3 6, 3 0, 12 9))'), POLYGONFROMTEXT('POLYGON((2 2, 7 2, 4 2, 2 0, 2 2))')))
+GEOMETRYCOLLECTION(POLYGON((2 0,2 2,3 2,3 6,12 9,3 0,3 1,2 0)),LINESTRING(5 2,7 2))
+SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 2 5, 7 6, 1 8),(0 0 ,1 6 ,0 1, 8 9, 2 4, 6 1, 3 5, 4 8), (9 3, 5 4, 1 8, 4 2, 5 8, 3 0))' ) ,
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 3 1, 2 7, 4 2, 6 2, 1 5))')
+), 16)));
+ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER(ST_UNION(
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 2 5, 7 6, 1 8),(0 0 ,1 6 ,0 1, 8 9, 2 4, 6 1, 3 5, 4 8), (9 3, 5 4, 1 8, 4 2, 5 8, 3 0))' ) ,
+MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 3 1, 2 7, 4 2, 6 2
+278
+SELECT ST_NUMGEOMETRIES(ST_DIFFERENCE (
+ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 2 4 , 5 0 , 2 9 , 6 2 , 0 2 ) , ( 4 3 , 5 6 , 9 4 , 0 7 , 7 2 , 2 0 , 8 2 ) , ( 5 0 , 1 5 , 3 7 , 7 7 ) , ( 2 3 , 9 5 , 2 0 , 8 1 ) , ( 0 9 , 9 3 , 2 8 , 8 1 , 9 4 ) ) ' ),
+ST_UNION (
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 2 2 , 7 2 , 6 2 , 2 6 , 2 2 ) ) , ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ' ) ,
+ENVELOPE(
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ' )
+)
+)
+),
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 2 9 , 1 3 , 7 3 , 8 5 ) , ( 5 0 , 8 1 , 2 0 , 7 4 , 1 0 ) , ( 9 2 , 5 2 , 6 5 , 8 8 , 0 2 ) , ( 0 8 , 3 9 , 4 0 , 1 0 ) , ( 0 0 , 7 6 , 8 3 , 0 0 ) ) ' )
+));
+ST_NUMGEOMETRIES(ST_DIFFERENCE (
+ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 2 4 , 5 0 , 2 9 , 6 2 , 0 2 ) , ( 4 3 , 5 6 , 9 4 , 0 7 , 7 2 , 2 0 , 8 2 ) , ( 5 0 , 1 5 , 3 7 , 7 7 ) , ( 2 3 , 9 5 , 2 0 , 8 1 ) , ( 0 9 , 9 3 , 2 8 , 8 1 , 9 4 )
+125
+SELECT ASTEXT(ST_DIFFERENCE (
+POLYGONFROMTEXT( ' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) ' ) ,
+ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) ' ) ,
+ST_SYMDIFFERENCE (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 3 8 , 0 8 , 6 6 , 6 1 , 0 5 , 6 7 , 3 7 ) , ( 5 8 , 7 7 , 9 0 , 8 7 ) , ( 1 5 , 1 8 , 2 3 , 3 9 ) , ( 1 3 , 9 7 , 5 5 , 0 8 , 6 9 ) , ( 3 6 , 6 9 , 8 7 , 0 2 , 4 6 , 9 5 ) ) ' ) ,
+ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 9 4 , 2 0 , 2 2 , 7 2 , 6 2 ) , ( 5 2 , 8 2 , 4 8 , 3 4 ) , ( 1 0 , 1 4 , 2 7 , 7 0 , 1 5 ) , ( 2 8 , 4 4 , 5 0 , 7 0 , 4 0 ) ) ' ) ,
+GEOMETRYFROMTEXT( ' MULTILINESTRING( ( 3 7 , 7 3 , 5 8 , 4 8 ) , ( 3 2 , 5 0 , 9 3 , 4 4 ) , ( 6 0 , 4 2 , 7 8 , 1 3 ) ) ' )
+)
+)
+)
+));
+ASTEXT(ST_DIFFERENCE (
+POLYGONFROMTEXT( ' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) ' ) ,
+ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) ' ) ,
+ST_SYMDIFFERENCE (
+MULTILINESTRINGFROMTEX
+POLYGON((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4))
+SELECT ST_NUMGEOMETRIES(ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 0 8 , 1 9 , 5 7 , 2 8 , 5 8 , 6 7 ) , ( 4 5 , 8 4 , 0 3 , 5 1 ) , ( 6 8 , 2 7 , 1 6 , 9 9 , 7 2 ) , ( 9 5 , 2 8 , 1 2 , 9 6 , 2 0 ) ) ' ) ,
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 7 7 , 2 7, 6 8, 7 1 , 7 7 ) ) ) ' )
+));
+ST_NUMGEOMETRIES(ST_UNION (
+MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 0 8 , 1 9 , 5 7 , 2 8 , 5 8 , 6 7 ) , ( 4 5 , 8 4 , 0 3 , 5 1 ) , ( 6 8 , 2 7 , 1 6 , 9 9 , 7 2 ) , ( 9 5 , 2 8 , 1 2 , 9 6 , 2 0 ) ) ' ) ,
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (
+50
+SELECT ST_BUFFER (
+LINESTRINGFROMTEXT( ' LINESTRING( 5 4 , 3 8 , 2 6 , 5 5 , 7 9 ) ' ) ,
+ST_DISTANCE (
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 4, 2 5, 3 5) ) , ( (3 5, 2 5, 2 4, 3 4, 3 5) ) , ( ( 0 0 , 8 3 , 9 5 , 0 0 ) ) ) ' ) ,
+ST_DIFFERENCE (
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ' ) ,
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) , ( ( 0 0 , 3 8 , 9 4 , 0 0 ) ) ) ' )
+)
+)
+) ;
+ST_BUFFER (
+LINESTRINGFROMTEXT( ' LINESTRING( 5 4 , 3 8 , 2 6 , 5 5 , 7 9 ) ' ) ,
+ST_DISTANCE (
+MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 4, 2 5, 3 5) ) , ( (3 5, 2 5, 2 4, 3 4, 3 5) ) , ( ( 0 0 , 8 3 , 9 5 , 0 0 ) ) ) ' ) ,
+ST_DIFFERENCE (
+MULTIPOL
+NULL
+SELECT ST_DISTANCE ( ST_DIFFERENCE ( MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ' ) , MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) , ( ( 0 0 , 3 8 , 9 4 , 0 0 ) ) ) ' ) ), MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 4, 2 5, 3 5) ) , ( (3 5, 2 5, 2 4, 3 4, 3 5) ) , ( ( 0 0 , 8 3 , 9 5 , 0 0 ) ) ) ' ) ) ;
+ST_DISTANCE ( ST_DIFFERENCE ( MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ' ) , MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 ,
+NULL
+SELECT ASTEXT(ST_INTERSECTION( GEOMETRYFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(7 7,5.33333333333333 7),LINESTRING(5.33333333333333 7,0 7,5 8,5.33333333333333 7),LINESTRING(5.33333333333333 7,7 2,7 7),POLYGON((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5)))'), geomETRYFROMTEXT(' MULTILINESTRING( ( 5 1 , 3 7 , 6 1 , 7 0 ) , ( 1 6 , 8 5 , 7 5 , 5 6 ) )') ));
+ASTEXT(ST_INTERSECTION( GEOMETRYFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(7 7,5.33333333333333 7),LINESTRING(5.33333333333333 7,0 7,5 8,5.33333333333333 7),LINESTRING(5.33333333333333 7,7 2,7 7),POLYGON((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))
+MULTIPOINT(7 5,7 5.142857142857142,5.899999999999998 5.300000000000001,5.799999999999997 5.600000000000001,3 7)
+SELECT ST_CROSSES( GEOMETRYFROMTEXT(' POLYGON( (3 5, 2 4, 2 5, 3 5) ) ') , POLYGONFROMTEXT(' POLYGON((2 4,3 4,3 5,2 5,2 4)) '));
+ST_CROSSES( GEOMETRYFROMTEXT(' POLYGON( (3 5, 2 4, 2 5, 3 5) ) ') , POLYGONFROMTEXT(' POLYGON((2 4,3 4,3 5,2 5,2 4)) '))
+0
+SELECT ST_WITHIN( POLYGONFROMTEXT(' POLYGON( (0 5, 3 5, 3 4, 2 0 , 1 0, 2 4 , 0 4, 0 5) ) ') , POLYGONFROMTEXT(' POLYGON( (0 5, 3 5, 3 4, 1 4 , 1 3 , 3 3 , 3 0 , 0 0 , 0 5), ( 1 1 , 2 1 , 2 2 , 1 2 , 1 1 ) ) ') );
+ST_WITHIN( POLYGONFROMTEXT(' POLYGON( (0 5, 3 5, 3 4, 2 0 , 1 0, 2 4 , 0 4, 0 5) ) ') , POLYGONFROMTEXT(' POLYGON( (0 5, 3 5, 3 4, 1 4 , 1 3 , 3 3 , 3 0 , 0 0 , 0 5), ( 1 1 , 2 1 , 2 2 , 1 2 , 1 1 ) ) ') )
+0
+SELECT ST_WITHIN( POINTFROMTEXT(' POINT(1 2 ) ') , MULTIPOLYGONFROMTEXT(' MULTIPOLYGON( ( (0 5, 3 5, 3 0, 0 0, 0 5), ( 1 1 , 2 1 , 2 4, 1 4, 1 1 ) ) ) '));
+ST_WITHIN( POINTFROMTEXT(' POINT(1 2 ) ') , MULTIPOLYGONFROMTEXT(' MULTIPOLYGON( ( (0 5, 3 5, 3 0, 0 0, 0 5), ( 1 1 , 2 1 , 2 4, 1 4, 1 1 ) ) ) '))
+0
+select ST_ASTEXT(envelope(ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION EMPTY')));
+ST_ASTEXT(envelope(ST_GEOMCOLLFROMTEXT('GEOMETRYCOLLECTION EMPTY')))
+GEOMETRYCOLLECTION EMPTY
+SELECT ST_EQUALS( GEOMETRYFROMTEXT(' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) ') , GEOMETRYFROMTEXT(' POLYGON( (3 5, 2 5, 2 4, 3 4, 3 5) ) ') );
+ST_EQUALS( GEOMETRYFROMTEXT(' MULTILINESTRING( (3 5, 2 5, 2 4, 3 4, 3 5) ) ') , GEOMETRYFROMTEXT(' POLYGON( (3 5, 2 5, 2 4, 3 4, 3 5) ) ') )
+0
+SELECT ST_TOUCHES( GEOMETRYFROMTEXT(' LINESTRING( 1 1 , 1 4 , 5 0 , 8 3 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) ') );
+ST_TOUCHES( GEOMETRYFROMTEXT(' LINESTRING( 1 1 , 1 4 , 5 0 , 8 3 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) ') )
+0
+SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT(' MULTIPOINT( 5 8 , 5 2 , 1 8 , 3 0 , 3 0 , 7 8 ) ') );
+ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT(' MULTIPOINT( 5 8 , 5 2 , 1 8 , 3 0 , 3 0 , 7 8 ) ') )
+0
+SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') );
+ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') )
+1
+SELECT ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) '));
+ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) '))
+0
+SELECT ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29)') );
+ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,
+1
+SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
+ -2.910427500435995 0.727606875108998,
+ -0.910427500435995 8.727606875108998,
+ 7.664100588675687 1.503849116986468,
+ 1.664100588675687 -2.496150883013531,
+ 0.0 -3.0
+))' ), 3 )));
+ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
+ -2.910427500435995 0.727606875108998,
+ -0.910427500435995 8.727606875108998,
+ 7.664100588675687 1.503849116986468,
+ 1.664100588675687 -2.496150883013531,
+ 0.0 -3.0
+))' ),
+136
+select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1));
+astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1))
+GEOMETRYCOLLECTION EMPTY
+DROP TABLE IF EXISTS p1;
+CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
+BEGIN
+DECLARE g GEOMETRY;
+SET g=GeomFromText(geom);
+SELECT geom AS `-----`;
+SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area;
+END|
+#
+# Testing ST_BUFFER with positive distance
+#
+-----
+POINT(0 0))
+dist buffer buf_area
+1 POLYGON 3.14
+-----
+LineString(0 1, 1 1))
+dist buffer buf_area
+1 POLYGON 5.14
+-----
+LineString(9 9,8 1,1 5,0 0)
+dist buffer buf_area
+1 POLYGON 44.63
+-----
+Polygon((2 2,2 8,8 8,8 2,2 2))
+dist buffer buf_area
+1 POLYGON 63.14
+-----
+Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
+dist buffer buf_area
+1 POLYGON 95.14
+-----
+Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
+dist buffer buf_area
+1 POLYGON 174.93
+-----
+MultiPoint(9 9,8 1,1 5)
+dist buffer buf_area
+1 MULTIPOLYGON 9.42
+-----
+MultiLineString((0 0,2 2))
+dist buffer buf_area
+1 POLYGON 8.80
+-----
+MultiLineString((0 0,2 2,0 4))
+dist buffer buf_area
+1 POLYGON 14.24
+-----
+MultiLineString((0 0,2 2),(0 2,2 0))
+dist buffer buf_area
+1 POLYGON 13.59
+-----
+MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
+dist buffer buf_area
+1 MULTIPOLYGON 70.06
+-----
+MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
+dist buffer buf_area
+1 POLYGON 73.18
+-----
+MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
+dist buffer buf_area
+1 POLYGON 73.18
+-----
+GeometryCollection(Point(0 0))
+dist buffer buf_area
+1 POLYGON 3.14
+-----
+GeometryCollection(LineString(0 0, 2 2)))
+dist buffer buf_area
+1 POLYGON 8.80
+-----
+GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
+dist buffer buf_area
+1 POLYGON 63.14
+-----
+GeometryCollection(MultiPoint(9 9,8 1,1 5))
+dist buffer buf_area
+1 MULTIPOLYGON 9.42
+-----
+GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
+dist buffer buf_area
+1 MULTIPOLYGON 10.28
+-----
+GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
+dist buffer buf_area
+1 MULTIPOLYGON 48.28
+-----
+GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
+dist buffer buf_area
+1 POLYGON 75.92
+#
+# Testing ST_BUFFER with zero distance
+#
+-----
+POINT(0 0))
+dist buffer buf_area
+0 POINT 0.00
+-----
+LineString(0 1, 1 1))
+dist buffer buf_area
+0 LINESTRING 0.00
+-----
+LineString(9 9,8 1,1 5,0 0)
+dist buffer buf_area
+0 LINESTRING 0.00
+-----
+Polygon((2 2,2 8,8 8,8 2,2 2))
+dist buffer buf_area
+0 POLYGON 36.00
+-----
+Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
+dist buffer buf_area
+0 POLYGON 48.00
+-----
+Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
+dist buffer buf_area
+0 POLYGON 116.00
+-----
+MultiPoint(9 9,8 1,1 5)
+dist buffer buf_area
+0 MULTIPOINT NULL
+-----
+MultiLineString((0 0,2 2))
+dist buffer buf_area
+0 MULTILINESTRING NULL
+-----
+MultiLineString((0 0,2 2,0 4))
+dist buffer buf_area
+0 MULTILINESTRING NULL
+-----
+MultiLineString((0 0,2 2),(0 2,2 0))
+dist buffer buf_area
+0 MULTILINESTRING NULL
+-----
+MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
+dist buffer buf_area
+0 MULTILINESTRING NULL
+-----
+MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
+dist buffer buf_area
+0 MULTIPOLYGON 66.00
+-----
+MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
+dist buffer buf_area
+0 MULTIPOLYGON 62.00
+-----
+GeometryCollection(Point(0 0))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(LineString(0 0, 2 2)))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION 36.00
+-----
+GeometryCollection(MultiPoint(9 9,8 1,1 5))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION NULL
+-----
+GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION NULL
+-----
+GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION 18.00
+-----
+GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
+dist buffer buf_area
+0 GEOMETRYCOLLECTION 36.00
+#
+# Testing ST_BUFFER with negative distance
+#
+-----
+POINT(0 0))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+LineString(0 1, 1 1))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+LineString(9 9,8 1,1 5,0 0)
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+Polygon((2 2,2 8,8 8,8 2,2 2))
+dist buffer buf_area
+-1 POLYGON 16.00
+-----
+MultiPoint(9 9,8 1,1 5)
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+MultiLineString((0 0,2 2))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+MultiLineString((0 0,2 2,0 4))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+MultiLineString((0 0,2 2),(0 2,2 0))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(Point(0 0))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(LineString(0 0, 2 2)))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
+dist buffer buf_area
+-1 POLYGON 16.00
+-----
+GeometryCollection(MultiPoint(9 9,8 1,1 5))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
+dist buffer buf_area
+-1 GEOMETRYCOLLECTION 0.00
+-----
+GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
+dist buffer buf_area
+-1 POLYGON 16.00
+SELECT ST_CONTAINS(
+GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
+GeomFromText('POINT(5 10)'));
+ST_CONTAINS(
+GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
+GeomFromText('POINT(5 10)'))
+0
+SELECT AsText(ST_UNION(
+GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
+GeomFromText('POINT(5 10)')));
+AsText(ST_UNION(
+GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
+GeomFromText('POINT(5 10)')))
+GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),POLYGON((6 6,6 11,11 11,11 6,6 6)),POINT(5 10))
+DROP PROCEDURE p1;
+#
+# Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
+#
+SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3));
+GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3))
+POLYGON
+#
+# Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
+#
+SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
+GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1))
+POLYGON
+#
+# Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
+#
+DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
+SELECT ST_WITHIN(
+LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
+ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
+ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) '))));
+ST_WITHIN(
+LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
+ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) ')
+0
+SELECT ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
+ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))));
+ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
+ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))))
+2
+SELECT ST_NUMINTERIORRINGS(
+ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
+SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))));
+ST_NUMINTERIORRINGS(
+ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
+SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))))
+0
+SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
+SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
+ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
+SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))))
+POLYGON((9 9,5 2,4 5,9 9))
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 32799f15de2..55435f34200 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1619,11 +1619,16 @@ insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
select equals(`a`,convert(`a` using utf8)) from `t1`;
equals(`a`,convert(`a` using utf8))
1
+0
+0
+Warnings:
+Warning 1300 Invalid utf8 character string: '\xE0C'
+Warning 1300 Invalid utf8 character string: '\xE0C'
+select equals(`a`,left(`a`,23)) from `t1`;
+equals(`a`,left(`a`,23))
+NULL
NULL
NULL
-Warnings:
-Warning 1300 Invalid utf8 character string: 'E043'
-Warning 1300 Invalid utf8 character string: 'E043'
drop table t1;
#
# MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0))
diff --git a/mysql-test/r/max_statement_time.result b/mysql-test/r/max_statement_time.result
index 38334c59baa..93c793b265a 100644
--- a/mysql-test/r/max_statement_time.result
+++ b/mysql-test/r/max_statement_time.result
@@ -87,6 +87,7 @@ SLEEP(2)
1
SHOW STATUS LIKE '%timeout%';
Variable_name Value
+Master_gtid_wait_timeouts 0
Ssl_default_timeout 0
Ssl_session_cache_timeouts 0
SET @@max_statement_time=0;
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index ae9440859df..b91f1a0bfdb 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -2281,6 +2281,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2293,6 +2295,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
@@ -2307,6 +2311,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2319,6 +2325,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
index 81f7a0584d3..250ef4453a3 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -2282,6 +2282,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2294,6 +2296,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
@@ -2308,6 +2312,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2320,6 +2326,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
index 81f7a0584d3..250ef4453a3 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -2282,6 +2282,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2294,6 +2296,8 @@ NULL NULL 1
<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
@@ -2308,6 +2312,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2320,6 +2326,8 @@ NULL NULL 1
<--------30 characters-------> <--------30 characters-------> 3
---????????@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5
+Warnings:
+Warning 1976 Cannot convert 'latin1' character 0xC3 to 'koi8r'
DROP VIEW v1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug59641.result b/mysql-test/suite/innodb/r/innodb_bug59641.result
index 476385fba6c..9c5d363e5fe 100644
--- a/mysql-test/suite/innodb/r/innodb_bug59641.result
+++ b/mysql-test/suite/innodb/r/innodb_bug59641.result
@@ -42,9 +42,9 @@ a b
COMMIT;
XA RECOVER;
formatID gtrid_length bqual_length data
-1 3 0 789
1 3 0 123
1 3 0 456
+1 3 0 789
XA ROLLBACK '123';
XA ROLLBACK '456';
XA COMMIT '789';
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 44e75988d16..47bbc90f955 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1315,7 +1315,7 @@ drop table t1;
# Test for testable InnoDB status variables. This test
# uses previous ones(pages_created, rows_deleted, ...).
---replace_result 511 ok 512 ok 2047 ok 513 ok 515 ok
+--replace_result 511 ok 512 ok 2047 ok 513 ok 514 ok 515 ok
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test
index a8d35cd1029..bca3f4a92c1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug59641.test
+++ b/mysql-test/suite/innodb/t/innodb_bug59641.test
@@ -62,6 +62,7 @@ COMMIT;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
COMMIT;
+--sorted_result
XA RECOVER;
XA ROLLBACK '123';
XA ROLLBACK '456';
diff --git a/mysql-test/suite/jp/r/jp_convert_ucs2.result b/mysql-test/suite/jp/r/jp_convert_ucs2.result
index 5d5b0761ad8..b16f5420559 100644
--- a/mysql-test/suite/jp/r/jp_convert_ucs2.result
+++ b/mysql-test/suite/jp/r/jp_convert_ucs2.result
@@ -160,6 +160,14 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`;
°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+Warnings:
+Warning 1976 Cannot convert 'ucs2' character 0x02DB to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4E5A to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4EE1 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4F19 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F2B to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F57 to 'sjis'
SELECT `£Ã£±`, CONVERT(`£Ã£±` using utf8) FROM `£Ô£´`;
£Ã£± CONVERT(`£Ã£±` using utf8)
Ž¡Ž¢Ž£Ž¤Ž¥Ž¦Ž§Ž¨Ž©ŽªŽ«Ž¬Ž­Ž®Ž¯ Ž¡Ž¢Ž£Ž¤Ž¥Ž¦Ž§Ž¨Ž©ŽªŽ«Ž¬Ž­Ž®Ž¯
@@ -235,6 +243,14 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`;
°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+Warnings:
+Warning 1976 Cannot convert 'ucs2' character 0x02DB to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4E5A to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4EE1 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4F19 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F2B to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F57 to 'sjis'
SELECT `£Ã£±`, CONVERT(`£Ã£±` using utf8) FROM `£Ô£·`;
£Ã£± CONVERT(`£Ã£±` using utf8)
PQRSTUVWXYZ[\]^_ PQRSTUVWXYZ[\]^_
@@ -310,6 +326,14 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`;
¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+Warnings:
+Warning 1976 Cannot convert 'ucs2' character 0x02DB to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4E5A to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4EE1 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x4F19 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F2B to 'sjis'
+Warning 1976 Cannot convert 'ucs2' character 0x9F57 to 'sjis'
drop table `£Ô£±`;
drop table `£Ô£²`;
drop table `£Ô£³`;
diff --git a/mysql-test/suite/jp/r/jp_convert_ujis.result b/mysql-test/suite/jp/r/jp_convert_ujis.result
index 314a9e95086..0f2aff23c0f 100644
--- a/mysql-test/suite/jp/r/jp_convert_ujis.result
+++ b/mysql-test/suite/jp/r/jp_convert_ujis.result
@@ -393,6 +393,38 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`;
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0x8FA2F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAADC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABDC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0B4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0DC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDDC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2B5 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6F1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7F2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6E1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2AF to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2EB to 'sjis'
SELECT `£Ã£±`, CONVERT(`£Ã£±` using utf8) FROM `£Ô£´`;
£Ã£± CONVERT(`£Ã£±` using utf8)
!"#$%&'()*+,-./ !"#$%&'()*+,-./
@@ -759,6 +791,38 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`;
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0x8FA2F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAADC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABDC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0B4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0DC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDDC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2B5 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6F1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7F2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6E1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2AF to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2EB to 'sjis'
SELECT `£Ã£±`, CONVERT(`£Ã£±` using utf8) FROM `£Ô£·`;
£Ã£± CONVERT(`£Ã£±` using utf8)
!"#$%&'()*+,-./ !"#$%&'()*+,-./
@@ -1125,6 +1189,38 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`;
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+Warnings:
+Warning 1976 Cannot convert 'ujis' character 0x8FA2AF to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2B5 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2EB to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA2F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6E1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA6F1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA7F2 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FA9C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAADC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FAAF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABDC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FABF0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0A1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0B4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0C8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0DC to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FB0F0 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDA1 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDB4 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDC8 to 'sjis'
+Warning 1976 Cannot convert 'ujis' character 0x8FEDDC to 'sjis'
drop table `£Ô£±`;
drop table `£Ô£²`;
drop table `£Ô£³`;
diff --git a/mysql-test/suite/jp/r/jp_convert_utf8.result b/mysql-test/suite/jp/r/jp_convert_utf8.result
index 5a47d5d687a..3528493518f 100644
--- a/mysql-test/suite/jp/r/jp_convert_utf8.result
+++ b/mysql-test/suite/jp/r/jp_convert_utf8.result
@@ -131,6 +131,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T2`;
456789・・・・・・・ABCDEFG 456789・・・・・・・ABCDEFG
HIJKLMNOPQRSTUVWXYZ・ HIJKLMNOPQRSTUVWXYZ・
ï½ï½‘rstuvwxyz・・・・・・・・・ ï½ï½‘rstuvwxyz・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T2`;
C1 CONVERT(`C1` using ucs2)
θικλμνξοπÏστυφχψω・・・ θικλμνξοπÏστυφχψω・・・
@@ -267,6 +269,8 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T2`;
456789・・・・・・・ABCDEFG 456789・・・・・・・ABCDEFG
HIJKLMNOPQRSTUVWXYZ・ HIJKLMNOPQRSTUVWXYZ・
ï½ï½‘rstuvwxyz・・・・・・・・・ ï½ï½‘rstuvwxyz・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T3`;
C1 CONVERT(`C1` using ujis)
êěėēęǵÄğ・ġĥíìïîÇ・īįĩ êěėēęǵÄğ・ġĥíìïîÇ・īįĩ
@@ -309,6 +313,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T3`;
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ 齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBD9E to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T3`;
C1 CONVERT(`C1` using ucs2)
êěėēęǵÄğ・ġĥíìïîÇ・īįĩ êěėēęǵÄğ・ġĥíìïîÇ・īįĩ
@@ -393,6 +399,38 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T3`;
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ????????????????????
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xC3AA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC38A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B5 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC795 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC796 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2A4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC582 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD088 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC381 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC386 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCB9B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCEAC to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD192 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCE86 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A6 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD082 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2BA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCB98 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B882 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BBB8 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B99A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BBA1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BC99 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BD9F to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BCAB to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BD97 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BE94 to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T4`;
C1 CONVERT(`C1` using ujis)
!"#$%&'()*+,-./ !"#$%&'()*+,-./
@@ -497,6 +535,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T5`;
456789・・・・・・・ABCDEFG 456789・・・・・・・ABCDEFG
HIJKLMNOPQRSTUVWXYZ・ HIJKLMNOPQRSTUVWXYZ・
ï½ï½‘rstuvwxyz・・・・・・・・・ ï½ï½‘rstuvwxyz・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T5`;
C1 CONVERT(`C1` using ucs2)
θικλμνξοπÏστυφχψω・・・ θικλμνξοπÏστυφχψω・・・
@@ -633,6 +673,8 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T5`;
456789・・・・・・・ABCDEFG 456789・・・・・・・ABCDEFG
HIJKLMNOPQRSTUVWXYZ・ HIJKLMNOPQRSTUVWXYZ・
ï½ï½‘rstuvwxyz・・・・・・・・・ ï½ï½‘rstuvwxyz・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T6`;
C1 CONVERT(`C1` using ujis)
êěėēęǵÄğ・ġĥíìïîÇ・īįĩ êěėēęǵÄğ・ġĥíìïîÇ・īįĩ
@@ -675,6 +717,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T6`;
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ 齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBD9E to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T6`;
C1 CONVERT(`C1` using ucs2)
êěėēęǵÄğ・ġĥíìïîÇ・īįĩ êěėēęǵÄğ・ġĥíìïîÇ・īįĩ
@@ -759,6 +803,38 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T6`;
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ????????????????????
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xC3AA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC38A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B5 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC795 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC796 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2A4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC582 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD088 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC381 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC386 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCB9B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCEAC to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD192 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCE86 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A6 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD082 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2BA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCB98 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B882 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BBB8 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B99A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BBA1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BC99 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BD9F to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BCAB to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BD97 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BE94 to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T7`;
C1 CONVERT(`C1` using ujis)
!"#$%&'()*+,-./ !"#$%&'()*+,-./
@@ -863,6 +939,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T8`;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T8`;
C1 CONVERT(`C1` using ucs2)
  ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½
@@ -999,6 +1077,8 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T8`;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBCBC to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T9`;
C1 CONVERT(`C1` using ujis)
ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë
@@ -1041,6 +1121,8 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T9`;
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ 齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xEFBD9E to 'ujis'
SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T9`;
C1 CONVERT(`C1` using ucs2)
ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë
@@ -1125,6 +1207,38 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T9`;
齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+Warnings:
+Warning 1976 Cannot convert 'utf8' character 0xCB98 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCB9B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2BA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC2A4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCE86 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xCEAC to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD082 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD088 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xD192 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC386 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A6 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC582 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC381 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC38A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B4 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC795 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3A1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC3AA to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC4B5 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC59B to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xC796 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B882 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4B99A to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BBA1 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BC99 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE4BD9F to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BBB8 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BCAB to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BD97 to 'sjis'
+Warning 1976 Cannot convert 'utf8' character 0xE9BE94 to 'sjis'
drop table `T1`;
drop table `ï¼´ï¼’`;
drop table `T3`;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
index f3b52d89eb4..22f284d6716 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
@@ -231,6 +231,15 @@ NULL
SELECT master_gtid_wait('', NULL);
master_gtid_wait('', NULL)
0
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+Variable_name Value
+Master_gtid_wait_count 1
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+Variable_name Value
+Master_gtid_wait_timeouts 0
+SHOW STATUS LIKE 'Master_gtid_wait_time';
+Variable_name Value
+Master_gtid_wait_time 0
SELECT master_gtid_wait(@pos, 0.5);
master_gtid_wait(@pos, 0.5)
-1
@@ -271,13 +280,46 @@ SELECT master_gtid_wait('2-1-5');
SELECT master_gtid_wait('2-1-10');
SELECT master_gtid_wait('2-1-5,1-1-4,0-1-110');
SELECT master_gtid_wait('2-1-2');
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+Variable_name Value
+Master_gtid_wait_timeouts 0
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+Variable_name Value
+Master_gtid_wait_count 3
SELECT master_gtid_wait('1-1-1');
master_gtid_wait('1-1-1')
0
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+Variable_name Value
+Master_gtid_wait_timeouts 0
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+Variable_name Value
+Master_gtid_wait_count 4
+SET @a= MASTER_GTID_WAIT_TIME;
+SELECT IF(@a <= 100*1000*1000, "OK", CONCAT("Error: wait time ", @a, " is larger than expected"))
+AS Master_gtid_wait_time_as_expected;
+Master_gtid_wait_time_as_expected
+OK
SELECT master_gtid_wait('0-1-109');
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+Variable_name Value
+Master_gtid_wait_timeouts 0
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+Variable_name Value
+Master_gtid_wait_count 4
SELECT master_gtid_wait('2-1-2', 0.5);
master_gtid_wait('2-1-2', 0.5)
-1
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+Variable_name Value
+Master_gtid_wait_timeouts 1
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+Variable_name Value
+Master_gtid_wait_count 5
+SET @a= MASTER_GTID_WAIT_TIME;
+SELECT IF(@a BETWEEN 0.4*1000*1000 AND 100*1000*1000, "OK", CONCAT("Error: wait time ", @a, " not as expected")) AS Master_gtid_wait_time_as_expected;
+Master_gtid_wait_time_as_expected
+OK
KILL QUERY KILL_ID;
ERROR 70100: Query execution was interrupted
SET gtid_domain_id=2;
diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result
index aff83e1b99e..105b9d5c65f 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result
@@ -95,6 +95,9 @@ t2 CREATE TABLE `t2` (
`data` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show global status like 'slave_skipped_errors';
+Variable_name Value
+Slave_skipped_errors 4
INSERT INTO t2 VALUES(1, 1);
INSERT INTO t2 VALUES(2, 1);
INSERT INTO t2 VALUES(3, 1);
@@ -104,6 +107,9 @@ DELETE FROM t2 WHERE id = 5;
SET SQL_LOG_BIN=1;
UPDATE t2 SET id= id + 3, data = 2;
+show global status like 'slave_skipped_errors';
+Variable_name Value
+Slave_skipped_errors 5
**** We cannot execute a select as there are differences in the
**** behavior between STMT and RBR.
==== Clean Up ====
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test
index 778cf427d99..b6a4c7f7e2b 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test
@@ -232,6 +232,10 @@ eval SET @pos= '$pos';
SELECT master_gtid_wait(NULL);
# Check empty argument returns immediately.
SELECT master_gtid_wait('', NULL);
+# Check this gets counted
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+SHOW STATUS LIKE 'Master_gtid_wait_time';
# Let's check that we get a timeout
SELECT master_gtid_wait(@pos, 0.5);
SELECT * FROM t1 ORDER BY a;
@@ -276,7 +280,7 @@ SELECT master_gtid_wait('1-1-1', 0);
send SELECT master_gtid_wait('2-1-1,1-1-4,0-1-110');
--connect (s2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
-# This will time out.
+# This will time out. No event 0-1-1000 exists
send SELECT master_gtid_wait('0-1-1000', 0.5);
--connect (s3,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
@@ -306,14 +310,35 @@ send SELECT master_gtid_wait('2-1-2');
--connection server_2
# This one completes immediately.
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+SHOW STATUS LIKE 'Master_gtid_wait_count';
SELECT master_gtid_wait('1-1-1');
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+let $wait_time = query_get_value(SHOW STATUS LIKE 'Master_gtid_wait_time', Value, 1);
+--replace_result $wait_time MASTER_GTID_WAIT_TIME
+eval SET @a= $wait_time;
+SELECT IF(@a <= 100*1000*1000, "OK", CONCAT("Error: wait time ", @a, " is larger than expected"))
+ AS Master_gtid_wait_time_as_expected;
+
--connect (s10,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
send SELECT master_gtid_wait('0-1-109');
--connection server_2
# This one should time out.
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+SHOW STATUS LIKE 'Master_gtid_wait_count';
SELECT master_gtid_wait('2-1-2', 0.5);
+SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
+SHOW STATUS LIKE 'Master_gtid_wait_count';
+let $wait_time = query_get_value(SHOW STATUS LIKE 'Master_gtid_wait_time', Value, 1);
+--replace_result $wait_time MASTER_GTID_WAIT_TIME
+eval SET @a= $wait_time;
+# We expect a wait time of just a bit over 0.5 seconds. But thread scheduling
+# and timer inaccuracies could introduce significant jitter. So allow a
+# generous interval.
+SELECT IF(@a BETWEEN 0.4*1000*1000 AND 100*1000*1000, "OK", CONCAT("Error: wait time ", @a, " not as expected")) AS Master_gtid_wait_time_as_expected;
--replace_result $kill1_id KILL_ID
eval KILL QUERY $kill1_id;
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test
index 142cd53b9dd..4348675884b 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test
@@ -140,6 +140,7 @@ connection slave;
CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
SHOW CREATE TABLE t2;
+show global status like 'slave_skipped_errors';
connection master;
@@ -157,6 +158,7 @@ sync_slave_with_master;
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
echo $error;
+show global status like 'slave_skipped_errors';
--echo **** We cannot execute a select as there are differences in the
--echo **** behavior between STMT and RBR.
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
index d98be88326e..07e73cdf745 100644
--- a/mysql-test/t/ctype_gbk.test
+++ b/mysql-test/t/ctype_gbk.test
@@ -426,5 +426,12 @@ DROP TABLE t1;
--echo #
--echo #
+--echo # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
+--echo #
+SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
+SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8));
+
+
+--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 125bd310844..f4e89da330e 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1377,6 +1377,7 @@ insert into t1 values(geomfromtext("POINT(0 0)"));
insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
select equals(`a`,convert(`a` using utf8)) from `t1`;
+select equals(`a`,left(`a`,23)) from `t1`;
drop table t1;
--echo #
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index dd8a2d08b06..68a051f7249 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -79,6 +79,8 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql_performance_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
+ ${CMAKE_CURRENT_SOURCE_DIR}/maria_add_gis_sp.sql
+ ${CMAKE_CURRENT_SOURCE_DIR}/maria_add_gis_sp_bootstrap.sql
${FIX_PRIVILEGES_SQL}
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
)
diff --git a/scripts/maria_add_gis_sp.sql b/scripts/maria_add_gis_sp.sql
index fbaef70032f..8ddc7abd17f 100644
--- a/scripts/maria_add_gis_sp.sql
+++ b/scripts/maria_add_gis_sp.sql
@@ -13,9 +13,11 @@
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# This part created stored procedures required by the OpenGIS standards.
-# Proc privilege is needed to run it.
+-- This part creates stored procedures required by the OpenGIS standards.
+-- Proc privilege is needed to run it.
+-- To use this file, load its contents into the mysql database like that:
+-- mysql -u root -p mysql < scripts/maria_add_gis_sp.sql
SET sql_mode='';
diff --git a/scripts/maria_add_gis_sp_bootstrap.sql b/scripts/maria_add_gis_sp_bootstrap.sql
new file mode 100644
index 00000000000..063b6650efd
--- /dev/null
+++ b/scripts/maria_add_gis_sp_bootstrap.sql
@@ -0,0 +1,34 @@
+-- Copyright (C) 2014 MariaDB Ab.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; version 2 of the License.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+# This part creates stored procedures required by the OpenGIS standards.
+# script is prepared to be run with the --bootstrap server option
+
+SET sql_mode='';
+
+DROP PROCEDURE IF EXISTS AddGeometryColumn;
+DROP PROCEDURE IF EXISTS DropGeometryColumn;
+
+CREATE PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64), t_srid int)
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end;
+
+CREATE PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64))
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end;
+
+
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
index 4d3641397d0..8a3492c8756 100644
--- a/scripts/mysql_install_db.pl.in
+++ b/scripts/mysql_install_db.pl.in
@@ -348,8 +348,9 @@ if ( $opt->{srcdir} )
my $fill_help_tables = "$pkgdatadir/fill_help_tables.sql";
my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql";
my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql";
+my $maria_add_gis_sp = "$pkgdatadir/maria_add_gis_sp_bootstrap.sql";
-foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables )
+foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables,$maria_add_gis_sp )
{
-f $f or cannot_find_file($f);
}
@@ -496,6 +497,32 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") )
"The \"HELP\" command might not work properly");
}
+ # ----------------------------------------------------------------------
+ # Pipe maria_add_gis_sp.sql to "mysqld --bootstrap"
+ # ----------------------------------------------------------------------
+
+ report_verbose_wait($opt,"Creating OpenGIS required SP-s...");
+ open(SQL, $maria_add_gis_sp)
+ or error($opt,"can't open $maria_add_gis_sp for reading: $!");
+ # FIXME > /dev/null ?
+ if ( open(PIPE, "| $mysqld_install_cmd_line") )
+ {
+ print PIPE "use test;\n";
+ while ( <SQL> )
+ {
+ print PIPE $_;
+ }
+ close PIPE;
+ close SQL;
+
+ report_verbose($opt,"OK");
+ }
+ else
+ {
+ warning($opt,"OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!",
+ "GIS extentions might not work properly");
+ }
+
report_verbose($opt,"To start mysqld at boot time you have to copy",
"support-files/mysql.server to the right place " .
"for your system");
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index cce9623962d..15750ff5e90 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -307,8 +307,9 @@ fill_help_tables="$pkgdatadir/fill_help_tables.sql"
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
create_system_tables2="$pkgdatadir/mysql_performance_tables.sql"
fill_system_tables="$pkgdatadir/mysql_system_tables_data.sql"
+maria_add_gis_sp="$pkgdatadir/maria_add_gis_sp_bootstrap.sql"
-for f in "$fill_help_tables" "$create_system_tables" "$create_system_tables2" "$fill_system_tables"
+for f in "$fill_help_tables" "$create_system_tables" "$create_system_tables2" "$fill_system_tables" "$maria_add_gis_sp"
do
if test ! -f "$f"
then
@@ -469,6 +470,17 @@ else
echo "The \"HELP\" command might not work properly."
fi
+s_echo "Creating OpenGIS required SP-s..."
+if { echo "use test;"; cat "$maria_add_gis_sp"; } | mysqld_install_cmd_line > /dev/null
+then
+ s_echo "OK"
+else
+ echo
+ echo "WARNING: OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!"
+ echo "GIS extentions might not work properly."
+fi
+
+
# Don't output verbose information if running inside bootstrap or using
# --srcdir for testing. In such cases, there's no end user looking at
# the screen.
diff --git a/sql/item.cc b/sql/item.cc
index 85279b2abf1..c8a9164fd92 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5508,6 +5508,45 @@ String *Item::check_well_formed_result(String *str, bool send_error)
return str;
}
+
+/**
+ Copy a string with optional character set conversion.
+*/
+bool
+String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst,
+ CHARSET_INFO *srccs, const char *src,
+ uint32 src_length, uint32 nchars)
+{
+ if ((dst->copy(dstcs, srccs, src, src_length, nchars, this)))
+ return true; // EOM
+ if (const char *pos= well_formed_error_pos())
+ {
+ ErrConvString err(pos, src_length - (pos - src), &my_charset_bin);
+ push_warning_printf(m_thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_INVALID_CHARACTER_STRING,
+ ER(ER_INVALID_CHARACTER_STRING),
+ srccs == &my_charset_bin ?
+ dstcs->csname : srccs->csname,
+ err.ptr());
+ return m_thd->is_strict_mode();
+ }
+ if (const char *pos= cannot_convert_error_pos())
+ {
+ char buf[16];
+ int mblen= srccs->cset->charlen(srccs, (const uchar *) pos,
+ (const uchar *) src + src_length);
+ DBUG_ASSERT(mblen > 0 && mblen * 2 + 1 <= (int) sizeof(buf));
+ octet2hex(buf, pos, mblen);
+ push_warning_printf(m_thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_CANNOT_CONVERT_CHARACTER,
+ ER(ER_CANNOT_CONVERT_CHARACTER),
+ srccs->csname, buf, dstcs->csname);
+ return m_thd->is_strict_mode();
+ }
+ return false;
+}
+
+
/*
Compare two items using a given collation
diff --git a/sql/item.h b/sql/item.h
index db5a94fdb01..42468593dd8 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -531,6 +531,21 @@ class st_select_lex_unit;
class Item_func_not;
class Item_splocal;
+/**
+ String_copier that honors the current sql_mode (strict vs non strict)
+ and can send warnings.
+*/
+class String_copier_for_item: public String_copier
+{
+ THD *m_thd;
+public:
+ bool copy_with_warn(CHARSET_INFO *dstcs, String *dst,
+ CHARSET_INFO *srccs, const char *src,
+ uint32 src_length, uint32 nchars);
+ String_copier_for_item(THD *thd): m_thd(thd) { }
+};
+
+
class Item {
Item(const Item &); /* Prevent use of these */
void operator=(Item &);
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 54fc8d555c8..32b6d6348ac 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -3378,15 +3378,12 @@ String *Item_func_conv_charset::val_str(String *str)
if (use_cached_value)
return null_value ? 0 : &str_value;
String *arg= args[0]->val_str(str);
- uint dummy_errors;
- if (args[0]->null_value)
- {
- null_value=1;
- return 0;
- }
- null_value= tmp_value.copy(arg->ptr(), arg->length(), arg->charset(),
- conv_charset, &dummy_errors);
- return null_value ? 0 : check_well_formed_result(&tmp_value);
+ String_copier_for_item copier(current_thd);
+ return ((null_value= args[0]->null_value ||
+ copier.copy_with_warn(conv_charset, &tmp_value,
+ arg->charset(), arg->ptr(),
+ arg->length(), arg->length()))) ?
+ 0 : &tmp_value;
}
void Item_func_conv_charset::fix_length_and_dec()
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 171750363ed..d82e4aabb35 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2356,105 +2356,121 @@ void Item_char_typecast::print(String *str, enum_query_type query_type)
str->append(')');
}
+
+void Item_char_typecast::check_truncation_with_warn(String *src, uint dstlen)
+{
+ if (dstlen < src->length())
+ {
+ char char_type[40];
+ my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
+ cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
+ (ulong) cast_length);
+ ErrConvString err(src);
+ push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), char_type,
+ err.ptr());
+ }
+}
+
+
+String *Item_char_typecast::reuse(String *src, uint32 length)
+{
+ DBUG_ASSERT(length <= src->length());
+ check_truncation_with_warn(src, length);
+ tmp_value.set(src->ptr(), length, cast_cs);
+ return &tmp_value;
+}
+
+
+/*
+ Make a copy, to handle conversion or fix bad bytes.
+*/
+String *Item_char_typecast::copy(String *str, CHARSET_INFO *strcs)
+{
+ String_copier_for_item copier(current_thd);
+ if (copier.copy_with_warn(cast_cs, &tmp_value, strcs,
+ str->ptr(), str->length(), cast_length))
+ {
+ null_value= 1; // In strict mode: malformed data or could not convert
+ return 0;
+ }
+ check_truncation_with_warn(str, copier.source_end_pos() - str->ptr());
+ return &tmp_value;
+}
+
+
+uint Item_char_typecast::adjusted_length_with_warn(uint length)
+{
+ if (length <= current_thd->variables.max_allowed_packet)
+ return length;
+ push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WARN_ALLOWED_PACKET_OVERFLOWED,
+ ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
+ cast_cs == &my_charset_bin ?
+ "cast_as_binary" : func_name(),
+ current_thd->variables.max_allowed_packet);
+ return current_thd->variables.max_allowed_packet;
+}
+
+
String *Item_char_typecast::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res;
- uint32 length;
- if (cast_length != ~0U &&
- cast_length > current_thd->variables.max_allowed_packet)
+ if (has_explicit_length())
+ cast_length= adjusted_length_with_warn(cast_length);
+
+ if (!(res= args[0]->val_str(str)))
{
- push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
- ER_WARN_ALLOWED_PACKET_OVERFLOWED,
- ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
- cast_cs == &my_charset_bin ?
- "cast_as_binary" : func_name(),
- current_thd->variables.max_allowed_packet);
- cast_length= current_thd->variables.max_allowed_packet;
+ null_value= 1;
+ return 0;
}
- if (!charset_conversion)
+ if (cast_cs == &my_charset_bin &&
+ has_explicit_length() &&
+ cast_length > res->length())
{
- if (!(res= args[0]->val_str(str)))
+ // Special case: pad binary value with trailing 0x00
+ DBUG_ASSERT(cast_length <= current_thd->variables.max_allowed_packet);
+ if (res->alloced_length() < cast_length)
{
- null_value= 1;
- return 0;
+ str_value.alloc(cast_length);
+ str_value.copy(*res);
+ res= &str_value;
}
+ bzero((char*) res->ptr() + res->length(), cast_length - res->length());
+ res->length(cast_length);
+ res->set_charset(&my_charset_bin);
}
else
{
/*
- Convert character set if differ
from_cs is 0 in the case where the result set may vary between calls,
for example with dynamic columns.
*/
- uint dummy_errors;
- if (!(res= args[0]->val_str(str)) ||
- tmp_value.copy(res->ptr(), res->length(),
- from_cs ? from_cs : res->charset(),
- cast_cs, &dummy_errors))
- {
- null_value= 1;
- return 0;
- }
- res= &tmp_value;
- }
-
- res->set_charset(cast_cs);
-
- /*
- Cut the tail if cast with length
- and the result is longer than cast length, e.g.
- CAST('string' AS CHAR(1))
- */
- if (cast_length != ~0U)
- {
- if (res->length() > (length= (uint32) res->charpos(cast_length)))
- { // Safe even if const arg
- char char_type[40];
- my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
- cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
- (ulong) length);
-
- if (!res->alloced_length())
- { // Don't change const str
- str_value= *res; // Not malloced string
- res= &str_value;
- }
- ErrConvString err(res);
- push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
- ER_TRUNCATED_WRONG_VALUE,
- ER(ER_TRUNCATED_WRONG_VALUE), char_type,
- err.ptr());
- res->length((uint) length);
- }
- else if (cast_cs == &my_charset_bin && res->length() < cast_length)
+ CHARSET_INFO *cs= from_cs ? from_cs : res->charset();
+ if (!charset_conversion)
{
- if (res->alloced_length() < cast_length)
+ // Try to reuse the original string (if well formed).
+ MY_STRCOPY_STATUS status;
+ cs->cset->well_formed_char_length(cs, res->ptr(), res->end(),
+ cast_length, &status);
+ if (!status.m_well_formed_error_pos)
{
- str_value.alloc(cast_length);
- str_value.copy(*res);
- res= &str_value;
+ res= reuse(res, status.m_source_end_pos - res->ptr());
}
- bzero((char*) res->ptr() + res->length(), cast_length - res->length());
- res->length(cast_length);
+ goto end;
}
+ // Character set conversion, or bad bytes were found.
+ if (!(res= copy(res, cs)))
+ return 0;
}
- null_value= 0;
- if (res->length() > current_thd->variables.max_allowed_packet)
- {
- push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
- ER_WARN_ALLOWED_PACKET_OVERFLOWED,
- ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
- cast_cs == &my_charset_bin ?
- "cast_as_binary" : func_name(),
- current_thd->variables.max_allowed_packet);
- null_value= 1;
- return 0;
- }
- return res;
+end:
+ return ((null_value= (res->length() >
+ adjusted_length_with_warn(res->length())))) ? 0 : res;
}
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 8438119ddc6..e7a37ed7bb1 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -886,6 +886,11 @@ class Item_char_typecast :public Item_str_func
CHARSET_INFO *cast_cs, *from_cs;
bool charset_conversion;
String tmp_value;
+ bool has_explicit_length() const { return cast_length != ~0U; }
+ String *reuse(String *src, uint32 length);
+ String *copy(String *src, CHARSET_INFO *cs);
+ uint adjusted_length_with_warn(uint length);
+ void check_truncation_with_warn(String *src, uint dstlen);
public:
Item_char_typecast(Item *a, uint length_arg, CHARSET_INFO *cs_arg)
:Item_str_func(a), cast_length(length_arg), cast_cs(cs_arg) {}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index ad9d8f317e6..650610fab84 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -428,8 +428,12 @@ inline int idempotent_error_code(int err_code)
inline int ignored_error_code(int err_code)
{
- return ((err_code == ER_SLAVE_IGNORED_TABLE) ||
- (use_slave_mask && bitmap_is_set(&slave_error_mask, err_code)));
+ if (use_slave_mask && bitmap_is_set(&slave_error_mask, err_code))
+ {
+ statistic_increment(slave_skipped_errors, LOCK_status);
+ return 1;
+ }
+ return err_code == ER_SLAVE_IGNORED_TABLE;
}
/*
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ccd291cf226..f33df61a0ce 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -519,6 +519,7 @@ ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
ulong max_connections, max_connect_errors;
ulong extra_max_connections;
ulong slave_retried_transactions;
+ulonglong slave_skipped_errors;
ulong feature_files_opened_with_delayed_keys;
ulonglong denied_connections;
my_decimal decimal_zero;
@@ -8217,6 +8218,9 @@ SHOW_VAR status_vars[]= {
{"Key", (char*) &show_default_keycache, SHOW_FUNC},
{"Last_query_cost", (char*) offsetof(STATUS_VAR, last_query_cost), SHOW_DOUBLE_STATUS},
{"Max_statement_time_exceeded", (char*) offsetof(STATUS_VAR, max_statement_time_exceeded), SHOW_LONG_STATUS},
+ {"Master_gtid_wait_count", (char*) offsetof(STATUS_VAR, master_gtid_wait_count), SHOW_LONGLONG_STATUS},
+ {"Master_gtid_wait_timeouts", (char*) offsetof(STATUS_VAR, master_gtid_wait_timeouts), SHOW_LONGLONG_STATUS},
+ {"Master_gtid_wait_time", (char*) offsetof(STATUS_VAR, master_gtid_wait_time), SHOW_LONGLONG_STATUS},
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
{"Memory_used", (char*) &show_memory_used, SHOW_SIMPLE_FUNC},
{"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use, SHOW_LONG_NOFLUSH},
@@ -8259,6 +8263,7 @@ SHOW_VAR status_vars[]= {
{"Slave_received_heartbeats",(char*) &show_slave_received_heartbeats, SHOW_SIMPLE_FUNC},
{"Slave_retried_transactions",(char*)&slave_retried_transactions, SHOW_LONG},
{"Slave_running", (char*) &show_slave_running, SHOW_SIMPLE_FUNC},
+ {"Slave_skipped_errors", (char*) &slave_skipped_errors, SHOW_LONGLONG},
#endif
{"Slow_launch_threads", (char*) &slow_launch_threads, SHOW_LONG},
{"Slow_queries", (char*) offsetof(STATUS_VAR, long_query_count), SHOW_LONG_STATUS},
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index 92dba552a57..1dc6a2720ad 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -1995,10 +1995,14 @@ gtid_waiting::wait_for_pos(THD *thd, String *gtid_str, longlong timeout_us)
rpl_gtid *wait_pos;
uint32 count, i;
struct timespec wait_until, *wait_until_ptr;
+ ulonglong before;
/* Wait for the empty position returns immediately. */
if (gtid_str->length() == 0)
+ {
+ status_var_increment(thd->status_var.master_gtid_wait_count);
return 0;
+ }
if (!(wait_pos= gtid_parse_string_to_list(gtid_str->ptr(), gtid_str->length(),
&count)))
@@ -2006,6 +2010,8 @@ gtid_waiting::wait_for_pos(THD *thd, String *gtid_str, longlong timeout_us)
my_error(ER_INCORRECT_GTID_STATE, MYF(0));
return 1;
}
+ status_var_increment(thd->status_var.master_gtid_wait_count);
+ before= microsecond_interval_timer();
if (timeout_us >= 0)
{
@@ -2020,6 +2026,15 @@ gtid_waiting::wait_for_pos(THD *thd, String *gtid_str, longlong timeout_us)
if ((err= wait_for_gtid(thd, &wait_pos[i], wait_until_ptr)))
break;
}
+ switch (err)
+ {
+ case -1:
+ status_var_increment(thd->status_var.master_gtid_wait_timeouts);
+ /* Deliberate fall through. */
+ case 0:
+ status_var_add(thd->status_var.master_gtid_wait_time,
+ microsecond_interval_timer() - before);
+ }
my_free(wait_pos);
return err;
}
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 6b09b4cf769..9dff16b2be1 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7125,3 +7125,5 @@ ER_ROLE_CREATE_EXISTS
eng "Can't create role '%-.64s'; it already exists"
ER_ROLE_DROP_EXISTS
eng "Can't drop role '%-.64s'; it doesn't exist"
+ER_CANNOT_CONVERT_CHARACTER
+ eng "Cannot convert '%s' character 0x%-.64s to '%s'"
diff --git a/sql/slave.h b/sql/slave.h
index e16f801b577..fc48476a6d8 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -130,6 +130,7 @@ extern my_bool opt_log_slave_updates;
extern char *opt_slave_skip_errors;
extern my_bool opt_replicate_annotate_row_events;
extern ulonglong relay_log_space_limit;
+extern ulonglong slave_skipped_errors;
/*
3 possible values for Master_info::slave_running and
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 47426693d3b..44e4be74695 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -738,6 +738,11 @@ typedef struct system_status_var
ulong feature_trigger; /* +1 opening a table with triggers */
ulong feature_xml; /* +1 when XPATH is used */
+ /* From MASTER_GTID_WAIT usage */
+ ulonglong master_gtid_wait_timeouts; /* Number of timeouts */
+ ulonglong master_gtid_wait_time; /* Time in microseconds */
+ ulonglong master_gtid_wait_count;
+
ulong empty_queries;
ulong access_denied_errors;
ulong lost_connections;
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 4a23d65d6a8..518b8e5ba4b 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -200,6 +200,7 @@ public:
inline bool is_empty() const { return (str_length == 0); }
inline void mark_as_const() { Alloced_length= 0;}
inline const char *ptr() const { return Ptr; }
+ inline const char *end() const { return Ptr + str_length; }
inline char *c_ptr()
{
DBUG_ASSERT(!alloced || !Ptr || !Alloced_length ||
@@ -423,6 +424,17 @@ public:
{
return copy(str->ptr(), str->length(), str->charset(), tocs, errors);
}
+ bool copy(CHARSET_INFO *tocs,
+ CHARSET_INFO *fromcs, const char *src, uint32 src_length,
+ uint32 nchars, String_copier *copier)
+ {
+ if (alloc(tocs->mbmaxlen * src_length))
+ return true;
+ str_length= copier->well_formed_copy(tocs, Ptr, Alloced_length,
+ fromcs, src, src_length, nchars);
+ str_charset= tocs;
+ return false;
+ }
void move(String &s)
{
free();
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 10d49bb3798..8e9a9f55a5f 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -209,12 +209,10 @@ fil_crypt_get_key(byte *dst, uint* key_length,
fil_space_crypt_t* crypt_data, uint version, bool page_encrypted)
{
unsigned char keybuf[MY_AES_MAX_KEY_LENGTH];
- unsigned char iv[CRYPT_SCHEME_1_IV_LEN];
- ulint iv_len = sizeof(iv);
- if (!page_encrypted) {
- mutex_enter(&crypt_data->mutex);
+ mutex_enter(&crypt_data->mutex);
+ if (!page_encrypted) {
// Check if we already have key
for (uint i = 0; i < crypt_data->key_count; i++) {
if (crypt_data->keys[i].key_version == version) {
@@ -232,29 +230,18 @@ fil_crypt_get_key(byte *dst, uint* key_length,
crypt_data->keys[i] = crypt_data->keys[i - 1];
}
}
- else
- {
- // load iv
-
- int rc = get_encryption_iv(version, (unsigned char*)iv, iv_len);
-
- if (rc != CRYPT_KEY_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "IV %d can not be found. Reason=%d", version, rc);
- ut_error;
- }
- }
if (has_encryption_key(version)) {
- *key_length = get_encryption_key_size(version);
+ int rc;
+ *key_length = get_encryption_key_size(version);
- int rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
+ rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
- if (rc != CRYPT_KEY_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Key %d can not be found. Reason=%d", version, rc);
- ut_error;
- }
+ if (rc != CRYPT_KEY_OK) {
+ ib_logf(IB_LOG_LEVEL_FATAL,
+ "Key %d can not be found. Reason=%d", version, rc);
+ ut_error;
+ }
} else {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d not found", version);
@@ -265,51 +252,48 @@ fil_crypt_get_key(byte *dst, uint* key_length,
// do ctr key initialization
if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
{
- // Now compute L by encrypting IV using this key
- const unsigned char* src = page_encrypted ? iv : crypt_data->iv;
- const int srclen = page_encrypted ? iv_len : crypt_data->iv_length;
- unsigned char* buf = page_encrypted ? keybuf : crypt_data->keys[0].key;
- uint32 buflen = page_encrypted ? *key_length : sizeof(crypt_data->keys[0].key);
-
- // call ecb explicit
- my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
- int rc = (*func)(src, srclen,
- buf, &buflen,
- (unsigned char*)keybuf, *key_length,
- NULL, 0,
- 1);
-
- if (rc != AES_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to encrypt key-block "
- " src: %p srclen: %d buf: %p buflen: %d."
- " return-code: %d. Can't continue!\n",
- src, srclen, buf, buflen, rc);
- ut_error;
- }
-
- if (!page_encrypted) {
- crypt_data->keys[0].key_version = version;
- crypt_data->key_count++;
-
- if (crypt_data->key_count > array_elements(crypt_data->keys)) {
- crypt_data->key_count = array_elements(crypt_data->keys);
- }
- }
-
- // set the key size to the aes block size because this encrypted data is the key
- *key_length = MY_AES_BLOCK_SIZE;
- memcpy(dst, buf, buflen);
- }
- else
- {
- // otherwise keybuf contains the right key
- memcpy(dst, keybuf, *key_length);
- }
+ /* Now compute L by encrypting IV using this key. Note
+ that we use random IV from crypt data. */
+ const unsigned char* src = crypt_data->iv;
+ const int srclen = crypt_data->iv_length;
+ unsigned char* buf = page_encrypted ? keybuf : crypt_data->keys[0].key;
+ uint32 buflen = page_encrypted ? *key_length : sizeof(crypt_data->keys[0].key);
+
+ // call ecb explicit
+ my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
+ int rc = (*func)(src, srclen,
+ buf, &buflen,
+ (unsigned char*)keybuf, *key_length,
+ NULL, 0,
+ 1);
+
+ if (rc != AES_OK) {
+ ib_logf(IB_LOG_LEVEL_FATAL,
+ "Unable to encrypt key-block "
+ " src: %p srclen: %d buf: %p buflen: %d."
+ " return-code: %d. Can't continue!\n",
+ src, srclen, buf, buflen, rc);
+ ut_error;
+ }
- if (!page_encrypted) {
- mutex_exit(&crypt_data->mutex);
+ if (!page_encrypted) {
+ crypt_data->keys[0].key_version = version;
+ crypt_data->key_count++;
+
+ if (crypt_data->key_count > array_elements(crypt_data->keys)) {
+ crypt_data->key_count = array_elements(crypt_data->keys);
+ }
+ }
+
+ // set the key size to the aes block size because this encrypted data is the key
+ *key_length = MY_AES_BLOCK_SIZE;
+ memcpy(dst, buf, buflen);
+ } else {
+ // otherwise keybuf contains the right key
+ memcpy(dst, keybuf, *key_length);
}
+
+ mutex_exit(&crypt_data->mutex);
}
/******************************************************************
@@ -324,14 +308,12 @@ fil_crypt_get_latest_key(byte *dst, uint* key_length,
int rc = get_latest_encryption_key_version();
// if no new key was created use the last one
- if (rc >= 0)
- {
- *version = rc;
+ if (rc >= 0) {
+ *version = rc;
}
-
- return fil_crypt_get_key(dst, key_length, crypt_data, *version, false);
}
- return fil_crypt_get_key(dst, key_length, NULL, *version, true);
+
+ return fil_crypt_get_key(dst, key_length, crypt_data, *version, srv_encrypt_tables == FALSE);
}
/******************************************************************
@@ -355,7 +337,7 @@ fil_space_create_crypt_data()
}
mutex_create(fil_crypt_data_mutex_key,
- &crypt_data->mutex, SYNC_NO_ORDER_CHECK);
+ &crypt_data->mutex, SYNC_NO_ORDER_CHECK);
crypt_data->iv_length = iv_length;
my_random_bytes(crypt_data->iv, iv_length);
return crypt_data;
@@ -429,6 +411,7 @@ fil_space_read_crypt_data(ulint space, const byte* page, ulint offset)
}
ulint iv_length = mach_read_from_1(page + offset + MAGIC_SZ + 1);
+
if (! (iv_length == CRYPT_SCHEME_1_IV_LEN)) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Found non sensible iv length: %lu for space %lu "
@@ -510,6 +493,9 @@ fil_space_write_crypt_data_low(fil_space_crypt_t *crypt_data,
mlog_write_ulint(page + offset + MAGIC_SZ + 2 + len, min_key_version,
MLOG_4BYTES, mtr);
+ DBUG_EXECUTE_IF("ib_file_crypt_redo_crash_1",
+ ut_error;);
+
byte* log_ptr = mlog_open(mtr, 11 + 12 + len);
if (log_ptr != NULL) {
log_ptr = mlog_write_initial_log_record_fast(
@@ -530,6 +516,9 @@ fil_space_write_crypt_data_low(fil_space_crypt_t *crypt_data,
mlog_catenate_string(mtr, crypt_data->iv, len);
}
+
+ DBUG_EXECUTE_IF("ib_file_crypt_redo_crash_2",
+ ut_error;);
}
/******************************************************************
@@ -540,6 +529,7 @@ fil_space_write_crypt_data(ulint space, byte* page, ulint offset,
ulint maxsize, mtr_t* mtr)
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
return;
}
@@ -562,8 +552,10 @@ fil_parse_write_crypt_data(byte* ptr, byte* end_ptr,
1 + // size of type
1 + // size of iv-len
4; // size of min_key_version
- if (end_ptr - ptr < entry_size)
+
+ if (end_ptr - ptr < entry_size){
return NULL;
+ }
ulint space_id = mach_read_from_4(ptr);
ptr += 4;
@@ -580,8 +572,9 @@ fil_parse_write_crypt_data(byte* ptr, byte* end_ptr,
uint min_key_version = mach_read_from_4(ptr);
ptr += 4;
- if (end_ptr - ptr < len)
+ if (end_ptr - ptr < len) {
return NULL;
+ }
fil_space_crypt_t* crypt_data = fil_space_create_crypt_data();
crypt_data->page0_offset = offset;
@@ -624,11 +617,14 @@ fil_space_check_encryption_write(
return false;
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL)
+
+ if (crypt_data == NULL) {
return false;
+ }
- if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED)
+ if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
return false;
+ }
return true;
}
@@ -640,15 +636,16 @@ void
fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
const byte* src_frame, ulint zip_size, byte* dst_frame, ulint encryption_key)
{
- fil_space_crypt_t* crypt_data;
+ fil_space_crypt_t* crypt_data=NULL;
ulint page_size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;
// get key (L)
- uint key_version;
+ uint key_version = encryption_key;
byte key[MY_AES_MAX_KEY_LENGTH];
- uint key_length;
+ uint key_length=MY_AES_MAX_KEY_LENGTH;
ulint orig_page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
+
if (orig_page_type==FIL_PAGE_TYPE_FSP_HDR
|| orig_page_type==FIL_PAGE_TYPE_XDES
|| orig_page_type== FIL_PAGE_PAGE_ENCRYPTED
@@ -658,49 +655,32 @@ fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
return;
}
- if (srv_encrypt_tables) {
- crypt_data = fil_space_get_crypt_data(space);
+ /* Get crypt data from file space */
+ crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL) {
- //TODO: Is this really needed ?
- memcpy(dst_frame, src_frame, page_size);
- return;
- }
-
- fil_crypt_get_latest_key(key, &key_length, crypt_data, &key_version);
- } else {
- key_version = encryption_key;
- fil_crypt_get_latest_key(key, &key_length, NULL, (uint*)&key_version);
+ if (crypt_data == NULL) {
+ //TODO: Is this really needed ?
+ memcpy(dst_frame, src_frame, page_size);
+ return;
}
+ fil_crypt_get_latest_key(key, &key_length, crypt_data, &key_version);
/* Load the iv or counter (depending to the encryption algorithm used) */
unsigned char iv[MY_AES_BLOCK_SIZE];
- if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
- {
- // create counter block (C)
- mach_write_to_4(iv + 0, space);
- ulint space_offset = mach_read_from_4(
- src_frame + FIL_PAGE_OFFSET);
- mach_write_to_4(iv + 4, space_offset);
- mach_write_to_8(iv + 8, lsn);
+ if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR) {
+ // create counter block (C)
+ mach_write_to_4(iv + 0, space);
+ ulint space_offset = mach_read_from_4(
+ src_frame + FIL_PAGE_OFFSET);
+ mach_write_to_4(iv + 4, space_offset);
+ mach_write_to_8(iv + 8, lsn);
} else {
- // take the iv from the key provider
-
- int load_iv_rc = get_encryption_iv(key_version, (uchar *) iv, sizeof(iv));
-
- // if the iv can not be loaded the whole page can not be encrypted
- if (load_iv_rc != CRYPT_KEY_OK)
- {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to decrypt data-block. "
- " Can not load iv for key %d"
- " return-code: %d. Can't continue!\n",
- key_version, load_iv_rc);
-
- ut_error;
- }
+ // Get random IV from crypt_data
+ mutex_enter(&crypt_data->mutex);
+ memcpy(iv, crypt_data->iv, crypt_data->iv_length);
+ mutex_exit(&crypt_data->mutex);
}
ibool page_compressed = (mach_read_from_2(src_frame+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED);
@@ -710,7 +690,6 @@ fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
// copy page header
memcpy(dst_frame, src_frame, FIL_PAGE_DATA);
-
if (page_encrypted && !page_compressed) {
// key id
mach_write_to_2(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
@@ -816,11 +795,13 @@ fil_space_check_encryption_read(
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL)
+ if (crypt_data == NULL) {
return false;
+ }
- if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED)
+ if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
return false;
+ }
return true;
}
@@ -882,29 +863,17 @@ fil_space_decrypt(fil_space_crypt_t* crypt_data,
// get the iv
unsigned char iv[MY_AES_BLOCK_SIZE];
- if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
- {
- // create counter block
+ if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR) {
+ // create counter block
- mach_write_to_4(iv + 0, space);
- mach_write_to_4(iv + 4, offset);
- mach_write_to_8(iv + 8, lsn);
+ mach_write_to_4(iv + 0, space);
+ mach_write_to_4(iv + 4, offset);
+ mach_write_to_8(iv + 8, lsn);
} else {
- // take the iv from the key provider
-
- int load_iv_rc = get_encryption_iv(key_version, (uchar *) iv, sizeof(iv));
-
- // if the iv can not be loaded the whole page can not be decrypted
- if (load_iv_rc != CRYPT_KEY_OK)
- {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to decrypt data-block. "
- " Can not load iv for key %d"
- " return-code: %d. Can't continue!\n",
- key_version, load_iv_rc);
-
- return AES_KEY_CREATION_FAILED;
- }
+ // Get random IV from crypt_data
+ mutex_enter(&crypt_data->mutex);
+ memcpy(iv, crypt_data->iv, crypt_data->iv_length);
+ mutex_exit(&crypt_data->mutex);
}
const byte* src = src_frame + FIL_PAGE_DATA;
@@ -1016,6 +985,7 @@ fil_space_verify_crypt_checksum(const byte* src_frame, ulint zip_size)
* srv_checksum_algorithm */
srv_checksum_algorithm_t save_checksum_algorithm =
(srv_checksum_algorithm_t)srv_checksum_algorithm;
+
if (zip_size == 0 &&
(save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB ||
save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB)) {
@@ -1100,8 +1070,9 @@ fil_crypt_needs_rotation(uint key_version, const key_state_t *key_state)
/* this is rotation encrypted => encrypted,
* only reencrypt if key is sufficiently old */
- if (key_version + key_state->rotate_key_age < key_state->key_version)
+ if (key_version + key_state->rotate_key_age < key_state->key_version) {
return true;
+ }
return false;
}
@@ -1131,6 +1102,7 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data != NULL || fil_crypt_start_converting) {
/* someone beat us to it */
if (fil_crypt_start_converting)
@@ -1168,8 +1140,9 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
do
{
if (fil_crypt_is_closing(space) ||
- fil_tablespace_is_being_deleted(space))
+ fil_tablespace_is_being_deleted(space)) {
break;
+ }
mtr_t mtr;
mtr_start(&mtr);
@@ -1231,8 +1204,9 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
!fil_tablespace_is_being_deleted(space));
/* try to reacquire pending op */
- if (fil_inc_pending_ops(space, true))
+ if (fil_inc_pending_ops(space, true)) {
break;
+ }
/* pending op reacquired! */
pending_op = true;
@@ -1275,8 +1249,9 @@ static bool
fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
bool *recheck)
{
- if (fil_space_get_type(space) != FIL_TABLESPACE)
+ if (fil_space_get_type(space) != FIL_TABLESPACE) {
return false;
+ }
if (fil_inc_pending_ops(space, true)) {
/* tablespace being dropped */
@@ -1287,6 +1262,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
bool pending_op = true;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
/**
* space has no crypt data
@@ -1294,6 +1270,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
*/
pending_op = fil_crypt_start_encrypting_space(space, recheck);
crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
if (pending_op) {
fil_decr_pending_ops(space);
@@ -1303,6 +1280,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
}
mutex_enter(&crypt_data->mutex);
+
do {
/* prevent threads from starting to rotate space */
if (crypt_data->rotate_state.starting) {
@@ -1312,11 +1290,13 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
}
/* prevent threads from starting to rotate space */
- if (crypt_data->closing)
+ if (crypt_data->closing) {
break;
+ }
- if (crypt_data->rotate_state.flushing)
+ if (crypt_data->rotate_state.flushing) {
break;
+ }
bool need_key_rotation = fil_crypt_needs_rotation(
crypt_data->min_key_version, key_state);
@@ -1335,9 +1315,11 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
} while (0);
mutex_exit(&crypt_data->mutex);
+
if (pending_op) {
fil_decr_pending_ops(space);
}
+
return false;
}
@@ -1409,6 +1391,7 @@ fil_crypt_alloc_iops(rotate_thread_t *state)
uint max_iops = state->estimated_max_iops;
mutex_enter(&fil_crypt_threads_mutex);
+
if (n_fil_crypt_iops_allocated >= srv_n_fil_crypt_iops) {
/* this can happen when user decreases srv_fil_crypt_iops */
mutex_exit(&fil_crypt_threads_mutex);
@@ -1416,8 +1399,10 @@ fil_crypt_alloc_iops(rotate_thread_t *state)
}
uint alloc = srv_n_fil_crypt_iops - n_fil_crypt_iops_allocated;
- if (alloc > max_iops)
+
+ if (alloc > max_iops) {
alloc = max_iops;
+ }
n_fil_crypt_iops_allocated += alloc;
mutex_exit(&fil_crypt_threads_mutex);
@@ -1447,8 +1432,9 @@ fil_crypt_realloc_iops(rotate_thread_t *state)
state->estimated_max_iops,
1000000 / avg_wait_time_us);
#endif
- if (avg_wait_time_us == 0)
+ if (avg_wait_time_us == 0) {
avg_wait_time_us = 1; // prevent division by zero
+ }
state->estimated_max_iops = 1000000 / avg_wait_time_us;
state->cnt_waited = 0;
@@ -1596,7 +1582,9 @@ fil_crypt_start_rotate_space(
{
ulint space = state->space;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
mutex_enter(&crypt_data->mutex);
+
if (crypt_data->rotate_state.active_threads == 0) {
/* only first thread needs to init */
crypt_data->rotate_state.next_offset = 1; // skip page 0
@@ -1637,7 +1625,9 @@ fil_crypt_find_page_to_rotate(
ulint batch = srv_alloc_time * state->allocated_iops;
ulint space = state->space;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
mutex_enter(&crypt_data->mutex);
+
if (crypt_data->closing == false &&
crypt_data->rotate_state.next_offset <
crypt_data->rotate_state.max_offset) {
@@ -1731,6 +1721,7 @@ fil_crypt_get_page_throttle_func(rotate_thread_t *state,
ulint add_sleeptime_ms = 0;
ulint avg_wait_time_us = state->sum_waited_us / state->cnt_waited;
ulint alloc_wait_us = 1000000 / state->allocated_iops;
+
if (avg_wait_time_us < alloc_wait_us) {
/* we reading faster than we allocated */
add_sleeptime_ms = (alloc_wait_us - avg_wait_time_us) / 1000;
@@ -1811,8 +1802,9 @@ fil_crypt_rotate_page(
ulint sleeptime_ms = 0;
/* check if tablespace is closing before reading page */
- if (fil_crypt_is_closing(space))
+ if (fil_crypt_is_closing(space)) {
return;
+ }
if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) {
/* don't encrypt this as it contains address to dblwr buffer */
@@ -1959,6 +1951,7 @@ fil_crypt_rotate_pages(
{
ulint space = state->space;
ulint end = state->offset + state->batch;
+
for (; state->offset < end; state->offset++) {
/* we can't rotate pages in dblwr buffer as
@@ -1988,17 +1981,21 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
/* flush tablespace pages so that there are no pages left with old key */
lsn_t end_lsn = crypt_data->rotate_state.end_lsn;
+
if (end_lsn > 0 && !fil_crypt_is_closing(space)) {
bool success = false;
ulint n_pages = 0;
ulint sum_pages = 0;
ullint start = ut_time_us(NULL);
+
do {
success = buf_flush_list(ULINT_MAX, end_lsn, &n_pages);
buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
sum_pages += n_pages;
} while (!success && !fil_crypt_is_closing(space));
+
ullint end = ut_time_us(NULL);
+
if (sum_pages && end > start) {
state->cnt_waited += sum_pages;
state->sum_waited_us += (end - start);
@@ -2142,6 +2139,7 @@ DECLARE_THREAD(fil_crypt_thread)(
fil_crypt_get_key_state(&new_state);
time_t wait_start = time(0);
+
while (!thr.should_shutdown() && key_state == new_state) {
/* wait for key state changes
@@ -2159,8 +2157,10 @@ DECLARE_THREAD(fil_crypt_thread)(
}
time_t waited = time(0) - wait_start;
- if (waited >= srv_background_scrub_data_check_interval)
+
+ if (waited >= srv_background_scrub_data_check_interval) {
break;
+ }
}
recheck = false;
@@ -2223,7 +2223,8 @@ DECLARE_THREAD(fil_crypt_thread)(
Adjust thread count for key rotation */
UNIV_INTERN
void
-fil_crypt_set_thread_cnt(uint new_cnt) {
+fil_crypt_set_thread_cnt(uint new_cnt)
+{
if (new_cnt > srv_n_fil_crypt_threads) {
uint add = new_cnt - srv_n_fil_crypt_threads;
srv_n_fil_crypt_threads = new_cnt;
@@ -2305,6 +2306,7 @@ fil_space_crypt_mark_space_closing(
{
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
mutex_exit(&fil_crypt_threads_mutex);
return;
@@ -2325,6 +2327,7 @@ fil_space_crypt_close_tablespace(
{
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
mutex_exit(&fil_crypt_threads_mutex);
return;
@@ -2351,6 +2354,7 @@ fil_space_crypt_close_tablespace(
flushing = crypt_data->rotate_state.flushing;
uint now = time(0);
+
if (now >= last + 30) {
ib_logf(IB_LOG_LEVEL_WARN,
"Waited %u seconds to drop space: %lu.",
@@ -2358,6 +2362,7 @@ fil_space_crypt_close_tablespace(
last = now;
}
}
+
mutex_exit(&crypt_data->mutex);
}
@@ -2424,6 +2429,7 @@ fil_space_get_scrub_status(
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(id);
memset(status, 0, sizeof(*status));
+
if (crypt_data != NULL) {
status->space = id;
status->compressed = fil_space_get_zip_size(id) > 0;
diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc
index 10d49bb3798..8e9a9f55a5f 100644
--- a/storage/xtradb/fil/fil0crypt.cc
+++ b/storage/xtradb/fil/fil0crypt.cc
@@ -209,12 +209,10 @@ fil_crypt_get_key(byte *dst, uint* key_length,
fil_space_crypt_t* crypt_data, uint version, bool page_encrypted)
{
unsigned char keybuf[MY_AES_MAX_KEY_LENGTH];
- unsigned char iv[CRYPT_SCHEME_1_IV_LEN];
- ulint iv_len = sizeof(iv);
- if (!page_encrypted) {
- mutex_enter(&crypt_data->mutex);
+ mutex_enter(&crypt_data->mutex);
+ if (!page_encrypted) {
// Check if we already have key
for (uint i = 0; i < crypt_data->key_count; i++) {
if (crypt_data->keys[i].key_version == version) {
@@ -232,29 +230,18 @@ fil_crypt_get_key(byte *dst, uint* key_length,
crypt_data->keys[i] = crypt_data->keys[i - 1];
}
}
- else
- {
- // load iv
-
- int rc = get_encryption_iv(version, (unsigned char*)iv, iv_len);
-
- if (rc != CRYPT_KEY_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "IV %d can not be found. Reason=%d", version, rc);
- ut_error;
- }
- }
if (has_encryption_key(version)) {
- *key_length = get_encryption_key_size(version);
+ int rc;
+ *key_length = get_encryption_key_size(version);
- int rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
+ rc = get_encryption_key(version, (unsigned char*)keybuf, *key_length);
- if (rc != CRYPT_KEY_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Key %d can not be found. Reason=%d", version, rc);
- ut_error;
- }
+ if (rc != CRYPT_KEY_OK) {
+ ib_logf(IB_LOG_LEVEL_FATAL,
+ "Key %d can not be found. Reason=%d", version, rc);
+ ut_error;
+ }
} else {
ib_logf(IB_LOG_LEVEL_FATAL,
"Key %d not found", version);
@@ -265,51 +252,48 @@ fil_crypt_get_key(byte *dst, uint* key_length,
// do ctr key initialization
if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
{
- // Now compute L by encrypting IV using this key
- const unsigned char* src = page_encrypted ? iv : crypt_data->iv;
- const int srclen = page_encrypted ? iv_len : crypt_data->iv_length;
- unsigned char* buf = page_encrypted ? keybuf : crypt_data->keys[0].key;
- uint32 buflen = page_encrypted ? *key_length : sizeof(crypt_data->keys[0].key);
-
- // call ecb explicit
- my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
- int rc = (*func)(src, srclen,
- buf, &buflen,
- (unsigned char*)keybuf, *key_length,
- NULL, 0,
- 1);
-
- if (rc != AES_OK) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to encrypt key-block "
- " src: %p srclen: %d buf: %p buflen: %d."
- " return-code: %d. Can't continue!\n",
- src, srclen, buf, buflen, rc);
- ut_error;
- }
-
- if (!page_encrypted) {
- crypt_data->keys[0].key_version = version;
- crypt_data->key_count++;
-
- if (crypt_data->key_count > array_elements(crypt_data->keys)) {
- crypt_data->key_count = array_elements(crypt_data->keys);
- }
- }
-
- // set the key size to the aes block size because this encrypted data is the key
- *key_length = MY_AES_BLOCK_SIZE;
- memcpy(dst, buf, buflen);
- }
- else
- {
- // otherwise keybuf contains the right key
- memcpy(dst, keybuf, *key_length);
- }
+ /* Now compute L by encrypting IV using this key. Note
+ that we use random IV from crypt data. */
+ const unsigned char* src = crypt_data->iv;
+ const int srclen = crypt_data->iv_length;
+ unsigned char* buf = page_encrypted ? keybuf : crypt_data->keys[0].key;
+ uint32 buflen = page_encrypted ? *key_length : sizeof(crypt_data->keys[0].key);
+
+ // call ecb explicit
+ my_aes_encrypt_dynamic_type func = get_aes_encrypt_func(MY_AES_ALGORITHM_ECB);
+ int rc = (*func)(src, srclen,
+ buf, &buflen,
+ (unsigned char*)keybuf, *key_length,
+ NULL, 0,
+ 1);
+
+ if (rc != AES_OK) {
+ ib_logf(IB_LOG_LEVEL_FATAL,
+ "Unable to encrypt key-block "
+ " src: %p srclen: %d buf: %p buflen: %d."
+ " return-code: %d. Can't continue!\n",
+ src, srclen, buf, buflen, rc);
+ ut_error;
+ }
- if (!page_encrypted) {
- mutex_exit(&crypt_data->mutex);
+ if (!page_encrypted) {
+ crypt_data->keys[0].key_version = version;
+ crypt_data->key_count++;
+
+ if (crypt_data->key_count > array_elements(crypt_data->keys)) {
+ crypt_data->key_count = array_elements(crypt_data->keys);
+ }
+ }
+
+ // set the key size to the aes block size because this encrypted data is the key
+ *key_length = MY_AES_BLOCK_SIZE;
+ memcpy(dst, buf, buflen);
+ } else {
+ // otherwise keybuf contains the right key
+ memcpy(dst, keybuf, *key_length);
}
+
+ mutex_exit(&crypt_data->mutex);
}
/******************************************************************
@@ -324,14 +308,12 @@ fil_crypt_get_latest_key(byte *dst, uint* key_length,
int rc = get_latest_encryption_key_version();
// if no new key was created use the last one
- if (rc >= 0)
- {
- *version = rc;
+ if (rc >= 0) {
+ *version = rc;
}
-
- return fil_crypt_get_key(dst, key_length, crypt_data, *version, false);
}
- return fil_crypt_get_key(dst, key_length, NULL, *version, true);
+
+ return fil_crypt_get_key(dst, key_length, crypt_data, *version, srv_encrypt_tables == FALSE);
}
/******************************************************************
@@ -355,7 +337,7 @@ fil_space_create_crypt_data()
}
mutex_create(fil_crypt_data_mutex_key,
- &crypt_data->mutex, SYNC_NO_ORDER_CHECK);
+ &crypt_data->mutex, SYNC_NO_ORDER_CHECK);
crypt_data->iv_length = iv_length;
my_random_bytes(crypt_data->iv, iv_length);
return crypt_data;
@@ -429,6 +411,7 @@ fil_space_read_crypt_data(ulint space, const byte* page, ulint offset)
}
ulint iv_length = mach_read_from_1(page + offset + MAGIC_SZ + 1);
+
if (! (iv_length == CRYPT_SCHEME_1_IV_LEN)) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Found non sensible iv length: %lu for space %lu "
@@ -510,6 +493,9 @@ fil_space_write_crypt_data_low(fil_space_crypt_t *crypt_data,
mlog_write_ulint(page + offset + MAGIC_SZ + 2 + len, min_key_version,
MLOG_4BYTES, mtr);
+ DBUG_EXECUTE_IF("ib_file_crypt_redo_crash_1",
+ ut_error;);
+
byte* log_ptr = mlog_open(mtr, 11 + 12 + len);
if (log_ptr != NULL) {
log_ptr = mlog_write_initial_log_record_fast(
@@ -530,6 +516,9 @@ fil_space_write_crypt_data_low(fil_space_crypt_t *crypt_data,
mlog_catenate_string(mtr, crypt_data->iv, len);
}
+
+ DBUG_EXECUTE_IF("ib_file_crypt_redo_crash_2",
+ ut_error;);
}
/******************************************************************
@@ -540,6 +529,7 @@ fil_space_write_crypt_data(ulint space, byte* page, ulint offset,
ulint maxsize, mtr_t* mtr)
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
return;
}
@@ -562,8 +552,10 @@ fil_parse_write_crypt_data(byte* ptr, byte* end_ptr,
1 + // size of type
1 + // size of iv-len
4; // size of min_key_version
- if (end_ptr - ptr < entry_size)
+
+ if (end_ptr - ptr < entry_size){
return NULL;
+ }
ulint space_id = mach_read_from_4(ptr);
ptr += 4;
@@ -580,8 +572,9 @@ fil_parse_write_crypt_data(byte* ptr, byte* end_ptr,
uint min_key_version = mach_read_from_4(ptr);
ptr += 4;
- if (end_ptr - ptr < len)
+ if (end_ptr - ptr < len) {
return NULL;
+ }
fil_space_crypt_t* crypt_data = fil_space_create_crypt_data();
crypt_data->page0_offset = offset;
@@ -624,11 +617,14 @@ fil_space_check_encryption_write(
return false;
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL)
+
+ if (crypt_data == NULL) {
return false;
+ }
- if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED)
+ if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
return false;
+ }
return true;
}
@@ -640,15 +636,16 @@ void
fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
const byte* src_frame, ulint zip_size, byte* dst_frame, ulint encryption_key)
{
- fil_space_crypt_t* crypt_data;
+ fil_space_crypt_t* crypt_data=NULL;
ulint page_size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;
// get key (L)
- uint key_version;
+ uint key_version = encryption_key;
byte key[MY_AES_MAX_KEY_LENGTH];
- uint key_length;
+ uint key_length=MY_AES_MAX_KEY_LENGTH;
ulint orig_page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
+
if (orig_page_type==FIL_PAGE_TYPE_FSP_HDR
|| orig_page_type==FIL_PAGE_TYPE_XDES
|| orig_page_type== FIL_PAGE_PAGE_ENCRYPTED
@@ -658,49 +655,32 @@ fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
return;
}
- if (srv_encrypt_tables) {
- crypt_data = fil_space_get_crypt_data(space);
+ /* Get crypt data from file space */
+ crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL) {
- //TODO: Is this really needed ?
- memcpy(dst_frame, src_frame, page_size);
- return;
- }
-
- fil_crypt_get_latest_key(key, &key_length, crypt_data, &key_version);
- } else {
- key_version = encryption_key;
- fil_crypt_get_latest_key(key, &key_length, NULL, (uint*)&key_version);
+ if (crypt_data == NULL) {
+ //TODO: Is this really needed ?
+ memcpy(dst_frame, src_frame, page_size);
+ return;
}
+ fil_crypt_get_latest_key(key, &key_length, crypt_data, &key_version);
/* Load the iv or counter (depending to the encryption algorithm used) */
unsigned char iv[MY_AES_BLOCK_SIZE];
- if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
- {
- // create counter block (C)
- mach_write_to_4(iv + 0, space);
- ulint space_offset = mach_read_from_4(
- src_frame + FIL_PAGE_OFFSET);
- mach_write_to_4(iv + 4, space_offset);
- mach_write_to_8(iv + 8, lsn);
+ if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR) {
+ // create counter block (C)
+ mach_write_to_4(iv + 0, space);
+ ulint space_offset = mach_read_from_4(
+ src_frame + FIL_PAGE_OFFSET);
+ mach_write_to_4(iv + 4, space_offset);
+ mach_write_to_8(iv + 8, lsn);
} else {
- // take the iv from the key provider
-
- int load_iv_rc = get_encryption_iv(key_version, (uchar *) iv, sizeof(iv));
-
- // if the iv can not be loaded the whole page can not be encrypted
- if (load_iv_rc != CRYPT_KEY_OK)
- {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to decrypt data-block. "
- " Can not load iv for key %d"
- " return-code: %d. Can't continue!\n",
- key_version, load_iv_rc);
-
- ut_error;
- }
+ // Get random IV from crypt_data
+ mutex_enter(&crypt_data->mutex);
+ memcpy(iv, crypt_data->iv, crypt_data->iv_length);
+ mutex_exit(&crypt_data->mutex);
}
ibool page_compressed = (mach_read_from_2(src_frame+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED);
@@ -710,7 +690,6 @@ fil_space_encrypt(ulint space, ulint offset, lsn_t lsn,
// copy page header
memcpy(dst_frame, src_frame, FIL_PAGE_DATA);
-
if (page_encrypted && !page_compressed) {
// key id
mach_write_to_2(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
@@ -816,11 +795,13 @@ fil_space_check_encryption_read(
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
- if (crypt_data == NULL)
+ if (crypt_data == NULL) {
return false;
+ }
- if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED)
+ if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
return false;
+ }
return true;
}
@@ -882,29 +863,17 @@ fil_space_decrypt(fil_space_crypt_t* crypt_data,
// get the iv
unsigned char iv[MY_AES_BLOCK_SIZE];
- if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR)
- {
- // create counter block
+ if (current_aes_dynamic_method == MY_AES_ALGORITHM_CTR) {
+ // create counter block
- mach_write_to_4(iv + 0, space);
- mach_write_to_4(iv + 4, offset);
- mach_write_to_8(iv + 8, lsn);
+ mach_write_to_4(iv + 0, space);
+ mach_write_to_4(iv + 4, offset);
+ mach_write_to_8(iv + 8, lsn);
} else {
- // take the iv from the key provider
-
- int load_iv_rc = get_encryption_iv(key_version, (uchar *) iv, sizeof(iv));
-
- // if the iv can not be loaded the whole page can not be decrypted
- if (load_iv_rc != CRYPT_KEY_OK)
- {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to decrypt data-block. "
- " Can not load iv for key %d"
- " return-code: %d. Can't continue!\n",
- key_version, load_iv_rc);
-
- return AES_KEY_CREATION_FAILED;
- }
+ // Get random IV from crypt_data
+ mutex_enter(&crypt_data->mutex);
+ memcpy(iv, crypt_data->iv, crypt_data->iv_length);
+ mutex_exit(&crypt_data->mutex);
}
const byte* src = src_frame + FIL_PAGE_DATA;
@@ -1016,6 +985,7 @@ fil_space_verify_crypt_checksum(const byte* src_frame, ulint zip_size)
* srv_checksum_algorithm */
srv_checksum_algorithm_t save_checksum_algorithm =
(srv_checksum_algorithm_t)srv_checksum_algorithm;
+
if (zip_size == 0 &&
(save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB ||
save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB)) {
@@ -1100,8 +1070,9 @@ fil_crypt_needs_rotation(uint key_version, const key_state_t *key_state)
/* this is rotation encrypted => encrypted,
* only reencrypt if key is sufficiently old */
- if (key_version + key_state->rotate_key_age < key_state->key_version)
+ if (key_version + key_state->rotate_key_age < key_state->key_version) {
return true;
+ }
return false;
}
@@ -1131,6 +1102,7 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data != NULL || fil_crypt_start_converting) {
/* someone beat us to it */
if (fil_crypt_start_converting)
@@ -1168,8 +1140,9 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
do
{
if (fil_crypt_is_closing(space) ||
- fil_tablespace_is_being_deleted(space))
+ fil_tablespace_is_being_deleted(space)) {
break;
+ }
mtr_t mtr;
mtr_start(&mtr);
@@ -1231,8 +1204,9 @@ fil_crypt_start_encrypting_space(ulint space, bool *recheck) {
!fil_tablespace_is_being_deleted(space));
/* try to reacquire pending op */
- if (fil_inc_pending_ops(space, true))
+ if (fil_inc_pending_ops(space, true)) {
break;
+ }
/* pending op reacquired! */
pending_op = true;
@@ -1275,8 +1249,9 @@ static bool
fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
bool *recheck)
{
- if (fil_space_get_type(space) != FIL_TABLESPACE)
+ if (fil_space_get_type(space) != FIL_TABLESPACE) {
return false;
+ }
if (fil_inc_pending_ops(space, true)) {
/* tablespace being dropped */
@@ -1287,6 +1262,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
bool pending_op = true;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
/**
* space has no crypt data
@@ -1294,6 +1270,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
*/
pending_op = fil_crypt_start_encrypting_space(space, recheck);
crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
if (pending_op) {
fil_decr_pending_ops(space);
@@ -1303,6 +1280,7 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
}
mutex_enter(&crypt_data->mutex);
+
do {
/* prevent threads from starting to rotate space */
if (crypt_data->rotate_state.starting) {
@@ -1312,11 +1290,13 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
}
/* prevent threads from starting to rotate space */
- if (crypt_data->closing)
+ if (crypt_data->closing) {
break;
+ }
- if (crypt_data->rotate_state.flushing)
+ if (crypt_data->rotate_state.flushing) {
break;
+ }
bool need_key_rotation = fil_crypt_needs_rotation(
crypt_data->min_key_version, key_state);
@@ -1335,9 +1315,11 @@ fil_crypt_space_needs_rotation(uint space, const key_state_t *key_state,
} while (0);
mutex_exit(&crypt_data->mutex);
+
if (pending_op) {
fil_decr_pending_ops(space);
}
+
return false;
}
@@ -1409,6 +1391,7 @@ fil_crypt_alloc_iops(rotate_thread_t *state)
uint max_iops = state->estimated_max_iops;
mutex_enter(&fil_crypt_threads_mutex);
+
if (n_fil_crypt_iops_allocated >= srv_n_fil_crypt_iops) {
/* this can happen when user decreases srv_fil_crypt_iops */
mutex_exit(&fil_crypt_threads_mutex);
@@ -1416,8 +1399,10 @@ fil_crypt_alloc_iops(rotate_thread_t *state)
}
uint alloc = srv_n_fil_crypt_iops - n_fil_crypt_iops_allocated;
- if (alloc > max_iops)
+
+ if (alloc > max_iops) {
alloc = max_iops;
+ }
n_fil_crypt_iops_allocated += alloc;
mutex_exit(&fil_crypt_threads_mutex);
@@ -1447,8 +1432,9 @@ fil_crypt_realloc_iops(rotate_thread_t *state)
state->estimated_max_iops,
1000000 / avg_wait_time_us);
#endif
- if (avg_wait_time_us == 0)
+ if (avg_wait_time_us == 0) {
avg_wait_time_us = 1; // prevent division by zero
+ }
state->estimated_max_iops = 1000000 / avg_wait_time_us;
state->cnt_waited = 0;
@@ -1596,7 +1582,9 @@ fil_crypt_start_rotate_space(
{
ulint space = state->space;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
mutex_enter(&crypt_data->mutex);
+
if (crypt_data->rotate_state.active_threads == 0) {
/* only first thread needs to init */
crypt_data->rotate_state.next_offset = 1; // skip page 0
@@ -1637,7 +1625,9 @@ fil_crypt_find_page_to_rotate(
ulint batch = srv_alloc_time * state->allocated_iops;
ulint space = state->space;
fil_space_crypt_t *crypt_data = fil_space_get_crypt_data(space);
+
mutex_enter(&crypt_data->mutex);
+
if (crypt_data->closing == false &&
crypt_data->rotate_state.next_offset <
crypt_data->rotate_state.max_offset) {
@@ -1731,6 +1721,7 @@ fil_crypt_get_page_throttle_func(rotate_thread_t *state,
ulint add_sleeptime_ms = 0;
ulint avg_wait_time_us = state->sum_waited_us / state->cnt_waited;
ulint alloc_wait_us = 1000000 / state->allocated_iops;
+
if (avg_wait_time_us < alloc_wait_us) {
/* we reading faster than we allocated */
add_sleeptime_ms = (alloc_wait_us - avg_wait_time_us) / 1000;
@@ -1811,8 +1802,9 @@ fil_crypt_rotate_page(
ulint sleeptime_ms = 0;
/* check if tablespace is closing before reading page */
- if (fil_crypt_is_closing(space))
+ if (fil_crypt_is_closing(space)) {
return;
+ }
if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) {
/* don't encrypt this as it contains address to dblwr buffer */
@@ -1959,6 +1951,7 @@ fil_crypt_rotate_pages(
{
ulint space = state->space;
ulint end = state->offset + state->batch;
+
for (; state->offset < end; state->offset++) {
/* we can't rotate pages in dblwr buffer as
@@ -1988,17 +1981,21 @@ fil_crypt_flush_space(rotate_thread_t *state, ulint space)
/* flush tablespace pages so that there are no pages left with old key */
lsn_t end_lsn = crypt_data->rotate_state.end_lsn;
+
if (end_lsn > 0 && !fil_crypt_is_closing(space)) {
bool success = false;
ulint n_pages = 0;
ulint sum_pages = 0;
ullint start = ut_time_us(NULL);
+
do {
success = buf_flush_list(ULINT_MAX, end_lsn, &n_pages);
buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
sum_pages += n_pages;
} while (!success && !fil_crypt_is_closing(space));
+
ullint end = ut_time_us(NULL);
+
if (sum_pages && end > start) {
state->cnt_waited += sum_pages;
state->sum_waited_us += (end - start);
@@ -2142,6 +2139,7 @@ DECLARE_THREAD(fil_crypt_thread)(
fil_crypt_get_key_state(&new_state);
time_t wait_start = time(0);
+
while (!thr.should_shutdown() && key_state == new_state) {
/* wait for key state changes
@@ -2159,8 +2157,10 @@ DECLARE_THREAD(fil_crypt_thread)(
}
time_t waited = time(0) - wait_start;
- if (waited >= srv_background_scrub_data_check_interval)
+
+ if (waited >= srv_background_scrub_data_check_interval) {
break;
+ }
}
recheck = false;
@@ -2223,7 +2223,8 @@ DECLARE_THREAD(fil_crypt_thread)(
Adjust thread count for key rotation */
UNIV_INTERN
void
-fil_crypt_set_thread_cnt(uint new_cnt) {
+fil_crypt_set_thread_cnt(uint new_cnt)
+{
if (new_cnt > srv_n_fil_crypt_threads) {
uint add = new_cnt - srv_n_fil_crypt_threads;
srv_n_fil_crypt_threads = new_cnt;
@@ -2305,6 +2306,7 @@ fil_space_crypt_mark_space_closing(
{
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
mutex_exit(&fil_crypt_threads_mutex);
return;
@@ -2325,6 +2327,7 @@ fil_space_crypt_close_tablespace(
{
mutex_enter(&fil_crypt_threads_mutex);
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space);
+
if (crypt_data == NULL) {
mutex_exit(&fil_crypt_threads_mutex);
return;
@@ -2351,6 +2354,7 @@ fil_space_crypt_close_tablespace(
flushing = crypt_data->rotate_state.flushing;
uint now = time(0);
+
if (now >= last + 30) {
ib_logf(IB_LOG_LEVEL_WARN,
"Waited %u seconds to drop space: %lu.",
@@ -2358,6 +2362,7 @@ fil_space_crypt_close_tablespace(
last = now;
}
}
+
mutex_exit(&crypt_data->mutex);
}
@@ -2424,6 +2429,7 @@ fil_space_get_scrub_status(
{
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(id);
memset(status, 0, sizeof(*status));
+
if (crypt_data != NULL) {
status->space = id;
status->compressed = fil_space_get_zip_size(id) > 0;