summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-16 22:31:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-17 11:05:33 +0300
commitd9277732d7dbe7e3793c70cdc769ade16168695d (patch)
tree1fdf3a99a924ef9c2f73ac6e9a7027eaa8048d13
parentc2815c7c2c7f9dcf4e9f241e10d154faf561103f (diff)
parent836d4e74d9416a1af839f8068c5a07bee6f4b71e (diff)
downloadmariadb-git-d9277732d7dbe7e3793c70cdc769ade16168695d.tar.gz
Merge 10.1 into 10.2
This should also fix the MariaDB 10.2.2 bug MDEV-13826 CREATE FULLTEXT INDEX on encrypted table fails. MDEV-12634 FIXME: Modify innodb-index-online, innodb-table-online so that they will write and read merge sort files. InnoDB 5.7 introduced some optimizations to avoid using the files for small tables. Many collation test results have been adjusted for MDEV-10191.
-rw-r--r--mysql-test/include/innodb_encrypt_log.combinations7
-rw-r--r--mysql-test/include/innodb_encrypt_log.inc4
-rw-r--r--mysql-test/r/ctype_big5.result130
-rw-r--r--mysql-test/r/ctype_cp1251.result2
-rw-r--r--mysql-test/r/ctype_cp932_binlog_stm.result128
-rw-r--r--mysql-test/r/ctype_eucjpms.result132
-rw-r--r--mysql-test/r/ctype_euckr.result128
-rw-r--r--mysql-test/r/ctype_gb2312.result128
-rw-r--r--mysql-test/r/ctype_gbk.result130
-rw-r--r--mysql-test/r/ctype_sjis.result128
-rw-r--r--mysql-test/r/ctype_ujis.result132
-rw-r--r--mysql-test/r/ctype_utf32.result2
-rw-r--r--mysql-test/r/ctype_utf8.result33
-rw-r--r--mysql-test/r/ctype_utf8mb4.result8
-rw-r--r--mysql-test/r/ctype_utf8mb4_heap.result8
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result8
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result8
-rw-r--r--mysql-test/r/gis.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-online,crypt.rdiff20
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-online.result111
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online,crypt.rdiff20
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online.result105
-rw-r--r--mysql-test/suite/innodb/t/innodb-index-online.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb-index-online.test77
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test80
-rw-r--r--mysql-test/suite/jp/r/jp_convert_ucs2.result42
-rw-r--r--mysql-test/suite/jp/r/jp_convert_ujis.result202
-rw-r--r--mysql-test/suite/jp/r/jp_convert_utf8.result256
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only-incr.result29
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only-incr.test63
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only.result10
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only.test25
-rw-r--r--mysql-test/t/ctype_utf8.test12
-rw-r--r--sql/item.cc4
-rw-r--r--sql/item.h3
-rw-r--r--sql/item_timefunc.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc12
-rw-r--r--storage/innobase/include/log0crypt.h40
-rw-r--r--storage/innobase/include/row0ftsort.h1
-rw-r--r--storage/innobase/include/row0merge.h15
-rw-r--r--storage/innobase/include/srv0srv.h17
-rw-r--r--storage/innobase/log/log0crypt.cc41
-rw-r--r--storage/innobase/row/row0ftsort.cc37
-rw-r--r--storage/innobase/row/row0log.cc143
-rw-r--r--storage/innobase/row/row0merge.cc312
-rw-r--r--storage/innobase/srv/srv0srv.cc4
-rw-r--r--storage/xtradb/btr/btr0cur.cc4
-rw-r--r--storage/xtradb/handler/ha_innodb.cc48
-rw-r--r--storage/xtradb/include/log0crypt.h44
-rw-r--r--storage/xtradb/include/page0zip.ic2
-rw-r--r--storage/xtradb/include/row0ftsort.h3
-rw-r--r--storage/xtradb/include/row0merge.h30
-rw-r--r--storage/xtradb/include/srv0srv.h17
-rw-r--r--storage/xtradb/include/ut0timer.ic2
-rw-r--r--storage/xtradb/log/log0crypt.cc125
-rw-r--r--storage/xtradb/log/log0recv.cc5
-rw-r--r--storage/xtradb/os/os0file.cc3
-rw-r--r--storage/xtradb/row/row0ftsort.cc33
-rw-r--r--storage/xtradb/row/row0log.cc114
-rw-r--r--storage/xtradb/row/row0merge.cc284
-rw-r--r--storage/xtradb/srv/srv0srv.cc6
-rw-r--r--storage/xtradb/srv/srv0start.cc10
-rw-r--r--storage/xtradb/trx/trx0rseg.cc2
-rw-r--r--storage/xtradb/trx/trx0sys.cc7
-rw-r--r--storage/xtradb/trx/trx0trx.cc1
-rw-r--r--storage/xtradb/trx/trx0undo.cc1
67 files changed, 2156 insertions, 1392 deletions
diff --git a/mysql-test/include/innodb_encrypt_log.combinations b/mysql-test/include/innodb_encrypt_log.combinations
new file mode 100644
index 00000000000..fd21a57c3c2
--- /dev/null
+++ b/mysql-test/include/innodb_encrypt_log.combinations
@@ -0,0 +1,7 @@
+[crypt]
+innodb_encrypt_log=ON
+innodb_encryption_rotate_key_age=1
+plugin_load_add=$DEBUG_KEY_MANAGEMENT_SO
+
+[clear]
+skip_innodb_encrypt_log
diff --git a/mysql-test/include/innodb_encrypt_log.inc b/mysql-test/include/innodb_encrypt_log.inc
new file mode 100644
index 00000000000..5beebeae81f
--- /dev/null
+++ b/mysql-test/include/innodb_encrypt_log.inc
@@ -0,0 +1,4 @@
+# The goal of including this file is to enable innodb_encrypt_log combinations
+# (see include/innodb_encrypt_log.combinations)
+
+--source include/have_innodb.inc
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 3c184c8aec9..2db4da51667 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -516,7 +516,7 @@ E5ABBA
drop table t1;
select hex(convert(_big5 0xC84041 using ucs2));
hex(convert(_big5 0xC84041 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2'
End of 4.1 tests
@@ -796,69 +796,69 @@ A2C1 â…¨
A2C2 â…©
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xC7FD 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;
@@ -875,69 +875,69 @@ C7DA Ñ
C7DB Ñ‚
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xC7FD 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 037f3cb07e3..e0e6a5cfd95 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -281,7 +281,7 @@ chr upper lower utf8 roundtrip issafe
95 95 95 E280A2 95
96 96 96 E28093 96
97 97 97 E28094 97
-98 98 98 NULL NULL Round trip unsafe
+98 98 98 3F 3F Round trip unsafe
99 99 99 E284A2 99
9A 9A 9A D199 9A
9B 9B 9B E280BA 9B
diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result
index b958933cd12..f49400b63ff 100644
--- a/mysql-test/r/ctype_cp932_binlog_stm.result
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result
@@ -388,138 +388,138 @@ code a
81F0 â„«
Warnings:
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x827A 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 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test cp932->Unicode conversion
diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result
index afca918abc1..bc7b4b9ef9d 100644
--- a/mysql-test/r/ctype_eucjpms.result
+++ b/mysql-test/r/ctype_eucjpms.result
@@ -9991,12 +9991,12 @@ a hex(b) c
DROP TABLE t1;
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
hex(convert(_eucjpms 0xA5FE41 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2'
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2'
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
@@ -10566,69 +10566,69 @@ code a
8FAABC Ģ
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3DB 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;
@@ -10637,69 +10637,69 @@ code a
8FABB9 ǵ
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 8069ef54bb1..3fb6f98b2eb 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -24714,69 +24714,69 @@ code a
A1CA â„«
Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F3 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;
@@ -24810,69 +24810,69 @@ A8E6 â“©
A9A2 Ä‘
Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA6F3 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 cef286b0aab..c3c2eee9b1c 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -742,69 +742,69 @@ A2FB â…ª
A2FC â…«
Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E7 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;
@@ -837,69 +837,69 @@ A8B9 ü
A8BA ê
Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA6E7 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 8e16320b9df..a6cea80fef5 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -463,7 +463,7 @@ A3A0
DROP TABLE t1;
select hex(convert(_gbk 0xA14041 using ucs2));
hex(convert(_gbk 0xA14041 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'ucs2'
create table t1 (c1 text not null, c2 text not null) character set gbk;
@@ -774,69 +774,69 @@ A2FB â…ª
A2FC â…«
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA180 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;
@@ -871,69 +871,69 @@ A8BD Å„
A8BE ň
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result
index 756e7a11d93..c19a0008e11 100644
--- a/mysql-test/r/ctype_sjis.result
+++ b/mysql-test/r/ctype_sjis.result
@@ -663,138 +663,138 @@ code a
81F0 â„«
Warnings:
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x827A 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 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 93a31a2818c..cb9de83fedc 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -2481,12 +2481,12 @@ a hex(b) c
DROP TABLE t1;
select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA5FE to 'ucs2'
select hex(convert(_ujis 0x8FABF841 using ucs2));
hex(convert(_ujis 0x8FABF841 using ucs2))
-NULL
+003F0041
Warnings:
Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2'
DROP TABLE IF EXISTS t1, t2;
@@ -3060,69 +3060,69 @@ code a
8FAABC Ģ
Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3DB 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;
@@ -3131,69 +3131,69 @@ code a
8FABB9 ǵ
Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index 37cda220db0..0a4a49dd39e 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -1666,7 +1666,7 @@ CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061))
1
select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
c
-NULL
+0000003F0000003F0000003F0000003F
Warnings:
Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00'
#
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 0a4898ff0b9..c7e20a4180d 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1925,7 +1925,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1951,7 +1951,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FD'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8));
@@ -2120,7 +2120,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF);
@@ -2139,7 +2139,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF);
@@ -10479,6 +10479,31 @@ END
DROP PROCEDURE p1;
SET @@SQL_MODE=default;
#
+# MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
+#
+SET sql_mode='STRICT_TRANS_TABLES';
+SELECT CONVERT(_utf8 0xC499 USING latin1);
+CONVERT(_utf8 0xC499 USING latin1)
+?
+Warnings:
+Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
+SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
+CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1)
+?
+Warnings:
+Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
+SET sql_mode=default;
+SELECT CONVERT(_utf8 0xC499 USING latin1);
+CONVERT(_utf8 0xC499 USING latin1)
+?
+Warnings:
+Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
+SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
+CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1)
+?
+Warnings:
+Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
+#
# End of 10.1 tests
#
#
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index d74cfd4dd3f..cf3000baf6a 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -1950,7 +1950,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1976,7 +1976,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
@@ -2145,7 +2145,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2164,7 +2164,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result
index 859ceff864e..d82ed89be9c 100644
--- a/mysql-test/r/ctype_utf8mb4_heap.result
+++ b/mysql-test/r/ctype_utf8mb4_heap.result
@@ -1782,7 +1782,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1808,7 +1808,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
@@ -1977,7 +1977,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -1996,7 +1996,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index 11d89154269..c444e872f98 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -1910,7 +1910,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1936,7 +1936,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
@@ -2105,7 +2105,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2124,7 +2124,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index ef7bda0a79b..5176f92dc0f 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -1910,7 +1910,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1936,7 +1936,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-NULL
+??
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4));
@@ -2105,7 +2105,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2124,7 +2124,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-NULL
+3F
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 8456a6b483b..93e980efa2b 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1616,8 +1616,8 @@ 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
-NULL
-NULL
+0
+0
Warnings:
Warning 1300 Invalid utf8 character string: '\xE0C'
Warning 1300 Invalid utf8 character string: '\xE0C'
diff --git a/mysql-test/suite/innodb/r/innodb-index-online,crypt.rdiff b/mysql-test/suite/innodb/r/innodb-index-online,crypt.rdiff
new file mode 100644
index 00000000000..166cdf7a8b6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-index-online,crypt.rdiff
@@ -0,0 +1,20 @@
+--- innodb-index-online.result
++++ innodb-index-online,crypt.reject
+@@ -301,7 +301,7 @@
+ @merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+ @rowlog_encrypt_1>@rowlog_encrypt_0;
+ sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
+-0 0 0 0
++0 0 0 1
+ SET DEBUG_SYNC = 'now SIGNAL dml2_done';
+ connection con1;
+ ERROR HY000: Creating index 'c2e' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
+@@ -423,7 +423,7 @@
+ @rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+ @rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+ sort_encrypted sort_decrypted log_encrypted log_decrypted
+-0 0 0 0
++0 0 1 1
+ connection con1;
+ SELECT COUNT(c22f) FROM t1;
+ COUNT(c22f)
diff --git a/mysql-test/suite/innodb/r/innodb-index-online.result b/mysql-test/suite/innodb/r/innodb-index-online.result
index 6ebe52bb8fc..5427f13043d 100644
--- a/mysql-test/suite/innodb/r/innodb-index-online.result
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result
@@ -214,6 +214,17 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`),
KEY `c2d` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1
+connection default;
+SET @merge_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+connection con1;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done';
SET lock_wait_timeout = 10;
ALTER TABLE t1 DROP INDEX c2d, ADD INDEX c2e(c2),
@@ -246,6 +257,22 @@ BEGIN;
UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1;
ROLLBACK;
+BEGIN;
+DELETE FROM t1;
+ROLLBACK;
+UPDATE t1 SET c2 = c2 + 1;
+BEGIN;
+UPDATE t1 SET c2 = c2 + 1;
+DELETE FROM t1;
+ROLLBACK;
+BEGIN;
+DELETE FROM t1;
+ROLLBACK;
+UPDATE t1 SET c2 = c2 + 1;
+BEGIN;
+UPDATE t1 SET c2 = c2 + 1;
+DELETE FROM t1;
+ROLLBACK;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count
ddl_background_drop_indexes 0
@@ -253,12 +280,28 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = '?c2e';
name pos
c2 0
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SELECT
+(@merge_encrypt_1-@merge_encrypt_0)-
+(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
+@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+@rowlog_encrypt_1>@rowlog_encrypt_0;
+sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
+0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
connection con1;
ERROR HY000: Creating index 'c2e' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
@@ -269,7 +312,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = 'c2e';
@@ -281,7 +324,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
connection default;
ALTER TABLE t1 COMMENT 'testing if c2e will be dropped';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -291,7 +334,19 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
connection con1;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done';
ALTER TABLE t1 ADD INDEX c2f(c2);
@@ -304,7 +359,15 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
+BEGIN;
+INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
+DELETE FROM t1 WHERE c1 > 320;
+ROLLBACK;
+BEGIN;
+UPDATE t1 SET c2 = c2 + 1;
+DELETE FROM t1;
+ROLLBACK;
BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
DELETE FROM t1 WHERE c1 > 320;
@@ -320,7 +383,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
connection con1;
Warnings:
@@ -333,7 +396,35 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
+connection default;
+SET @merge_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+SELECT
+(@merge_encrypt_2-@merge_encrypt_1)-
+(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
+(@rowlog_encrypt_2-@rowlog_encrypt_1)-
+(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
+sort_balance log_balance
+0 0
+SELECT
+@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
+@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
+@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+sort_encrypted sort_decrypted log_encrypted log_decrypted
+0 0 0 0
+connection con1;
SELECT COUNT(c22f) FROM t1;
COUNT(c22f)
320
@@ -369,7 +460,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
connection default;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count
@@ -378,7 +469,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
connection con1;
disconnect con1;
connection default;
@@ -400,7 +491,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = INPLACE;
ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = COPY;
ERROR 42000: Duplicate key name 'c2h'
diff --git a/mysql-test/suite/innodb/r/innodb-table-online,crypt.rdiff b/mysql-test/suite/innodb/r/innodb-table-online,crypt.rdiff
new file mode 100644
index 00000000000..cd0904367f9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-table-online,crypt.rdiff
@@ -0,0 +1,20 @@
+--- innodb-table-online.result
++++ innodb-table-online,crypt.reject
+@@ -291,7 +291,7 @@
+ @merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+ @rowlog_encrypt_1>@rowlog_encrypt_0;
+ sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
+-0 0 0 0
++0 0 0 1
+ SET DEBUG_SYNC = 'now SIGNAL dml2_done';
+ # session con1
+ connection con1;
+@@ -393,7 +393,7 @@
+ @rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+ @rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+ sort_encrypted sort_decrypted log_encrypted log_decrypted
+-0 0 0 0
++0 0 1 1
+ ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
+ ERROR 23000: Duplicate entry '' for key 'PRIMARY'
+ UPDATE t1 SET c3 = NULL WHERE c3 = '';
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result
index a162bcef420..49f44c0f655 100644
--- a/mysql-test/suite/innodb/r/innodb-table-online.result
+++ b/mysql-test/suite/innodb/r/innodb-table-online.result
@@ -3,7 +3,7 @@ call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for");
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on;
-CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 TEXT NOT NULL)
+CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL)
ENGINE = InnoDB;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
SET GLOBAL innodb_monitor_enable = module_ddl;
@@ -62,7 +62,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
BEGIN;
@@ -95,7 +95,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@@ -106,7 +106,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@@ -138,7 +138,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@@ -204,10 +204,19 @@ INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 80 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
+SET @merge_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
# session con1
connection con1;
SHOW CREATE TABLE t1;
@@ -215,7 +224,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done';
@@ -234,7 +243,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
BEGIN;
DELETE FROM t1;
ROLLBACK;
@@ -266,7 +275,23 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SELECT
+(@merge_encrypt_1-@merge_encrypt_0)-
+(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
+@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+@rowlog_encrypt_1>@rowlog_encrypt_0;
+sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
+0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
# session con1
connection con1;
@@ -278,15 +303,27 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done';
ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 42000: Multiple primary key defined
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)),
-CHANGE c2 c22f INT, CHANGE c3 c3 TEXT NULL, CHANGE c1 c1 INT AFTER c22f,
-ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online';
+CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
+ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
@@ -297,7 +334,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 1
BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240;
DELETE FROM t1 WHERE c1 > 320;
@@ -313,7 +350,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
# session con1
connection con1;
@@ -324,13 +361,39 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
SELECT COUNT(c22f) FROM t1;
COUNT(c22f)
320
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+SET @merge_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+SELECT
+(@merge_encrypt_2-@merge_encrypt_1)-
+(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
+(@rowlog_encrypt_2-@rowlog_encrypt_1)-
+(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
+sort_balance log_balance
+0 0
+SELECT
+@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
+@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
+@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+sort_encrypted sort_decrypted log_encrypted log_decrypted
+0 0 0 0
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
ERROR 23000: Duplicate entry '' for key 'PRIMARY'
UPDATE t1 SET c3 = NULL WHERE c3 = '';
@@ -342,13 +405,13 @@ SET @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)),
ALGORITHM = INPLACE;
ERROR 22004: Invalid use of NULL value
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL;
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
ERROR 22004: Invalid use of NULL value
SET @@sql_mode = @old_sql_mode;
-UPDATE t1 SET c3=CONCAT(c1,REPEAT('foo',c1)) WHERE c3 IS NULL;
+UPDATE t1 SET c3=LEFT(CONCAT(c1,REPEAT('foo',c1)),255) WHERE c3 IS NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0';
SET @@sql_mode = 'STRICT_TRANS_TABLES';
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL, DROP COLUMN c22f,
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
# session default
@@ -367,7 +430,7 @@ connection default;
ROLLBACK;
# session con1
connection con1;
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL;
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
ADD COLUMN c6 VARCHAR(1000) DEFAULT
@@ -391,7 +454,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 4
-ddl_log_file_alter_table 0
+ddl_log_file_alter_table 2
# session default
connection default;
SELECT COUNT(*) FROM t1;
@@ -422,7 +485,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`c22f` int(11) NOT NULL,
`c1` int(11) NOT NULL,
- `c3` text NOT NULL,
+ `c3` char(255) NOT NULL,
`c4` varchar(6) NOT NULL DEFAULT 'Online',
PRIMARY KEY (`c1`,`c22f`,`c4`(5))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
diff --git a/mysql-test/suite/innodb/t/innodb-index-online.opt b/mysql-test/suite/innodb/t/innodb-index-online.opt
index a11d16860eb..ff20edbe2f7 100644
--- a/mysql-test/suite/innodb/t/innodb-index-online.opt
+++ b/mysql-test/suite/innodb/t/innodb-index-online.opt
@@ -1,5 +1,5 @@
--loose-innodb-sort-buffer-size=64k
---loose-innodb-online-alter-log-max-size=64k
+--loose-innodb-online-alter-log-max-size=128k
--loose-innodb-buffer-pool-size=5M
--loose-innodb-log-buffer-size=256k
--loose-innodb-sys-indexes
diff --git a/mysql-test/suite/innodb/t/innodb-index-online.test b/mysql-test/suite/innodb/t/innodb-index-online.test
index 24e3cd1ba22..efd700498c6 100644
--- a/mysql-test/suite/innodb/t/innodb-index-online.test
+++ b/mysql-test/suite/innodb/t/innodb-index-online.test
@@ -1,4 +1,5 @@
--source include/innodb_page_size_small.inc
+--source include/innodb_encrypt_log.inc
--source include/have_debug_sync.inc
let $innodb_metrics_select=
@@ -200,6 +201,18 @@ EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
SHOW CREATE TABLE t1;
+connection default;
+SET @merge_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+connection con1;
+
# Exceed the configured innodb_online_alter_log_max_size.
# The actual limit is a multiple of innodb_sort_buf_size,
# because that is the size of the in-memory log buffers.
@@ -223,7 +236,7 @@ SET DEBUG_SYNC = 'now WAIT_FOR c2e_created';
# At this point, the clustered index scan must have completed,
# but the modification log keeps accumulating due to the DEBUG_SYNC.
eval $innodb_metrics_select;
-let $c= 2;
+let $c= 4;
while ($c)
{
BEGIN;
@@ -243,6 +256,22 @@ SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = '?c2e';
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+
+SELECT
+(@merge_encrypt_1-@merge_encrypt_0)-
+(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
+@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+@rowlog_encrypt_1>@rowlog_encrypt_0;
+
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
@@ -270,6 +299,19 @@ ALTER TABLE t1 COMMENT 'testing if c2e will be dropped';
# Check that the 'zombie' index c2e was dropped.
eval $innodb_metrics_select;
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+
connection con1;
# Accumulate and apply some modification log.
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done';
@@ -282,6 +324,9 @@ connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c2f_created';
# Generate some log (delete-mark, delete-unmark, insert etc.)
eval $innodb_metrics_select;
+let $c= 2;
+while ($c)
+{
BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
DELETE FROM t1 WHERE c1 > 320;
@@ -290,6 +335,8 @@ BEGIN;
UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1;
ROLLBACK;
+dec $c;
+}
eval $innodb_metrics_select;
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
@@ -300,6 +347,34 @@ reap;
ALTER TABLE t1 CHANGE c2 c22f INT;
eval $innodb_metrics_select;
+
+connection default;
+
+SET @merge_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+
+SELECT
+(@merge_encrypt_2-@merge_encrypt_1)-
+(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
+(@rowlog_encrypt_2-@rowlog_encrypt_1)-
+(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
+SELECT
+@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
+@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
+@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+
+connection con1;
SELECT COUNT(c22f) FROM t1;
CHECK TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-table-online-master.opt b/mysql-test/suite/innodb/t/innodb-table-online-master.opt
index 9ac01ffb5ad..92eea2b0d2e 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online-master.opt
+++ b/mysql-test/suite/innodb/t/innodb-table-online-master.opt
@@ -1 +1 @@
---innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=64k --innodb-buffer-pool-size=5M --innodb-log-buffer-size=256k
+--innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=512k --innodb-buffer-pool-size=5M --innodb-log-buffer-size=256k
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index a1977fa06a4..dddbbb34117 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -1,4 +1,5 @@
--source include/innodb_page_size_small.inc
+--source include/innodb_encrypt_log.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
@@ -17,7 +18,7 @@ SET GLOBAL innodb_file_per_table = on;
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
-CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 TEXT NOT NULL)
+CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL)
ENGINE = InnoDB;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
@@ -183,10 +184,20 @@ INSERT INTO t1 SELECT 10 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
# Purge may or may not have cleaned up the DELETE FROM t1 WHERE c1 = 7;
---replace_result 81 80
+--replace_column 9 ROWS
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
ANALYZE TABLE t1;
+SET @merge_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_0=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+
--echo # session con1
connection con1;
SHOW CREATE TABLE t1;
@@ -228,6 +239,22 @@ while ($c)
# Temporary table should exist until the DDL thread notices the overflow.
eval $innodb_metrics_select;
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+
+SELECT
+(@merge_encrypt_1-@merge_encrypt_0)-
+(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
+@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
+@rowlog_encrypt_1>@rowlog_encrypt_0;
+
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
@@ -241,6 +268,19 @@ reap;
# when the above error was noticed.
eval $innodb_metrics_select;
+SET @merge_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_1=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+
# Accumulate and apply some modification log.
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done';
--error ER_MULTIPLE_PRI_KEY
@@ -249,8 +289,8 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
--send
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)),
-CHANGE c2 c22f INT, CHANGE c3 c3 TEXT NULL, CHANGE c1 c1 INT AFTER c22f,
-ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online';
+CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
+ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
--echo # session default
connection default;
@@ -276,6 +316,30 @@ eval $innodb_metrics_select;
SELECT COUNT(c22f) FROM t1;
CHECK TABLE t1;
+SET @merge_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
+SET @merge_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
+SET @rowlog_encrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
+SET @rowlog_decrypt_2=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
+
+SELECT
+(@merge_encrypt_2-@merge_encrypt_1)-
+(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
+(@rowlog_encrypt_2-@rowlog_encrypt_1)-
+(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
+SELECT
+@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
+@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
+@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
+@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
+
# Create a column prefix index.
--error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
@@ -292,15 +356,15 @@ ALTER TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)),
ALGORITHM = INPLACE;
--error ER_INVALID_USE_OF_NULL
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL;
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET @@sql_mode = @old_sql_mode;
-UPDATE t1 SET c3=CONCAT(c1,REPEAT('foo',c1)) WHERE c3 IS NULL;
+UPDATE t1 SET c3=LEFT(CONCAT(c1,REPEAT('foo',c1)),255) WHERE c3 IS NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0';
# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
SET @@sql_mode = 'STRICT_TRANS_TABLES';
--send
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL, DROP COLUMN c22f,
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
@@ -325,7 +389,7 @@ ROLLBACK;
--echo # session con1
connection con1;
-ALTER TABLE t1 MODIFY c3 TEXT NOT NULL;
+ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
--send
ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
diff --git a/mysql-test/suite/jp/r/jp_convert_ucs2.result b/mysql-test/suite/jp/r/jp_convert_ucs2.result
index aa97d30f745..842ddfa2ea7 100644
--- a/mysql-test/suite/jp/r/jp_convert_ucs2.result
+++ b/mysql-test/suite/jp/r/jp_convert_ucs2.result
@@ -153,13 +153,13 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£³`;
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
+¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
@@ -236,13 +236,13 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£¶`;
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
+¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
@@ -319,13 +319,13 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£¹`;
íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
+¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x4E5A to 'sjis'
diff --git a/mysql-test/suite/jp/r/jp_convert_ujis.result b/mysql-test/suite/jp/r/jp_convert_ujis.result
index afbc985df64..d47f6b4ef25 100644
--- a/mysql-test/suite/jp/r/jp_convert_ujis.result
+++ b/mysql-test/suite/jp/r/jp_convert_ujis.result
@@ -353,37 +353,37 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£³`;
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL
-ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL
-ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL
-ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL
-«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL
-«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL
-«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
-íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL
-¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL
-¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL
-¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL
+¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦??????????????
+ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ????????????????????
+ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ????????????????????
+ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦???
+«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ????????????????????
+«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ????????????????????
+«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦
+¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦???????????????????
+¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦???????????????????
+¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦???????????????????
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
@@ -751,37 +751,37 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£¶`;
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL
-ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL
-ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL
-ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL
-«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL
-«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL
-«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
-íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL
-¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL
-¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL
-¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL
+¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦??????????????
+ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ????????????????????
+ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ????????????????????
+ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦???
+«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ????????????????????
+«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ????????????????????
+«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦
+¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦???????????????????
+¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦???????????????????
+¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦???????????????????
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
@@ -1149,45 +1149,45 @@ SELECT `£Ã£±`, CONVERT(`£Ã£±` using ucs2) FROM `£Ô£¹`;
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`;
£Ã£± CONVERT(`£Ã£±` using sjis)
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL
-¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL
-¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL
-¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL
-§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL
-©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
-¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL
-ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL
-ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL
-ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL
-ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL
-«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL
-«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL
-«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL
-«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL
-°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL
-°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL
-°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL
-°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL
-¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL
-í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL
-íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL
-íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
+¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????
+¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦
+¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????
+§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦
+¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???????
+©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦???????????????????
+ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦??????????????
+ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ????????????????????
+ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ????????????????????
+ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦???????????????????
+«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦???
+«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ????????????????????
+«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ????????????????????
+«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
+¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦???????????????????
+°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ????????????????????
+°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ????????????????????
+°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ????????????????????
+°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦
+¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦???????????????????
+í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ????????????????????
+íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ????????????????????
+íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦
Warnings:
Warning 1977 Cannot convert 'ujis' character 0x8FA2AF to 'sjis'
diff --git a/mysql-test/suite/jp/r/jp_convert_utf8.result b/mysql-test/suite/jp/r/jp_convert_utf8.result
index 89c8b582c40..e33edfb1c3f 100644
--- a/mysql-test/suite/jp/r/jp_convert_utf8.result
+++ b/mysql-test/suite/jp/r/jp_convert_utf8.result
@@ -111,7 +111,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T2`;
・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž
・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„朗楼榔浪æ¼
・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛
ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛
ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆
@@ -249,7 +249,7 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T2`;
・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž
・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„朗楼榔浪æ¼
・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛
ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛
ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆
@@ -287,7 +287,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T3`;
・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË
・áàäâăǎÄąåãćĉÄçċÄéèë ・áàäâăǎÄąåãćĉÄçċÄéèë
・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・άέήίϊÎόςÏϋΰώ・・・・・・・ ・άέήίϊÎόςÏϋΰώ・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・
@@ -359,46 +359,46 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T3`;
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
SELECT `C1`, CONVERT(`C1` using sjis) FROM `T3`;
C1 CONVERT(`C1` using sjis)
-êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL
-ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL
-ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL
-ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL
-ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL
-śŚşťţúùüûŭǔűūųůũǘǜǚ NULL
-ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL
-ǖŵýÿŷźžż・・・・・・・・・・・・ NULL
-¤№・・・・・・・・・・・・・・・・・・ NULL
-łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL
-ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL
-・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL
-・áàäâăǎÄąåãćĉÄçċÄéèë NULL
-・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
-・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL
-・・ђѓєѕіїјљњћќўџ・・・・・ NULL
-・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL
-・・・・・・・・・・・・・æđðħıijĸ NULL
-・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL
-・・・・・・・・・・・・・・・ºª©®™ NULL
-ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL
-・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL
-乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL
-仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL
-伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL
-佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL
-鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL
-齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL
-龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL
+êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・???
+ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・??????????????
+ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ????????????????????
+ĵķĺľļńňņñóòöôǒőÅõŕřŗ ????????????????????
+ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
+śŚşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
+ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
+łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
+ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
+・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
+・áàäâăǎÄąåãćĉÄçċÄéèë ・???????????????????
+・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
+・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・
+・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
+・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・
+・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
+・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
+・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
+ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»?????
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・???????????????????
+・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
+乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ????????????????????
+仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
+伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
+佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・
+鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ????????????????????
+齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
+龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis'
Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis'
@@ -515,7 +515,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T5`;
・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž
・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„朗楼榔浪æ¼
・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛
ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛
ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆
@@ -653,7 +653,7 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T5`;
・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºž
・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„朗楼榔浪æ¼
・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛
ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛
ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 ä¿‘ä¿šä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆
@@ -691,7 +691,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T6`;
・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË
・áàäâăǎÄąåãćĉÄçċÄéèë ・áàäâăǎÄąåãćĉÄçċÄéèë
・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・άέήίϊÎόςÏϋΰώ・・・・・・・ ・άέήίϊÎόςÏϋΰώ・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・
@@ -763,46 +763,46 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T6`;
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
SELECT `C1`, CONVERT(`C1` using sjis) FROM `T6`;
C1 CONVERT(`C1` using sjis)
-êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL
-ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL
-ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL
-ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL
-ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL
-śŚşťţúùüûŭǔűūųůũǘǜǚ NULL
-ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL
-ǖŵýÿŷźžż・・・・・・・・・・・・ NULL
-¤№・・・・・・・・・・・・・・・・・・ NULL
-łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL
-ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL
-・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL
-・áàäâăǎÄąåãćĉÄçċÄéèë NULL
-・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
-・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL
-・・ђѓєѕіїјљњћќўџ・・・・・ NULL
-・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL
-・・・・・・・・・・・・・æđðħıijĸ NULL
-・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL
-・・・・・・・・・・・・・・・ºª©®™ NULL
-ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL
-・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL
-乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL
-仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL
-伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL
-佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL
-鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL
-齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL
-龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL
+êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・???
+ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・??????????????
+ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ????????????????????
+ĵķĺľļńňņñóòöôǒőÅõŕřŗ ????????????????????
+ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
+śŚşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
+ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
+łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
+ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
+・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
+・áàäâăǎÄąåãćĉÄçċÄéèë ・???????????????????
+・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
+・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・
+・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
+・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・
+・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
+・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
+・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
+ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»?????
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・???????????????????
+・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
+乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ????????????????????
+仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
+伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
+佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・
+鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ????????????????????
+齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
+龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis'
Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis'
@@ -874,7 +874,7 @@ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T8`;
C1 CONVERT(`C1` using ujis)
  ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
“â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘
+â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥
$¢£%#&*@§☆★○â—◎◇・・・・・ $¢£%#&*@§☆★○â—◎◇・・・・・
@@ -1012,7 +1012,7 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T8`;
SELECT `C1`, CONVERT(`C1` using sjis) FROM `T8`;
C1 CONVERT(`C1` using sjis)
  ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½
-ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL
+ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’
“â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘
+â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥
$¢£%#&*@§☆★○â—◎◇・・・・・ $¢£%#&*@§☆★○â—◎◇・・・・・
@@ -1082,7 +1082,7 @@ Warning 1977 Cannot convert 'utf8' character 0xEFBCBC to 'sjis'
SELECT `C1`, CONVERT(`C1` using ujis) FROM `T9`;
C1 CONVERT(`C1` using ujis)
ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・ºª©®™
¤№・・・・・・・・・・・・・・・・・・ ¤№・・・・・・・・・・・・・・・・・・
@@ -1167,45 +1167,45 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T9`;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
SELECT `C1`, CONVERT(`C1` using sjis) FROM `T9`;
C1 CONVERT(`C1` using sjis)
-ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL
-・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・ºª©®™ NULL
-¤№・・・・・・・・・・・・・・・・・・ NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL
-・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL
-ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・ђѓєѕіїјљњћќўџ・・・・・ NULL
-・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL
-・・・・・・・・・・・・・æđðħıijĸ NULL
-łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
-・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL
-ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL
-ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL
-ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL
-ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL
-・áàäâăǎÄąåãćĉÄçċÄéèë NULL
-êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL
-ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL
-śŚşťţúùüûŭǔűūųůũǘǜǚ NULL
-ǖŵýÿŷźžż・・・・・・・・・・・・ NULL
-・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL
-乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL
-仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL
-伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL
-佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL
-・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL
-鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL
-齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL
-龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL
+ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»?????
+・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
+¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・
+・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
+ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
+・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
+・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
+łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
+・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
+ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・??????????????
+ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ????????????????????
+ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
+ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+・áàäâăǎÄąåãćĉÄçċÄéèë ・???????????????????
+êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・???
+ĵķĺľļńňņñóòöôǒőÅõŕřŗ ????????????????????
+śŚşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
+ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
+・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・???????????????????
+乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ????????????????????
+仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
+伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
+佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・
+・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
+鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ????????????????????
+齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ????????????????????
+龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xCB98 to 'sjis'
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.result b/mysql-test/suite/mariabackup/apply-log-only-incr.result
new file mode 100644
index 00000000000..2baed8c1db9
--- /dev/null
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.result
@@ -0,0 +1,29 @@
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t(a INT UNSIGNED PRIMARY KEY) ENGINE INNODB;
+INSERT INTO t VALUES(0);
+COMMIT;
+start transaction;
+NOT FOUND /Rollback of trx with id/ in current_test
+# expect NOT FOUND
+NOT FOUND /Rollback of trx with id/ in current_test
+# expect NOT FOUND
+commit;
+SELECT count(*) FROM t;
+count(*)
+201
+# Restore and check results
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT COUNT(*) FROM t;
+COUNT(*)
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t;
+COUNT(*)
+201
+SELECT * FROM t;
+a
+0
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.test b/mysql-test/suite/mariabackup/apply-log-only-incr.test
new file mode 100644
index 00000000000..aa5110cc51e
--- /dev/null
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.test
@@ -0,0 +1,63 @@
+--source include/have_innodb.inc
+
+call mtr.add_suppression("InnoDB: New log files created");
+
+let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
+let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
+
+CREATE TABLE t(a INT UNSIGNED PRIMARY KEY) ENGINE INNODB;
+INSERT INTO t VALUES(0);
+COMMIT;
+
+start transaction;
+--disable_query_log
+let $n=100;
+while ($n) {
+eval INSERT t VALUES(101-$n);
+dec $n;
+}
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+let $n=100;
+while ($n) {
+eval INSERT t VALUES(201-$n);
+dec $n;
+}
+--enable_query_log
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir ;
+exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir ;
+--enable_result_log
+
+let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
+--let SEARCH_PATTERN= Rollback of trx with id
+--source include/search_pattern_in_file.inc
+--echo # expect NOT FOUND
+
+exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ;
+
+--source include/search_pattern_in_file.inc
+--echo # expect NOT FOUND
+
+commit;
+SELECT count(*) FROM t;
+echo # Restore and check results;
+--let $targetdir=$basedir
+--let $restart_parameters= --innodb-force-recovery=3
+--source include/restart_and_restore.inc
+
+rmdir $basedir;
+rmdir $incremental_dir;
+
+SELECT COUNT(*) FROM t;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t;
+
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+SELECT * FROM t;
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/apply-log-only.result b/mysql-test/suite/mariabackup/apply-log-only.result
new file mode 100644
index 00000000000..04b9c0d8ee2
--- /dev/null
+++ b/mysql-test/suite/mariabackup/apply-log-only.result
@@ -0,0 +1,10 @@
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t(a varchar(60)) ENGINE INNODB;
+start transaction;
+INSERT INTO t VALUES(1);
+NOT FOUND /Rollback of trx with id/ in current_test
+# expect NOT FOUND
+SELECT count(*) FROM t;
+count(*)
+1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/apply-log-only.test b/mysql-test/suite/mariabackup/apply-log-only.test
new file mode 100644
index 00000000000..96a251fc03b
--- /dev/null
+++ b/mysql-test/suite/mariabackup/apply-log-only.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: New log files created");
+
+let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
+
+CREATE TABLE t(a varchar(60)) ENGINE INNODB;
+start transaction;
+INSERT INTO t VALUES(1);
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+
+exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir ;
+
+let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
+--let SEARCH_PATTERN= Rollback of trx with id
+--source include/search_pattern_in_file.inc
+--echo # expect NOT FOUND
+
+SELECT count(*) FROM t;
+DROP TABLE t;
+
+# Cleanup
+rmdir $basedir;
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index d1fe93d9251..877db3f54f6 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1990,6 +1990,18 @@ SET @@SQL_MODE=default;
#DROP FUNCTION f1;
#SET NAMES utf8;
+--echo #
+--echo # MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
+--echo #
+
+SET sql_mode='STRICT_TRANS_TABLES';
+SELECT CONVERT(_utf8 0xC499 USING latin1);
+SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
+
+SET sql_mode=default;
+SELECT CONVERT(_utf8 0xC499 USING latin1);
+SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
+
--echo #
--echo # End of 10.1 tests
diff --git a/sql/item.cc b/sql/item.cc
index 6db1b355ed3..d4c860a009c 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5982,7 +5982,7 @@ String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst,
srccs == &my_charset_bin ?
dstcs->csname : srccs->csname,
err.ptr());
- return m_thd->is_strict_mode();
+ return false;
}
if (const char *pos= cannot_convert_error_pos())
{
@@ -5994,7 +5994,7 @@ String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst,
ER_CANNOT_CONVERT_CHARACTER,
ER_THD(m_thd, ER_CANNOT_CONVERT_CHARACTER),
srccs->csname, buf, dstcs->csname);
- return m_thd->is_strict_mode();
+ return false;
}
return false;
}
diff --git a/sql/item.h b/sql/item.h
index cee88756bbf..3bf1fd1113c 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -587,8 +587,7 @@ class Item_func_not;
class Item_splocal;
/**
- String_copier that honors the current sql_mode (strict vs non strict)
- and can send warnings.
+ String_copier that sends Item specific warnings.
*/
class String_copier_for_item: public String_copier
{
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 70f160991d0..599d818cf3f 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2422,7 +2422,7 @@ String *Item_char_typecast::copy(String *str, CHARSET_INFO *strcs)
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
+ null_value= 1; // EOM
return 0;
}
check_truncation_with_warn(str, copier.source_end_pos() - str->ptr());
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 5e7904b2b84..f6b065e96b1 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -1200,6 +1200,18 @@ static SHOW_VAR innodb_status_variables[]= {
{"encryption_key_rotation_list_length",
(char*)&export_vars.innodb_key_rotation_list_length,
SHOW_LONGLONG},
+ {"encryption_n_merge_blocks_encrypted",
+ (char*)&export_vars.innodb_n_merge_blocks_encrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_merge_blocks_decrypted",
+ (char*)&export_vars.innodb_n_merge_blocks_decrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_rowlog_blocks_encrypted",
+ (char*)&export_vars.innodb_n_rowlog_blocks_encrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_rowlog_blocks_decrypted",
+ (char*)&export_vars.innodb_n_rowlog_blocks_decrypted,
+ SHOW_LONGLONG},
/* scrubing */
{"scrub_background_page_reorganizations",
diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h
index a5f7c56cc3f..d972ca01491 100644
--- a/storage/innobase/include/log0crypt.h
+++ b/storage/innobase/include/log0crypt.h
@@ -82,4 +82,44 @@ UNIV_INTERN
void
log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt = false);
+/** Encrypt or decrypt a temporary file block.
+@param[in] src block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@param[in] encrypt true=encrypt; false=decrypt
+@return whether the operation succeeded */
+UNIV_INTERN
+bool
+log_tmp_block_encrypt(
+ const byte* src,
+ ulint size,
+ byte* dst,
+ uint64_t offs,
+ ulint space_id,
+ bool encrypt = true)
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
+
+/** Decrypt a temporary file block.
+@param[in] src block to decrypt
+@param[in] size size of the block
+@param[out] dst destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return whether the operation succeeded */
+inline
+bool
+log_tmp_block_decrypt(
+ const byte* src,
+ ulint size,
+ byte* dst,
+ uint64_t offs,
+ ulint space_id)
+{
+ return(log_tmp_block_encrypt(src, size, dst, offs, space_id, false));
+}
+
+/** @return whether temporary files are encrypted */
+inline bool log_tmp_is_encrypted() { return srv_encrypt_log; }
#endif // log0crypt.h
diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h
index b1f3b8ab328..c8556cc4ca4 100644
--- a/storage/innobase/include/row0ftsort.h
+++ b/storage/innobase/include/row0ftsort.h
@@ -73,7 +73,6 @@ struct fts_psort_common_t {
store Doc ID during sort, if
Doc ID will not be big enough
to use 8 bytes value */
- fil_space_crypt_t* crypt_data; /*!< crypt data or NULL */
};
struct fts_psort_t {
diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h
index 50c3361a3f9..8ab4e2a2ee3 100644
--- a/storage/innobase/include/row0merge.h
+++ b/storage/innobase/include/row0merge.h
@@ -44,9 +44,6 @@ Created 13/06/2005 Jan Lindstrom
/* Reserve free space from every block for key_version */
#define ROW_MERGE_RESERVE_SIZE 4
-/* Reserve free space from every block for key_version */
-#define ROW_MERGE_RESERVE_SIZE 4
-
/* Cluster index read task is mandatory */
#define COST_READ_CLUSTERED_INDEX 1.0
@@ -373,15 +370,15 @@ row_merge_buf_sort(
/********************************************************************//**
Write a merge block to the file system.
-@return TRUE if request was successful, FALSE if fail */
-ibool
+@return whether the request was completed successfully */
+UNIV_INTERN
+bool
row_merge_write(
/*============*/
int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */
const void* buf, /*!< in: data */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result));
@@ -414,7 +411,6 @@ row_merge_file_create(
@param[in] update_progress true, if we should update progress status
@param[in] pct_progress total progress percent until now
@param[in] pct_ocst current progress percent
-@param[in] crypt_data tale crypt data
@param[in] crypt_block crypt buf or NULL
@param[in] space space_id
@param[in,out] stage performance schema accounting object, used by
@@ -432,7 +428,6 @@ row_merge_sort(
const bool update_progress,
const double pct_progress,
const double pct_cost,
- fil_space_crypt_t* crypt_data,
row_merge_block_t* crypt_block,
ulint space,
ut_stage_alter_t* stage = NULL)
@@ -464,7 +459,7 @@ row_merge_file_destroy(
MY_ATTRIBUTE((nonnull));
/** Read a merge block from the file system.
-@return whether the request was successful */
+@return whether the request was completed successfully */
bool
row_merge_read(
/*===========*/
@@ -473,7 +468,6 @@ row_merge_read(
in number of row_merge_block_t
elements */
row_merge_block_t* buf, /*!< out: data */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result));
@@ -494,7 +488,6 @@ row_merge_read_rec(
or NULL on end of list
(non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result));
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 3eddd300acc..a51520e881c 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -129,6 +129,14 @@ struct srv_stats_t
ulint_ctr_64_t pages_encrypted;
/* Number of pages decrypted */
ulint_ctr_64_t pages_decrypted;
+ /* Number of merge blocks encrypted */
+ ulint_ctr_64_t n_merge_blocks_encrypted;
+ /* Number of merge blocks decrypted */
+ ulint_ctr_64_t n_merge_blocks_decrypted;
+ /* Number of row log blocks encrypted */
+ ulint_ctr_64_t n_rowlog_blocks_encrypted;
+ /* Number of row log blocks decrypted */
+ ulint_ctr_64_t n_rowlog_blocks_decrypted;
/** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read;
@@ -1052,6 +1060,15 @@ struct export_var_t{
int64_t innodb_pages_decrypted; /*!< Number of pages
decrypted */
+ /*!< Number of merge blocks encrypted */
+ ib_int64_t innodb_n_merge_blocks_encrypted;
+ /*!< Number of merge blocks decrypted */
+ ib_int64_t innodb_n_merge_blocks_decrypted;
+ /*!< Number of row log blocks encrypted */
+ ib_int64_t innodb_n_rowlog_blocks_encrypted;
+ /*!< Number of row log blocks decrypted */
+ ib_int64_t innodb_n_rowlog_blocks_decrypted;
+
ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */
diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc
index c0a10c74073..f527dfeb272 100644
--- a/storage/innobase/log/log0crypt.cc
+++ b/storage/innobase/log/log0crypt.cc
@@ -366,3 +366,44 @@ log_crypt_read_checkpoint_buf(const byte* buf)
return init_crypt_key(&info);
}
+
+/** Encrypt or decrypt a temporary file block.
+@param[in] src block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@param[in] encrypt true=encrypt; false=decrypt
+@return whether the operation succeeded */
+UNIV_INTERN
+bool
+log_tmp_block_encrypt(
+ const byte* src,
+ ulint size,
+ byte* dst,
+ uint64_t offs,
+ ulint space_id,
+ bool encrypt)
+{
+ uint dst_len;
+ uint64_t aes_ctr_iv[MY_AES_BLOCK_SIZE / sizeof(uint64_t)];
+ bzero(aes_ctr_iv, sizeof aes_ctr_iv);
+ aes_ctr_iv[0] = space_id;
+ aes_ctr_iv[1] = offs;
+
+ int rc = encryption_crypt(
+ src, size, dst, &dst_len,
+ const_cast<byte*>(info.crypt_key.bytes), sizeof info.crypt_key,
+ reinterpret_cast<byte*>(aes_ctr_iv), sizeof aes_ctr_iv,
+ encrypt
+ ? ENCRYPTION_FLAG_ENCRYPT|ENCRYPTION_FLAG_NOPAD
+ : ENCRYPTION_FLAG_DECRYPT|ENCRYPTION_FLAG_NOPAD,
+ LOG_DEFAULT_ENCRYPTION_KEY, info.key_version);
+
+ if (rc != MY_AES_OK) {
+ ib::error() << (encrypt ? "Encryption" : "Decryption")
+ << " failed for temporary file: " << rc;
+ }
+
+ return rc == MY_AES_OK;
+}
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index da5d96ccc18..dad00c58827 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -35,6 +35,7 @@ Created 10/13/2010 Jimmy Yang
#include "btr0cur.h"
#include "btr0bulk.h"
#include "fts0plugin.h"
+#include "log0crypt.h"
/** Read the next record to buffer N.
@param N index into array of merge info structure */
@@ -43,7 +44,7 @@ Created 10/13/2010 Jimmy Yang
b[N] = row_merge_read_rec( \
block[N], buf[N], b[N], index, \
fd[N], &foffs[N], &mrec[N], offsets[N], \
- crypt_data, crypt_block[N], space); \
+ crypt_block[N], space); \
if (UNIV_UNLIKELY(!b[N])) { \
if (mrec[N]) { \
goto exit; \
@@ -194,7 +195,6 @@ row_fts_psort_info_init(
fts_psort_t* merge_info = NULL;
ulint block_size;
ibool ret = TRUE;
- fil_space_crypt_t* crypt_data = NULL;
bool encrypted = false;
block_size = 3 * srv_sort_buf_size;
@@ -225,21 +225,8 @@ row_fts_psort_info_init(
common_info->merge_event = os_event_create(0);
common_info->opt_doc_id_size = opt_doc_id_size;
- /* Theoretically the tablespace can be dropped straight away.
- In practice, the DDL completion will wait for this thread to
- finish. */
- if (fil_space_t* space = fil_space_acquire(new_table->space)) {
- crypt_data = space->crypt_data;
- fil_space_release(space);
- }
-
- if (crypt_data && crypt_data->should_encrypt()) {
- common_info->crypt_data = crypt_data;
+ if (log_tmp_is_encrypted()) {
encrypted = true;
- } else {
- /* Not needed */
- common_info->crypt_data = NULL;
- crypt_data = NULL;
}
ut_ad(trx->mysql_thd != NULL);
@@ -698,11 +685,10 @@ row_merge_fts_doc_tokenize(
cur_len += len;
dfield_dup(field, buf->heap);
- /* Reserve one byte for the end marker of row_merge_block_t
- and we have reserved ROW_MERGE_RESERVE_SIZE (= 4) for
- encryption key_version in the beginning of the buffer. */
+ /* Reserve one byte for the end marker of row_merge_block_t */
if (buf->total_size + data_size[idx] + cur_len
- >= (srv_sort_buf_size - 1 - ROW_MERGE_RESERVE_SIZE)) {
+ >= srv_sort_buf_size - 1) {
+
buf_full = TRUE;
break;
}
@@ -798,7 +784,6 @@ fts_parallel_tokenization(
fts_tokenize_ctx_t t_ctx;
ulint retried = 0;
dberr_t error = DB_SUCCESS;
- fil_space_crypt_t* crypt_data = NULL;
ut_ad(psort_info->psort_common->trx->mysql_thd != NULL);
@@ -825,7 +810,6 @@ fts_parallel_tokenization(
block = psort_info->merge_block;
crypt_block = psort_info->crypt_block;
- crypt_data = psort_info->psort_common->crypt_data;
const page_size_t& page_size = dict_table_page_size(table);
@@ -918,7 +902,6 @@ loop:
if (!row_merge_write(merge_file[t_ctx.buf_used]->fd,
merge_file[t_ctx.buf_used]->offset++,
block[t_ctx.buf_used],
- crypt_data,
crypt_block[t_ctx.buf_used],
table->space)) {
error = DB_TEMP_FILE_WRITE_FAIL;
@@ -1013,7 +996,6 @@ exit:
if (!row_merge_write(merge_file[i]->fd,
merge_file[i]->offset++,
block[i],
- crypt_data,
crypt_block[i],
table->space)) {
error = DB_TEMP_FILE_WRITE_FAIL;
@@ -1053,7 +1035,7 @@ exit:
psort_info->psort_common->dup,
merge_file[i], block[i], &tmpfd[i],
false, 0.0/* pct_progress */, 0.0/* pct_cost */,
- crypt_data, crypt_block[i], table->space);
+ crypt_block[i], table->space);
if (error != DB_SUCCESS) {
close(tmpfd[i]);
@@ -1595,8 +1577,6 @@ row_fts_merge_insert(
ulint start;
fts_psort_insert_t ins_ctx;
ulint count_diag = 0;
- fil_space_crypt_t* crypt_data = NULL;
- ulint space=0;
fts_table_t fts_table;
char aux_table_name[MAX_FULL_NAME_LEN];
dict_table_t* aux_table;
@@ -1618,7 +1598,6 @@ row_fts_merge_insert(
trx->op_info = "inserting index entries";
ins_ctx.opt_doc_id_size = psort_info[0].psort_common->opt_doc_id_size;
- crypt_data = psort_info[0].psort_common->crypt_data;
heap = mem_heap_create(500 + sizeof(mrec_buf_t));
@@ -1723,6 +1702,7 @@ row_fts_merge_insert(
#ifdef UNIV_DEBUG
ins_ctx.aux_index_id = id;
#endif
+ const ulint space = table->space;
for (i = 0; i < fts_sort_pll_degree; i++) {
if (psort_info[i].merge_file[id]->n_rec == 0) {
@@ -1736,7 +1716,6 @@ row_fts_merge_insert(
&& (!row_merge_read(
fd[i], foffs[i],
(row_merge_block_t*) block[i],
- crypt_data,
(row_merge_block_t*) crypt_block[i],
space))) {
error = DB_CORRUPTION;
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 9e946757df3..1b3521a557c 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -30,6 +30,7 @@ Created 2011-05-26 Marko Makela
#include "row0upd.h"
#include "row0merge.h"
#include "row0ext.h"
+#include "log0crypt.h"
#include "data0data.h"
#include "que0que.h"
#include "srv0mon.h"
@@ -194,8 +195,14 @@ struct row_log_t {
row_log_buf_t tail; /*!< writer context;
protected by mutex and index->lock S-latch,
or by index->lock X-latch only */
+ byte* crypt_tail; /*!< writer context;
+ temporary buffer used in encryption,
+ decryption or NULL*/
row_log_buf_t head; /*!< reader context; protected by MDL only;
modifiable by row_log_apply_ops() */
+ byte* crypt_head; /*!< reader context;
+ temporary buffer used in encryption,
+ decryption or NULL */
ulint n_old_col;
/*!< number of non-virtual column in
old table */
@@ -358,39 +365,58 @@ row_log_online_op(
= (os_offset_t) log->tail.blocks
* srv_sort_buf_size;
IORequest request(IORequest::WRITE);
+ byte* buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed;
}
if (mrec_size == avail_size) {
- ut_ad(b == &log->tail.block[srv_sort_buf_size]);
+ ut_ad(b == &buf[srv_sort_buf_size]);
} else {
ut_ad(b == log->tail.buf + mrec_size);
- memcpy(log->tail.block + log->tail.bytes,
+ memcpy(buf + log->tail.bytes,
log->tail.buf, avail_size);
}
- UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size);
+ UNIV_MEM_ASSERT_RW(buf, srv_sort_buf_size);
if (row_log_tmpfile(log) < 0) {
log->error = DB_OUT_OF_MEMORY;
goto err_exit;
}
+ /* If encryption is enabled encrypt buffer before writing it
+ to file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt(
+ buf, srv_sort_buf_size,
+ log->crypt_tail, byte_offset,
+ index->table->space)) {
+ log->error = DB_DECRYPTION_FAILED;
+ goto write_failed;
+ }
+
+ srv_stats.n_rowlog_blocks_encrypted.inc();
+ buf = log->crypt_tail;
+ }
+
log->tail.blocks++;
if (!os_file_write_int_fd(
request,
"(modification log)",
log->fd,
- log->tail.block, byte_offset, srv_sort_buf_size)) {
+ buf, byte_offset, srv_sort_buf_size)) {
write_failed:
/* We set the flag directly instead of invoking
dict_set_corrupted_index_cache_only(index) here,
because the index is not "public" yet. */
index->type |= DICT_CORRUPT;
}
+
UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size);
+ UNIV_MEM_INVALID(buf, srv_sort_buf_size);
+
memcpy(log->tail.block, log->tail.buf + avail_size,
mrec_size - avail_size);
log->tail.bytes = mrec_size - avail_size;
@@ -460,13 +486,15 @@ static MY_ATTRIBUTE((nonnull))
void
row_log_table_close_func(
/*=====================*/
- row_log_t* log, /*!< in/out: online rebuild log */
+ dict_index_t* index, /*!< in/out: online rebuilt index */
#ifdef UNIV_DEBUG
const byte* b, /*!< in: end of log record */
#endif /* UNIV_DEBUG */
ulint size, /*!< in: size of log record */
ulint avail) /*!< in: available size for log record */
{
+ row_log_t* log = index->online_log;
+
ut_ad(mutex_own(&log->mutex));
if (size >= avail) {
@@ -474,36 +502,52 @@ row_log_table_close_func(
= (os_offset_t) log->tail.blocks
* srv_sort_buf_size;
IORequest request(IORequest::WRITE);
+ byte* buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed;
}
if (size == avail) {
- ut_ad(b == &log->tail.block[srv_sort_buf_size]);
+ ut_ad(b == &buf[srv_sort_buf_size]);
} else {
ut_ad(b == log->tail.buf + size);
- memcpy(log->tail.block + log->tail.bytes,
- log->tail.buf, avail);
+ memcpy(buf + log->tail.bytes, log->tail.buf, avail);
}
- UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size);
+ UNIV_MEM_ASSERT_RW(buf, srv_sort_buf_size);
if (row_log_tmpfile(log) < 0) {
log->error = DB_OUT_OF_MEMORY;
goto err_exit;
}
+ /* If encryption is enabled encrypt buffer before writing it
+ to file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt(
+ log->tail.block, srv_sort_buf_size,
+ log->crypt_tail, byte_offset,
+ index->table->space)) {
+ log->error = DB_DECRYPTION_FAILED;
+ goto err_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_encrypted.inc();
+ buf = log->crypt_tail;
+ }
+
log->tail.blocks++;
if (!os_file_write_int_fd(
request,
"(modification log)",
log->fd,
- log->tail.block, byte_offset, srv_sort_buf_size)) {
+ buf, byte_offset, srv_sort_buf_size)) {
write_failed:
log->error = DB_ONLINE_LOG_TOO_BIG;
}
UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size);
+ UNIV_MEM_INVALID(buf, srv_sort_buf_size);
memcpy(log->tail.block, log->tail.buf + avail, size - avail);
log->tail.bytes = size - avail;
} else {
@@ -522,11 +566,11 @@ err_exit:
}
#ifdef UNIV_DEBUG
-# define row_log_table_close(log, b, size, avail) \
- row_log_table_close_func(log, b, size, avail)
+# define row_log_table_close(index, b, size, avail) \
+ row_log_table_close_func(index, b, size, avail)
#else /* UNIV_DEBUG */
# define row_log_table_close(log, b, size, avail) \
- row_log_table_close_func(log, size, avail)
+ row_log_table_close_func(index, size, avail)
#endif /* UNIV_DEBUG */
/** Check whether a virtual column is indexed in the new table being
@@ -722,8 +766,7 @@ row_log_table_delete(
b += mach_read_from_2(b);
}
- row_log_table_close(
- index->online_log, b, mrec_size, avail_size);
+ row_log_table_close(index, b, mrec_size, avail_size);
}
func_exit:
@@ -885,8 +928,7 @@ row_log_table_low_redundant(
b += 2;
}
- row_log_table_close(
- index->online_log, b, mrec_size, avail_size);
+ row_log_table_close(index, b, mrec_size, avail_size);
}
mem_heap_free(heap);
@@ -1038,8 +1080,7 @@ row_log_table_low(
b += 2;
}
- row_log_table_close(
- index->online_log, b, mrec_size, avail_size);
+ row_log_table_close(index, b, mrec_size, avail_size);
}
}
@@ -2885,19 +2926,31 @@ all_done:
}
IORequest request(IORequest::READ);
-
+ byte* buf = index->online_log->head.block;
if (!os_file_read_no_error_handling_int_fd(
- request,
- index->online_log->fd,
- index->online_log->head.block, ofs,
- srv_sort_buf_size)) {
+ request, index->online_log->fd,
+ buf, ofs, srv_sort_buf_size)) {
ib::error()
<< "Unable to read temporary file"
" for table " << index->table_name;
goto corruption;
}
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(
+ buf, srv_sort_buf_size,
+ index->online_log->crypt_head,
+ ofs, index->table->space)) {
+ error = DB_DECRYPTION_FAILED;
+ goto func_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_decrypted.inc();
+ memcpy(buf, index->online_log->crypt_head,
+ srv_sort_buf_size);
+ }
+
#ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */
posix_fadvise(index->online_log->fd,
@@ -3193,6 +3246,7 @@ row_log_allocate(
log->tail.blocks = log->tail.bytes = 0;
log->tail.total = 0;
log->tail.block = log->head.block = NULL;
+ log->crypt_tail = log->crypt_head = NULL;
log->head.blocks = log->head.bytes = 0;
log->head.total = 0;
log->path = path;
@@ -3202,6 +3256,17 @@ row_log_allocate(
dict_index_set_online_status(index, ONLINE_INDEX_CREATION);
index->online_log = log;
+ if (log_tmp_is_encrypted()) {
+ ulint size = srv_sort_buf_size;
+ log->crypt_head = static_cast<byte *>(os_mem_alloc_large(&size));
+ log->crypt_tail = static_cast<byte *>(os_mem_alloc_large(&size));
+
+ if (!log->crypt_head || !log->crypt_tail) {
+ row_log_free(log);
+ DBUG_RETURN(false);
+ }
+ }
+
/* While we might be holding an exclusive data dictionary lock
here, in row_log_abort_sec() we will not always be holding it. Use
atomic operations in both cases. */
@@ -3223,6 +3288,15 @@ row_log_free(
row_log_block_free(log->tail);
row_log_block_free(log->head);
row_merge_file_destroy_low(log->fd);
+
+ if (log->crypt_head) {
+ os_mem_free_large(log->crypt_head, srv_sort_buf_size);
+ }
+
+ if (log->crypt_tail) {
+ os_mem_free_large(log->crypt_tail, srv_sort_buf_size);
+ }
+
mutex_free(&log->mutex);
ut_free(log);
log = NULL;
@@ -3717,17 +3791,30 @@ all_done:
goto func_exit;
}
+ byte* buf = index->online_log->head.block;
+
if (!os_file_read_no_error_handling_int_fd(
- request,
- index->online_log->fd,
- index->online_log->head.block, ofs,
- srv_sort_buf_size)) {
+ request, index->online_log->fd,
+ buf, ofs, srv_sort_buf_size)) {
ib::error()
<< "Unable to read temporary file"
" for index " << index->name;
goto corruption;
}
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(
+ buf, srv_sort_buf_size,
+ index->online_log->crypt_head,
+ ofs, index->table->space)) {
+ error = DB_DECRYPTION_FAILED;
+ goto func_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_decrypted.inc();
+ memcpy(buf, index->online_log->crypt_head, srv_sort_buf_size);
+ }
+
#ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */
posix_fadvise(index->online_log->fd,
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 85fac6c0bba..8c02edcb3cc 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -37,6 +37,7 @@ Completed by Sunny Bains and Marko Makela
#include "row0log.h"
#include "row0ins.h"
#include "row0sel.h"
+#include "log0crypt.h"
#include "dict0crea.h"
#include "trx0purge.h"
#include "lock0lock.h"
@@ -270,92 +271,6 @@ private:
/* Maximum pending doc memory limit in bytes for a fts tokenization thread */
#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000
-/******************************************************//**
-Encrypt a merge block. */
-static
-void
-row_merge_encrypt_buf(
-/*==================*/
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
- ulint offset, /*!< in: offset where to
- write */
- ulint space, /*!< in: tablespace id */
- const byte* input_buf, /*!< in: input buffer */
- byte* crypted_buf) /*!< out: crypted buffer */
-{
- uint key_version;
- uint dstlen=0;
- uint ofs = (uint)(srv_sort_buf_size * offset);
-
- key_version = encryption_key_get_latest_version(crypt_data->key_id);
-
- /* Store key_version at the beginning of the input buffer */
- mach_write_to_4((byte *)crypted_buf, key_version);
-
- int rc = encryption_scheme_encrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
- srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
- crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
- crypt_data, key_version,
- space, ofs, 0);
-
- if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
- ib::fatal()
- << "Unable to encrypt data-block "
- " src: " << static_cast<const void*>(input_buf)
- << " srclen: " << srv_sort_buf_size
- << " buf: " << static_cast<const void*>(crypted_buf)
- << " buflen: " << dstlen
- << ". return-code: " << rc << ". Can't continue!";
- }
-}
-
-/******************************************************//**
-Decrypt a merge block. */
-static
-bool
-row_merge_decrypt_buf(
-/*==================*/
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
- ulint offset, /*!< in: offset where to
- write */
- ulint space, /*!< in: tablespace id */
- const byte* input_buf, /*!< in: input buffer */
- byte* crypted_buf) /*!< out: crypted buffer */
-{
- uint key_version;
- uint dstlen=0;
- uint ofs = (uint)(srv_sort_buf_size * offset);
-
- /* Read key_version from beginning of the buffer */
- key_version = mach_read_from_4((byte *)input_buf);
-
- if (key_version == 0) {
- /* block not encrypted */
- return false;
- }
-
- int rc = encryption_scheme_decrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
- srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
- crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
- crypt_data, key_version,
- space, ofs, 0);
-
- if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
- ib::fatal()
- << "Unable to decrypt data-block "
- << " src: " << static_cast<const void*>(input_buf)
- << " srclen: " << srv_sort_buf_size
- << " buf: " << static_cast<const void*>(crypted_buf)
- << " buflen: " << dstlen
- << ". return-code: " << rc << ". Can't continue!";
- }
-
- return true;
-}
-
-/* Maximum pending doc memory limit in bytes for a fts tokenization thread */
-#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000
-
/** Insert sorted data tuples to the index.
@param[in] trx_id transaction identifier
@param[in] index index to be inserted
@@ -384,7 +299,6 @@ row_merge_insert_index_tuples(
percent until now */
const double pct_cost, /*!< in: current progress percent
*/
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */
ut_stage_alter_t* stage = NULL);
@@ -469,7 +383,7 @@ row_merge_buf_create(
ulint buf_size;
mem_heap_t* heap;
- max_tuples = (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE)
+ max_tuples = srv_sort_buf_size
/ ut_max(static_cast<ulint>(1),
dict_index_get_min_size(index));
@@ -917,7 +831,7 @@ row_merge_buf_add(
ut_ad(data_size < srv_sort_buf_size);
/* Reserve bytes for the end marker of row_merge_block_t. */
- if (buf->total_size + data_size >= (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE)) {
+ if (buf->total_size + data_size >= srv_sort_buf_size) {
DBUG_RETURN(0);
}
@@ -1039,7 +953,7 @@ respectively */
/**********************************************************************//**
Merge sort the tuple buffer in main memory. */
-static MY_ATTRIBUTE((nonnull(4,5)))
+static
void
row_merge_tuple_sort(
/*=================*/
@@ -1090,7 +1004,7 @@ row_merge_buf_write(
{
const dict_index_t* index = buf->index;
ulint n_fields= dict_index_get_n_fields(index);
- byte* b = &block[ROW_MERGE_RESERVE_SIZE];
+ byte* b = &block[0];
DBUG_ENTER("row_merge_buf_write");
@@ -1109,7 +1023,7 @@ row_merge_buf_write(
/* Write an "end-of-chunk" marker. */
ut_a(b < &block[srv_sort_buf_size]);
- ut_a(b == &block[0] + buf->total_size + ROW_MERGE_RESERVE_SIZE);
+ ut_a(b == &block[0] + buf->total_size);
*b++ = 0;
#ifdef UNIV_DEBUG_VALGRIND
/* The rest of the block is uninitialized. Initialize it
@@ -1154,7 +1068,7 @@ row_merge_heap_create(
}
/** Read a merge block from the file system.
-@return whether the request was successful */
+@return whether the request was completed successfully */
bool
row_merge_read(
/*===========*/
@@ -1163,9 +1077,8 @@ row_merge_read(
in number of row_merge_block_t
elements */
row_merge_block_t* buf, /*!< out: data */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
os_offset_t ofs = ((os_offset_t) offset) * srv_sort_buf_size;
@@ -1178,10 +1091,14 @@ row_merge_read(
request, fd, buf, ofs, srv_sort_buf_size);
/* For encrypted tables, decrypt data after reading and copy data */
- if (crypt_data && crypt_buf) {
- if (row_merge_decrypt_buf(crypt_data, offset, space, buf, crypt_buf)) {
- memcpy(buf, crypt_buf, srv_sort_buf_size);
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(buf, srv_sort_buf_size,
+ crypt_buf, ofs, space)) {
+ return (FALSE);
}
+
+ srv_stats.n_merge_blocks_decrypted.inc();
+ memcpy(buf, crypt_buf, srv_sort_buf_size);
}
#ifdef POSIX_FADV_DONTNEED
@@ -1198,15 +1115,15 @@ row_merge_read(
/********************************************************************//**
Write a merge block to the file system.
-@return TRUE if request was successful, FALSE if fail */
-ibool
+@return whether the request was completed successfully */
+UNIV_INTERN
+bool
row_merge_write(
/*============*/
int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */
const void* buf, /*!< in: data */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
{
@@ -1218,12 +1135,17 @@ row_merge_write(
DBUG_LOG("ib_merge_sort", "fd=" << fd << " ofs=" << ofs);
DBUG_EXECUTE_IF("row_merge_write_failure", DBUG_RETURN(FALSE););
- if (crypt_data && crypt_buf) {
- row_merge_encrypt_buf(crypt_data, offset, space, (const byte *)buf, (byte *)crypt_buf);
+ /* For encrypted tables, encrypt data before writing */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt(static_cast<const byte*>(buf),
+ buf_len,
+ static_cast<byte*>(crypt_buf),
+ ofs, space)) {
+ return false;
+ }
+
+ srv_stats.n_merge_blocks_encrypted.inc();
out_buf = crypt_buf;
- } else {
- /* Mark block unencrypted */
- mach_write_to_4((byte *)out_buf, 0);
}
IORequest request(IORequest::WRITE);
@@ -1255,9 +1177,8 @@ row_merge_read_rec(
or NULL on end of list
(non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
ulint extra_size;
ulint data_size;
@@ -1271,10 +1192,6 @@ row_merge_read_rec(
DBUG_ENTER("row_merge_read_rec");
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
extra_size = *b++;
if (UNIV_UNLIKELY(!extra_size)) {
@@ -1292,7 +1209,8 @@ row_merge_read_rec(
if (UNIV_UNLIKELY(b >= &block[srv_sort_buf_size])) {
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
err_exit:
/* Signal I/O error. */
*mrec = b;
@@ -1300,7 +1218,7 @@ err_exit:
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
}
extra_size = (extra_size & 0x7f) << 8;
@@ -1322,13 +1240,14 @@ err_exit:
memcpy(*buf, b, avail_size);
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
goto err_exit;
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
/* Copy the record. */
memcpy(*buf + avail_size, b, extra_size - avail_size);
@@ -1383,13 +1302,14 @@ err_exit:
ut_d(offsets[3] = (ulint) index);
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
goto err_exit;
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
/* Copy the rest of the record. */
memcpy(*buf + avail_size, b, extra_size + data_size - avail_size);
@@ -1461,7 +1381,6 @@ row_merge_write_rec(
ulint* foffs, /*!< in/out: file offset */
const mrec_t* mrec, /*!< in: record to write */
const ulint* offsets,/*!< in: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
{
@@ -1484,10 +1403,6 @@ row_merge_write_rec(
size = extra_size + (extra_size >= 0x80)
+ rec_offs_data_size(offsets);
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
if (UNIV_UNLIKELY(b + size >= &block[srv_sort_buf_size])) {
/* The record spans two blocks.
Copy it to the temporary buffer first. */
@@ -1503,14 +1418,15 @@ row_merge_write_rec(
memcpy(b, buf[0], avail_size);
if (!row_merge_write(fd, (*foffs)++, block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
return(NULL);
}
UNIV_MEM_INVALID(&block[0], srv_sort_buf_size);
/* Copy the rest. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
memcpy(b, buf[0] + avail_size, size - avail_size);
b += size - avail_size;
} else {
@@ -1533,7 +1449,6 @@ row_merge_write_eof(
byte* b, /*!< in: pointer to end of block */
int fd, /*!< in: file descriptor */
ulint* foffs, /*!< in/out: file offset */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
{
@@ -1548,10 +1463,6 @@ row_merge_write_eof(
reinterpret_cast<const void*>(block) <<
",fd=" << fd << ',' << *foffs);
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
*b++ = 0;
UNIV_MEM_ASSERT_RW(&block[0], b - &block[0]);
UNIV_MEM_ASSERT_W(&block[0], srv_sort_buf_size);
@@ -1562,8 +1473,7 @@ row_merge_write_eof(
memset(b, 0xff, &block[srv_sort_buf_size] - b);
#endif /* UNIV_DEBUG_VALGRIND */
- if (!row_merge_write(fd, (*foffs)++, block,
- crypt_data, crypt_block, space)) {
+ if (!row_merge_write(fd, (*foffs)++, block, crypt_block, space)) {
DBUG_RETURN(NULL);
}
@@ -1763,6 +1673,8 @@ existing order
@param[in,out] stage performance schema accounting object, used by
ALTER TABLE. stage->n_pk_recs_inc() will be called for each record read and
stage->inc() will be called for each page read.
+@param[in] pct_cost percent of task weight out of total alter job
+@param[in,out] crypt_block crypted file buffer
@param[in] eval_table mysql table used to evaluate virtual column
value, see innobase_get_computed_value().
@return DB_SUCCESS or error */
@@ -1790,10 +1702,8 @@ row_merge_read_clustered_index(
int* tmpfd,
ut_stage_alter_t* stage,
double pct_cost,
- fil_space_crypt_t* crypt_data,
row_merge_block_t* crypt_block,
struct TABLE* eval_table)
-
{
dict_index_t* clust_index; /* Clustered index */
mem_heap_t* row_heap; /* Heap memory to create
@@ -2490,8 +2400,7 @@ write_buffers:
table_total_rows,
curr_progress,
pct_cost,
- NULL,
- NULL,
+ crypt_block,
new_table->space);
if (row == NULL) {
@@ -2602,8 +2511,7 @@ write_buffers:
table_total_rows,
curr_progress,
pct_cost,
- NULL,
- NULL,
+ crypt_block,
new_table->space);
err = btr_bulk.finish(err);
@@ -2635,8 +2543,10 @@ write_buffers:
row_merge_buf_write(buf, file, block);
- if (!row_merge_write(file->fd, file->offset++, block,
- crypt_data, crypt_block, new_table->space)) {
+ if (!row_merge_write(
+ file->fd, file->offset++,
+ block, crypt_block,
+ new_table->space)) {
err = DB_TEMP_FILE_WRITE_FAIL;
trx->error_key_num = i;
break;
@@ -2689,7 +2599,7 @@ write_buffers:
if(read_rows % 1000 == 0) {
/* Update progress for each 1000 rows */
curr_progress = (read_rows >= table_total_rows) ?
- pct_cost :
+ pct_cost :
((pct_cost * read_rows) / table_total_rows);
/* presenting 10.12% as 1012 integer */
onlineddl_pct_progress = (ulint) (curr_progress * 100);
@@ -2845,9 +2755,8 @@ wait_again:
&buf[2], b2, \
of->fd, &of->offset, \
mrec##N, offsets##N, \
- crypt_data, \
crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL , \
- space); \
+ space); \
if (UNIV_UNLIKELY(!b2 || ++of->n_rec > file->n_rec)) { \
goto corrupt; \
} \
@@ -2855,7 +2764,6 @@ wait_again:
&buf[N], b##N, INDEX, \
file->fd, foffs##N, \
&mrec##N, offsets##N, \
- crypt_data, \
crypt_block ? &crypt_block[N * srv_sort_buf_size] : NULL, \
space); \
\
@@ -2888,6 +2796,8 @@ wait_again:
@param[in,out] foffs1 offset of second source list in the file
@param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by
+@param[in,out] crypt_block encryption buffer
+@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record
processed.
@return DB_SUCCESS or error code */
@@ -2901,10 +2811,8 @@ row_merge_blocks(
ulint* foffs1,
merge_file_t* of,
ut_stage_alter_t* stage,
- fil_space_crypt_t* crypt_data,/*!< in: crypt data or NULL */
- row_merge_block_t* crypt_block,/*!< in: in/out: crypted file
- buffer */
- ulint space) /*!< in: space id */
+ row_merge_block_t* crypt_block,
+ ulint space)
{
mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */
@@ -2930,9 +2838,11 @@ row_merge_blocks(
file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0],
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space)
- || !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size],
- crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space)) {
+ crypt_block ? &crypt_block[0] : NULL,
+ space) ||
+ !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size],
+ crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
+ space)) {
corrupt:
mem_heap_free(heap);
DBUG_RETURN(DB_CORRUPTION);
@@ -2945,13 +2855,15 @@ corrupt:
b0 = row_merge_read_rec(
&block[0], &buf[0], b0, dup->index,
file->fd, foffs0, &mrec0, offsets0,
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space);
+ crypt_block ? &crypt_block[0] : NULL,
+ space);
b1 = row_merge_read_rec(
&block[srv_sort_buf_size],
&buf[srv_sort_buf_size], b1, dup->index,
file->fd, foffs1, &mrec1, offsets1,
- crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space);
+ crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
+ space);
if (UNIV_UNLIKELY(!b0 && mrec0)
|| UNIV_UNLIKELY(!b1 && mrec1)) {
@@ -2991,11 +2903,12 @@ done1:
mem_heap_free(heap);
- b2 = row_merge_write_eof(&block[2 * srv_sort_buf_size],
+ b2 = row_merge_write_eof(
+ &block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset,
- crypt_data, crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space);
+ crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL,
+ space);
DBUG_RETURN(b2 ? DB_SUCCESS : DB_CORRUPTION);
-
}
/** Copy a block of index entries.
@@ -3005,6 +2918,8 @@ done1:
@param[in,out] foffs0 input file offset
@param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by
+@param[in,out] crypt_block encryption buffer
+@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record
processed.
@return TRUE on success, FALSE on failure */
@@ -3017,9 +2932,8 @@ row_merge_blocks_copy(
ulint* foffs0,
merge_file_t* of,
ut_stage_alter_t* stage,
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
- row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ row_merge_block_t* crypt_block,
+ ulint space)
{
mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */
@@ -3042,7 +2956,8 @@ row_merge_blocks_copy(
file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0],
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space)) {
+ crypt_block ? &crypt_block[0] : NULL,
+ space)) {
corrupt:
mem_heap_free(heap);
DBUG_RETURN(FALSE);
@@ -3054,7 +2969,8 @@ corrupt:
b0 = row_merge_read_rec(&block[0], &buf[0], b0, index,
file->fd, foffs0, &mrec0, offsets0,
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space);
+ crypt_block ? &crypt_block[0] : NULL,
+ space);
if (UNIV_UNLIKELY(!b0 && mrec0)) {
@@ -3075,10 +2991,12 @@ done0:
mem_heap_free(heap);
- DBUG_RETURN(row_merge_write_eof(&block[2 * srv_sort_buf_size],
- b2, of->fd, &of->offset,
- crypt_data,
- crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space)
+ DBUG_RETURN(row_merge_write_eof(
+ &block[2 * srv_sort_buf_size],
+ b2, of->fd, &of->offset,
+ crypt_block
+ ? &crypt_block[2 * srv_sort_buf_size]
+ : NULL, space)
!= NULL);
}
@@ -3092,6 +3010,8 @@ done0:
@param[in,out] run_offset Array that contains the first offset number
for each merge run
@param[in,out] stage performance schema accounting object, used by
+@param[in,out] crypt_block encryption buffer
+@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record
processed.
@return DB_SUCCESS or error code */
@@ -3106,9 +3026,8 @@ row_merge(
ulint* num_run,
ulint* run_offset,
ut_stage_alter_t* stage,
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
- row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ row_merge_block_t* crypt_block,
+ ulint space)
{
ulint foffs0; /*!< first input offset */
ulint foffs1; /*!< second input offset */
@@ -3156,7 +3075,7 @@ row_merge(
error = row_merge_blocks(dup, file, block,
&foffs0, &foffs1, &of, stage,
- crypt_data, crypt_block, space);
+ crypt_block, space);
if (error != DB_SUCCESS) {
return(error);
@@ -3177,7 +3096,7 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block,
&foffs0, &of, stage,
- crypt_data, crypt_block, space)) {
+ crypt_block, space)) {
return(DB_CORRUPTION);
}
}
@@ -3195,7 +3114,7 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block,
&foffs1, &of, stage,
- crypt_data, crypt_block, space)) {
+ crypt_block, space)) {
return(DB_CORRUPTION);
}
}
@@ -3253,7 +3172,6 @@ row_merge_sort(
/*!< in: total progress percent
until now */
const double pct_cost, /*!< in: current progress percent */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */
ut_stage_alter_t* stage)
@@ -3328,7 +3246,7 @@ row_merge_sort(
error = row_merge(trx, dup, file, block, tmpfd,
&num_runs, run_offset, stage,
- crypt_data, crypt_block, space);
+ crypt_block, space);
if(update_progress) {
merge_count++;
@@ -3471,7 +3389,6 @@ row_merge_insert_index_tuples(
percent until now */
const double pct_cost, /*!< in: current progress percent
*/
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */
ut_stage_alter_t* stage)
@@ -3532,8 +3449,7 @@ row_merge_insert_index_tuples(
b = block;
dtuple = NULL;
- if (!row_merge_read(fd, foffs, block,
- crypt_data, crypt_block, space)) {
+ if (!row_merge_read(fd, foffs, block, crypt_block, space)) {
error = DB_CORRUPTION;
goto err_exit;
} else {
@@ -3542,7 +3458,6 @@ row_merge_insert_index_tuples(
}
}
-
for (;;) {
if (stage != NULL) {
@@ -3566,7 +3481,9 @@ row_merge_insert_index_tuples(
} else {
b = row_merge_read_rec(block, buf, b, index,
fd, &foffs, &mrec, offsets,
- crypt_data, crypt_block, space);
+ crypt_block,
+ space);
+
if (UNIV_UNLIKELY(!b)) {
/* End of list, or I/O error */
if (mrec) {
@@ -4665,7 +4582,6 @@ row_merge_build_indexes(
fts_psort_t* merge_info = NULL;
int64_t sig_count = 0;
bool fts_psort_initiated = false;
- fil_space_crypt_t * crypt_data = NULL;
double total_static_cost = 0;
double total_dynamic_cost = 0;
@@ -4696,28 +4612,14 @@ row_merge_build_indexes(
DBUG_RETURN(DB_OUT_OF_MEMORY);
}
- /* Get crypt data from tablespace if present. We should be protected
- from concurrent DDL (e.g. drop table) by MDL-locks. */
- FilSpace space(new_table->space);
-
- if (const fil_space_t* fs = space()) {
- crypt_data = fs->crypt_data;
- } else {
- DBUG_RETURN(DB_TABLESPACE_NOT_FOUND);
- }
-
- /* If tablespace is encrypted, allocate additional buffer for
- encryption/decryption. */
- if (crypt_data && crypt_data->should_encrypt()) {
+ if (log_tmp_is_encrypted()) {
crypt_block = static_cast<row_merge_block_t*>(
- alloc.allocate_large(3 * srv_sort_buf_size, &crypt_pfx));
+ alloc.allocate_large(3 * srv_sort_buf_size,
+ &crypt_pfx));
if (crypt_block == NULL) {
DBUG_RETURN(DB_OUT_OF_MEMORY);
}
- } else {
- /* Not needed */
- crypt_data = NULL;
}
trx_start_if_not_started_xa(trx, true);
@@ -4824,11 +4726,11 @@ row_merge_build_indexes(
/* Read clustered index of the table and create files for
secondary index entries for merge sort */
error = row_merge_read_clustered_index(
- trx, table, old_table, new_table, online, indexes,
- fts_sort_idx, psort_info, merge_files, key_numbers,
- n_indexes, add_cols, add_v, col_map, add_autoinc,
- sequence, block, skip_pk_sort, &tmpfd, stage,
- pct_cost, crypt_data, crypt_block, eval_table);
+ trx, table, old_table, new_table, online, indexes,
+ fts_sort_idx, psort_info, merge_files, key_numbers,
+ n_indexes, add_cols, add_v, col_map, add_autoinc,
+ sequence, block, skip_pk_sort, &tmpfd, stage,
+ pct_cost, crypt_block, eval_table);
stage->end_phase_read_pk();
@@ -4853,10 +4755,6 @@ row_merge_build_indexes(
/* Now we have files containing index entries ready for
sorting and inserting. */
- DBUG_EXECUTE_IF(
- "ib_merge_wait_after_read",
- os_thread_sleep(20000000);); /* 20 sec */
-
for (i = 0; i < n_indexes; i++) {
dict_index_t* sort_idx = indexes[i];
@@ -4969,7 +4867,7 @@ wait_again:
trx, &dup, &merge_files[i],
block, &tmpfd, true,
pct_progress, pct_cost,
- crypt_data, crypt_block, new_table->space, stage);
+ crypt_block, new_table->space, stage);
pct_progress += pct_cost;
@@ -5012,7 +4910,7 @@ wait_again:
merge_files[i].fd, block, NULL,
&btr_bulk,
merge_files[i].n_rec, pct_progress, pct_cost,
- crypt_data, crypt_block, new_table->space, stage);
+ crypt_block, new_table->space, stage);
error = btr_bulk.finish(error);
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 663487fc3a6..ce1a30659ed 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1623,6 +1623,10 @@ srv_export_innodb_status(void)
export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error;
export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted;
export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted;
+ export_vars.innodb_n_merge_blocks_encrypted = srv_stats.n_merge_blocks_encrypted;
+ export_vars.innodb_n_merge_blocks_decrypted = srv_stats.n_merge_blocks_decrypted;
+ export_vars.innodb_n_rowlog_blocks_encrypted = srv_stats.n_rowlog_blocks_encrypted;
+ export_vars.innodb_n_rowlog_blocks_decrypted = srv_stats.n_rowlog_blocks_decrypted;
export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures;
diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc
index 1f40f971be3..59470b95c35 100644
--- a/storage/xtradb/btr/btr0cur.cc
+++ b/storage/xtradb/btr/btr0cur.cc
@@ -4378,8 +4378,8 @@ btr_estimate_number_of_different_key_vals(
*/
if (index->stat_index_size > 1) {
n_sample_pages = (srv_stats_transient_sample_pages < index->stat_index_size) ?
- (ulint) ut_min((double) index->stat_index_size,
- log2(index->stat_index_size)*srv_stats_transient_sample_pages)
+ ut_min(index->stat_index_size,
+ ulint(log2(index->stat_index_size)*srv_stats_transient_sample_pages))
: index->stat_index_size;
}
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 86496288b51..a56dda417cc 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -1314,6 +1314,18 @@ static SHOW_VAR innodb_status_variables[]= {
{"encryption_key_rotation_list_length",
(char*)&export_vars.innodb_key_rotation_list_length,
SHOW_LONGLONG},
+ {"encryption_n_merge_blocks_encrypted",
+ (char*)&export_vars.innodb_n_merge_blocks_encrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_merge_blocks_decrypted",
+ (char*)&export_vars.innodb_n_merge_blocks_decrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_rowlog_blocks_encrypted",
+ (char*)&export_vars.innodb_n_rowlog_blocks_encrypted,
+ SHOW_LONGLONG},
+ {"encryption_n_rowlog_blocks_decrypted",
+ (char*)&export_vars.innodb_n_rowlog_blocks_decrypted,
+ SHOW_LONGLONG},
/* Scrubing feature */
{"scrub_background_page_reorganizations",
@@ -21900,27 +21912,21 @@ ib_logf(
str = static_cast<char*>(malloc(BUFSIZ));
my_vsnprintf(str, BUFSIZ, format, args);
#endif /* __WIN__ */
- if (!IS_XTRABACKUP()) {
- switch (level) {
- case IB_LOG_LEVEL_INFO:
- sql_print_information("InnoDB: %s", str);
- break;
- case IB_LOG_LEVEL_WARN:
- sql_print_warning("InnoDB: %s", str);
- break;
- case IB_LOG_LEVEL_ERROR:
- sql_print_error("InnoDB: %s", str);
- sd_notifyf(0, "STATUS=InnoDB: Error: %s", str);
- break;
- case IB_LOG_LEVEL_FATAL:
- sql_print_error("InnoDB: %s", str);
- sd_notifyf(0, "STATUS=InnoDB: Fatal: %s", str);
- break;
- }
- }
- else {
- /* Don't use server logger for XtraBackup, just print to stderr. */
- fprintf(stderr, "InnoDB: %s\n", str);
+ switch (level) {
+ case IB_LOG_LEVEL_INFO:
+ sql_print_information("InnoDB: %s", str);
+ break;
+ case IB_LOG_LEVEL_WARN:
+ sql_print_warning("InnoDB: %s", str);
+ break;
+ case IB_LOG_LEVEL_ERROR:
+ sql_print_error("InnoDB: %s", str);
+ sd_notifyf(0, "STATUS=InnoDB: Error: %s", str);
+ break;
+ case IB_LOG_LEVEL_FATAL:
+ sql_print_error("InnoDB: %s", str);
+ sd_notifyf(0, "STATUS=InnoDB: Fatal: %s", str);
+ break;
}
va_end(args);
diff --git a/storage/xtradb/include/log0crypt.h b/storage/xtradb/include/log0crypt.h
index 6b164e90d6e..0ad7e7d7037 100644
--- a/storage/xtradb/include/log0crypt.h
+++ b/storage/xtradb/include/log0crypt.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved.
+Copyright (C) 2014, 2017, MariaDB Corporation. All Rights Reserved.
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
@@ -29,6 +29,7 @@ Modified Jan Lindström jan.lindstrom@mariadb.com
#include "univ.i"
#include "ut0byte.h"
#include "my_crypt.h"
+#include "os0file.h"
typedef int Crypt_result;
@@ -125,4 +126,45 @@ log_crypt_print_checkpoint_keys(
/*============================*/
const byte* log_block);
+/** Encrypt temporary log block.
+@param[in] src_block block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst_block destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return true if successfull, false in case of failure
+*/
+UNIV_INTERN
+bool
+log_tmp_block_encrypt(
+ const byte* src_block,
+ ulint size,
+ byte* dst_block,
+ os_offset_t offs,
+ ulint space_id)
+ MY_ATTRIBUTE((warn_unused_result));
+
+/** Decrypt temporary log block.
+@param[in] src_block block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst_block destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return true if successfull, false in case of failure
+*/
+UNIV_INTERN
+bool
+log_tmp_block_decrypt(
+ const byte* src_block,
+ ulint size,
+ byte* dst_block,
+ os_offset_t offs,
+ ulint space_id)
+ MY_ATTRIBUTE((warn_unused_result));
+
+/** Find out is temporary log files encrypted.
+@return true if temporary log file should be encrypted, false if not */
+UNIV_INTERN
+bool
+log_tmp_is_encrypted() MY_ATTRIBUTE((warn_unused_result));
#endif // log0crypt.h
diff --git a/storage/xtradb/include/page0zip.ic b/storage/xtradb/include/page0zip.ic
index bee35a48cc2..3fa8a08c4f9 100644
--- a/storage/xtradb/include/page0zip.ic
+++ b/storage/xtradb/include/page0zip.ic
@@ -174,7 +174,7 @@ page_zip_rec_needs_ext(
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
{
ut_ad(rec_size
- > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
+ > ulint(comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
ut_ad(ut_is_2pow(zip_size));
ut_ad(comp || !zip_size);
diff --git a/storage/xtradb/include/row0ftsort.h b/storage/xtradb/include/row0ftsort.h
index 7c9ed23645c..b2dd90e7e3b 100644
--- a/storage/xtradb/include/row0ftsort.h
+++ b/storage/xtradb/include/row0ftsort.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation.
+Copyright (c) 2016, 2017, MariaDB Corporation.
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
@@ -72,7 +72,6 @@ struct fts_psort_common_t {
store Doc ID during sort, if
Doc ID will not be big enough
to use 8 bytes value */
- fil_space_crypt_t* crypt_data; /*!< crypt data or NULL */
};
struct fts_psort_t {
diff --git a/storage/xtradb/include/row0merge.h b/storage/xtradb/include/row0merge.h
index 04d4010ad48..152a51dafc6 100644
--- a/storage/xtradb/include/row0merge.h
+++ b/storage/xtradb/include/row0merge.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2016, MariaDB Corporation.
+Copyright (c) 2015, 2017, MariaDB Corporation.
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
@@ -41,9 +41,6 @@ Created 13/06/2005 Jan Lindstrom
#include "lock0types.h"
#include "srv0srv.h"
-/* Reserve free space from every block for key_version */
-#define ROW_MERGE_RESERVE_SIZE 4
-
/* Cluster index read task is mandatory */
#define COST_READ_CLUSTERED_INDEX 1.0
@@ -352,17 +349,16 @@ row_merge_buf_sort(
Write a merge block to the file system.
@return TRUE if request was successful, FALSE if fail */
UNIV_INTERN
-ibool
+bool
row_merge_write(
/*============*/
int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */
const void* buf, /*!< in: data */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */
- ulint space); /*!< in: space id */
-
+ ulint space) /*!< in: space id */
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Empty a sort buffer.
@return sort buffer */
@@ -400,10 +396,9 @@ row_merge_sort(
const bool update_progress, /*!< in: update progress status variable or not */
const float pct_progress, /*!< in: total progress percent until now */
const float pct_cost, /*!< in: current progress percent */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
- __attribute__((nonnull(1,2,3,4,5)));
+ ulint space) /*!< in: space id */
+ MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
Allocate a sort buffer.
@return own: sort buffer */
@@ -433,7 +428,7 @@ row_merge_file_destroy(
Read a merge block from the file system.
@return TRUE if request was successful, FALSE if fail */
UNIV_INTERN
-ibool
+bool
row_merge_read(
/*===========*/
int fd, /*!< in: file descriptor */
@@ -441,10 +436,9 @@ row_merge_read(
in number of row_merge_block_t
elements */
row_merge_block_t* buf, /*!< out: data */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
- ulint space); /*!< in: space id */
-
+ ulint space) /*!< in: space id */
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Read a merge record.
@return pointer to next record, or NULL on I/O error or end of list */
@@ -462,8 +456,8 @@ row_merge_read_rec(
or NULL on end of list
(non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
- __attribute__((nonnull(1,2,3,4,6,7,8), warn_unused_result));
+ ulint space) /*!< in: space id */
+ MY_ATTRIBUTE((warn_unused_result));
+
#endif /* row0merge.h */
diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h
index 4e98ce0f1cb..0e76340cdbd 100644
--- a/storage/xtradb/include/srv0srv.h
+++ b/storage/xtradb/include/srv0srv.h
@@ -137,6 +137,14 @@ struct srv_stats_t {
ulint_ctr_64_t pages_encrypted;
/* Number of pages decrypted */
ulint_ctr_64_t pages_decrypted;
+ /* Number of merge blocks encrypted */
+ ulint_ctr_64_t n_merge_blocks_encrypted;
+ /* Number of merge blocks decrypted */
+ ulint_ctr_64_t n_merge_blocks_decrypted;
+ /* Number of row log blocks encrypted */
+ ulint_ctr_64_t n_rowlog_blocks_encrypted;
+ /* Number of row log blocks decrypted */
+ ulint_ctr_64_t n_rowlog_blocks_decrypted;
/** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read;
@@ -1273,6 +1281,15 @@ struct export_var_t{
ib_int64_t innodb_pages_decrypted; /*!< Number of pages
decrypted */
+ /*!< Number of merge blocks encrypted */
+ ib_int64_t innodb_n_merge_blocks_encrypted;
+ /*!< Number of merge blocks decrypted */
+ ib_int64_t innodb_n_merge_blocks_decrypted;
+ /*!< Number of row log blocks encrypted */
+ ib_int64_t innodb_n_rowlog_blocks_encrypted;
+ /*!< Number of row log blocks decrypted */
+ ib_int64_t innodb_n_rowlog_blocks_decrypted;
+
ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */
diff --git a/storage/xtradb/include/ut0timer.ic b/storage/xtradb/include/ut0timer.ic
index 62e17a10fb1..815726e9d0a 100644
--- a/storage/xtradb/include/ut0timer.ic
+++ b/storage/xtradb/include/ut0timer.ic
@@ -106,7 +106,7 @@ ut_microseconds_to_timer(
/*=====================*/
ulonglong when) /*!< in: time where to calculate */
{
- double ret = when;
+ double ret = (double)when;
ret *= (double)(ut_timer.frequency);
ret /= 1000000.0;
return (ulonglong)ret;
diff --git a/storage/xtradb/log/log0crypt.cc b/storage/xtradb/log/log0crypt.cc
index f6c1416d81a..9509797dde3 100644
--- a/storage/xtradb/log/log0crypt.cc
+++ b/storage/xtradb/log/log0crypt.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved.
+Copyright (C) 2014, 2017, MariaDB Corporation. All Rights Reserved.
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
@@ -236,6 +236,129 @@ next:
return rc;
}
+/** Encrypt/decrypt temporary log blocks.
+
+@param[in] src_block block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst_block destination block
+@param[in] what ENCRYPTION_FLAG_ENCRYPT or
+ ENCRYPTION_FLAG_DECRYPT
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return true if successfull, false in case of failure
+*/
+static
+bool
+log_tmp_blocks_crypt(
+ const byte* src_block,
+ ulint size,
+ byte* dst_block,
+ int what,
+ os_offset_t offs,
+ ulint space_id)
+{
+ Crypt_result rc = MY_AES_OK;
+ uint dst_len;
+ byte aes_ctr_counter[MY_AES_BLOCK_SIZE];
+ byte is_encrypt= what == ENCRYPTION_FLAG_ENCRYPT;
+ const crypt_info_t* info = static_cast<const crypt_info_t*>(&crypt_info[0]);
+
+ // AES_CTR_COUNTER = space_id + offs
+
+ bzero(aes_ctr_counter, MY_AES_BLOCK_SIZE);
+ mach_write_to_8(aes_ctr_counter, space_id);
+ mach_write_to_8(aes_ctr_counter + 8, offs);
+
+ rc = encryption_crypt(src_block, size,
+ dst_block, &dst_len,
+ (unsigned char*)(info->crypt_key), 16,
+ aes_ctr_counter, MY_AES_BLOCK_SIZE,
+ what | ENCRYPTION_FLAG_NOPAD,
+ LOG_DEFAULT_ENCRYPTION_KEY,
+ info->key_version);
+
+ if (rc != MY_AES_OK) {
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "%s failed for temporary log file with rc = %d",
+ is_encrypt ? "Encryption" : "Decryption",
+ rc);
+ return false;
+ }
+
+ return true;
+}
+
+/** Get crypt info
+@return pointer to log crypt info or NULL
+*/
+inline
+const crypt_info_t*
+get_crypt_info()
+{
+ mutex_enter(&log_sys->mutex);
+ const crypt_info_t* info = get_crypt_info(log_sys->next_checkpoint_no);
+ mutex_exit(&log_sys->mutex);
+
+ return info;
+}
+
+/** Find out is temporary log files encrypted.
+@return true if temporary log file should be encrypted, false if not */
+UNIV_INTERN
+bool
+log_tmp_is_encrypted()
+{
+ const crypt_info_t* info = get_crypt_info();
+
+ if (info == NULL || info->key_version == UNENCRYPTED_KEY_VER) {
+ return false;
+ }
+
+ return true;
+}
+
+/** Encrypt temporary log block.
+@param[in] src_block block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst_block destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return true if successfull, false in case of failure
+*/
+UNIV_INTERN
+bool
+log_tmp_block_encrypt(
+ const byte* src_block,
+ ulint size,
+ byte* dst_block,
+ os_offset_t offs,
+ ulint space_id)
+{
+ return (log_tmp_blocks_crypt(src_block, size, dst_block,
+ ENCRYPTION_FLAG_ENCRYPT, offs, space_id));
+}
+
+/** Decrypt temporary log block.
+@param[in] src_block block to encrypt or decrypt
+@param[in] size size of the block
+@param[out] dst_block destination block
+@param[in] offs offset to block
+@param[in] space_id tablespace id
+@return true if successfull, false in case of failure
+*/
+UNIV_INTERN
+bool
+log_tmp_block_decrypt(
+ const byte* src_block,
+ ulint size,
+ byte* dst_block,
+ os_offset_t offs,
+ ulint space_id)
+{
+ return (log_tmp_blocks_crypt(src_block, size, dst_block,
+ ENCRYPTION_FLAG_DECRYPT, offs, space_id));
+}
+
/*********************************************************************//**
Generate crypt key from crypt msg.
@return true if successfull, false if not. */
diff --git a/storage/xtradb/log/log0recv.cc b/storage/xtradb/log/log0recv.cc
index 75fc7713c5b..1943fb51f37 100644
--- a/storage/xtradb/log/log0recv.cc
+++ b/storage/xtradb/log/log0recv.cc
@@ -1980,7 +1980,7 @@ recv_apply_hashed_log_recs(bool last_batch)
mutex_enter(&(log_sys->mutex));
mutex_enter(&(recv_sys->mutex));
- ut_d(recv_no_log_write = FALSE);
+ ut_d(recv_no_log_write = srv_apply_log_only);
recv_no_ibuf_operations = FALSE;
}
@@ -3461,7 +3461,8 @@ recv_recovery_from_checkpoint_finish(void)
that the data dictionary tables will be free of any locks.
The data dictionary latch should guarantee that there is at
most one data dictionary transaction active at a time. */
- if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
+ if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO
+ && !srv_apply_log_only) {
trx_rollback_or_clean_recovered(FALSE);
}
}
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 32536306320..f3c72576501 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -676,10 +676,9 @@ os_file_get_last_error_low(
REFMAN
"operating-system-error-codes.html\n");
}
+ fflush(stderr);
}
- fflush(stderr);
-
if (err == ERROR_FILE_NOT_FOUND) {
return(OS_FILE_NOT_FOUND);
} else if (err == ERROR_DISK_FULL) {
diff --git a/storage/xtradb/row/row0ftsort.cc b/storage/xtradb/row/row0ftsort.cc
index 7ffcc59dc5f..0f9c15f6a69 100644
--- a/storage/xtradb/row/row0ftsort.cc
+++ b/storage/xtradb/row/row0ftsort.cc
@@ -40,7 +40,7 @@ Created 10/13/2010 Jimmy Yang
b[N] = row_merge_read_rec( \
block[N], buf[N], b[N], index, \
fd[N], &foffs[N], &mrec[N], offsets[N], \
- crypt_data, crypt_block[N], space); \
+ crypt_block[N], space); \
if (UNIV_UNLIKELY(!b[N])) { \
if (mrec[N]) { \
goto exit; \
@@ -194,7 +194,6 @@ row_fts_psort_info_init(
fts_psort_t* merge_info = NULL;
ulint block_size;
ibool ret = TRUE;
- fil_space_crypt_t* crypt_data = NULL;
bool encrypted = false;
block_size = 3 * srv_sort_buf_size;
@@ -225,21 +224,8 @@ row_fts_psort_info_init(
common_info->merge_event = os_event_create();
common_info->opt_doc_id_size = opt_doc_id_size;
- /* Theoretically the tablespace can be dropped straight away.
- In practice, the DDL completion will wait for this thread to
- finish. */
- if (fil_space_t* space = fil_space_acquire(new_table->space)) {
- crypt_data = space->crypt_data;
- fil_space_release(space);
- }
-
- if (crypt_data && crypt_data->should_encrypt()) {
- common_info->crypt_data = crypt_data;
+ if (log_tmp_is_encrypted()) {
encrypted = true;
- } else {
- /* Not needed */
- common_info->crypt_data = NULL;
- crypt_data = NULL;
}
ut_ad(trx->mysql_thd != NULL);
@@ -577,11 +563,9 @@ row_merge_fts_doc_tokenize(
cur_len += len;
dfield_dup(field, buf->heap);
- /* Reserve one byte for the end marker of row_merge_block_t
- and we have reserved ROW_MERGE_RESERVE_SIZE (= 4) for
- encryption key_version in the beginning of the buffer. */
+ /* Reserve one byte for the end marker of row_merge_block_t */
if (buf->total_size + data_size[idx] + cur_len
- >= (srv_sort_buf_size - 1 - ROW_MERGE_RESERVE_SIZE)) {
+ >= (srv_sort_buf_size - 1)) {
buf_full = TRUE;
break;
@@ -675,7 +659,6 @@ fts_parallel_tokenization(
fts_tokenize_ctx_t t_ctx;
ulint retried = 0;
dberr_t error = DB_SUCCESS;
- fil_space_crypt_t* crypt_data = NULL;
ut_ad(psort_info->psort_common->trx->mysql_thd != NULL);
@@ -696,7 +679,6 @@ fts_parallel_tokenization(
block = psort_info->merge_block;
crypt_block = psort_info->crypt_block;
- crypt_data = psort_info->psort_common->crypt_data;
zip_size = dict_table_zip_size(table);
row_merge_fts_get_next_doc_item(psort_info, &doc_item);
@@ -791,7 +773,6 @@ loop:
if (!row_merge_write(merge_file[t_ctx.buf_used]->fd,
merge_file[t_ctx.buf_used]->offset++,
block[t_ctx.buf_used],
- crypt_data,
crypt_block[t_ctx.buf_used],
table->space)) {
error = DB_TEMP_FILE_WRITE_FAILURE;
@@ -887,7 +868,6 @@ exit:
if (!row_merge_write(merge_file[i]->fd,
merge_file[i]->offset++,
block[i],
- crypt_data,
crypt_block[i],
table->space)) {
error = DB_TEMP_FILE_WRITE_FAILURE;
@@ -927,7 +907,7 @@ exit:
psort_info->psort_common->dup,
merge_file[i], block[i], &tmpfd[i],
false, 0.0/* pct_progress */, 0.0/* pct_cost */,
- crypt_data, crypt_block[i], table->space);
+ crypt_block[i], table->space);
if (error != DB_SUCCESS) {
close(tmpfd[i]);
@@ -1439,7 +1419,6 @@ row_fts_merge_insert(
ulint start;
fts_psort_insert_t ins_ctx;
ulint count_diag = 0;
- fil_space_crypt_t* crypt_data = NULL;
ulint space;
ut_ad(index);
@@ -1453,7 +1432,6 @@ row_fts_merge_insert(
ins_ctx.trx->op_info = "inserting index entries";
ins_ctx.opt_doc_id_size = psort_info[0].psort_common->opt_doc_id_size;
- crypt_data = psort_info[0].psort_common->crypt_data;
heap = mem_heap_create(500 + sizeof(mrec_buf_t));
@@ -1547,7 +1525,6 @@ row_fts_merge_insert(
&& (!row_merge_read(
fd[i], foffs[i],
(row_merge_block_t*) block[i],
- crypt_data,
(row_merge_block_t*) crypt_block[i],
space))) {
error = DB_CORRUPTION;
diff --git a/storage/xtradb/row/row0log.cc b/storage/xtradb/row/row0log.cc
index 2cd663fd600..f49ff2f1530 100644
--- a/storage/xtradb/row/row0log.cc
+++ b/storage/xtradb/row/row0log.cc
@@ -182,6 +182,7 @@ struct row_log_t {
dict_table_t* table; /*!< table that is being rebuilt,
or NULL when this is a secondary
index that is being created online */
+ dict_index_t* index; /*!< index to be build */
bool same_pk;/*!< whether the definition of the PRIMARY KEY
has remained the same */
const dtuple_t* add_cols;
@@ -197,8 +198,14 @@ struct row_log_t {
row_log_buf_t tail; /*!< writer context;
protected by mutex and index->lock S-latch,
or by index->lock X-latch only */
+ byte* crypt_tail; /*!< writer context;
+ temporary buffer used in encryption,
+ decryption or NULL*/
row_log_buf_t head; /*!< reader context; protected by MDL only;
modifiable by row_log_apply_ops() */
+ byte* crypt_head; /*!< reader context;
+ temporary buffer used in encryption,
+ decryption or NULL */
const char* path; /*!< where to create temporary file during
log operation */
};
@@ -349,6 +356,7 @@ row_log_online_op(
= (os_offset_t) log->tail.blocks
* srv_sort_buf_size;
ibool ret;
+ byte * buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed;
@@ -368,11 +376,29 @@ row_log_online_op(
goto err_exit;
}
+ /* If encryption is enabled encrypt buffer before writing it
+ to file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt(log->tail.block,
+ srv_sort_buf_size,
+ log->crypt_tail,
+ byte_offset,
+ index->table->space)) {
+ log->error = DB_DECRYPTION_FAILED;
+ goto err_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_encrypted.inc();
+ buf = log->crypt_tail;
+ }
+
ret = os_file_write_int_fd(
"(modification log)",
log->fd,
- log->tail.block, byte_offset, srv_sort_buf_size);
+ buf, byte_offset, srv_sort_buf_size);
+
log->tail.blocks++;
+
if (!ret) {
write_failed:
/* We set the flag directly instead of invoking
@@ -380,7 +406,9 @@ write_failed:
because the index is not "public" yet. */
index->type |= DICT_CORRUPT;
}
+
UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size);
+
memcpy(log->tail.block, log->tail.buf + avail_size,
mrec_size - avail_size);
log->tail.bytes = mrec_size - avail_size;
@@ -465,6 +493,7 @@ row_log_table_close_func(
= (os_offset_t) log->tail.blocks
* srv_sort_buf_size;
ibool ret;
+ byte * buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed;
@@ -484,11 +513,29 @@ row_log_table_close_func(
goto err_exit;
}
+ /* If encryption is enabled encrypt buffer before writing it
+ to file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt(log->tail.block,
+ srv_sort_buf_size,
+ log->crypt_tail,
+ byte_offset,
+ log->index->table->space)) {
+ log->error = DB_DECRYPTION_FAILED;
+ goto err_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_encrypted.inc();
+ buf = log->crypt_tail;
+ }
+
ret = os_file_write_int_fd(
"(modification log)",
log->fd,
- log->tail.block, byte_offset, srv_sort_buf_size);
+ buf, byte_offset, srv_sort_buf_size);
+
log->tail.blocks++;
+
if (!ret) {
write_failed:
log->error = DB_ONLINE_LOG_TOO_BIG;
@@ -2619,10 +2666,29 @@ all_done:
goto func_exit;
}
+ byte * buf = index->online_log->head.block;
+
success = os_file_read_no_error_handling_int_fd(
index->online_log->fd,
- index->online_log->head.block, ofs,
+ buf, ofs,
srv_sort_buf_size);
+
+ /* If encryption is enabled decrypt buffer after reading it
+ from file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(buf,
+ srv_sort_buf_size,
+ index->online_log->crypt_head,
+ ofs,
+ index->table->space)) {
+ error = DB_DECRYPTION_FAILED;
+ goto func_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_decrypted.inc();
+ memcpy(buf, index->online_log->crypt_head, srv_sort_buf_size);
+ }
+
if (!success) {
fprintf(stderr, "InnoDB: unable to read temporary file"
" for table %s\n", index->table_name);
@@ -2929,9 +2995,22 @@ row_log_allocate(
log->head.blocks = log->head.bytes = 0;
log->head.total = 0;
log->path = path;
+ log->crypt_tail = log->crypt_head = NULL;
+ log->index = index;
dict_index_set_online_status(index, ONLINE_INDEX_CREATION);
index->online_log = log;
+ if (log_tmp_is_encrypted()) {
+ ulint size = srv_sort_buf_size;
+ log->crypt_head = static_cast<byte *>(os_mem_alloc_large(&size));
+ log->crypt_tail = static_cast<byte *>(os_mem_alloc_large(&size));
+
+ if (!log->crypt_head || !log->crypt_tail) {
+ row_log_free(log);
+ DBUG_RETURN(false);
+ }
+ }
+
/* While we might be holding an exclusive data dictionary lock
here, in row_log_abort_sec() we will not always be holding it. Use
atomic operations in both cases. */
@@ -2954,6 +3033,15 @@ row_log_free(
row_log_block_free(log->tail);
row_log_block_free(log->head);
row_merge_file_destroy_low(log->fd);
+
+ if (log->crypt_head) {
+ os_mem_free_large(log->crypt_head, srv_sort_buf_size);
+ }
+
+ if (log->crypt_tail) {
+ os_mem_free_large(log->crypt_tail, srv_sort_buf_size);
+ }
+
mutex_free(&log->mutex);
ut_free(log);
log = 0;
@@ -3445,11 +3533,29 @@ all_done:
goto func_exit;
}
+ byte* buf = index->online_log->head.block;
+
success = os_file_read_no_error_handling_int_fd(
index->online_log->fd,
- index->online_log->head.block, ofs,
+ buf, ofs,
srv_sort_buf_size);
+ /* If encryption is enabled decrypt buffer after reading it
+ from file system. */
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(buf,
+ srv_sort_buf_size,
+ index->online_log->crypt_head,
+ ofs,
+ index->table->space)) {
+ error = DB_DECRYPTION_FAILED;
+ goto func_exit;
+ }
+
+ srv_stats.n_rowlog_blocks_decrypted.inc();
+ memcpy(buf, index->online_log->crypt_head, srv_sort_buf_size);
+ }
+
if (!success) {
fprintf(stderr, "InnoDB: unable to read temporary file"
" for index %s\n", index->name + 1);
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index 6a1298087eb..d38f10ee7ba 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -79,88 +79,6 @@ UNIV_INTERN char srv_disable_sort_file_cache;
/* Maximum pending doc memory limit in bytes for a fts tokenization thread */
#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000
-
-/******************************************************//**
-Encrypt a merge block. */
-static
-void
-row_merge_encrypt_buf(
-/*==================*/
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
- ulint offset, /*!< in: offset where to
- write */
- ulint space, /*!< in: tablespace id */
- const byte* input_buf, /*!< in: input buffer */
- byte* crypted_buf) /*!< out: crypted buffer */
-{
- uint key_version;
- uint dstlen=0;
- os_offset_t ofs = (os_offset_t)srv_sort_buf_size * (os_offset_t)offset;
-
- key_version = encryption_key_get_latest_version(crypt_data->key_id);
-
- /* Store key_version at the beginning of the input buffer */
- mach_write_to_4((byte *)crypted_buf, key_version);
-
- int rc = encryption_scheme_encrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
- srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
- crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
- crypt_data, key_version,
- space, ofs, 0);
-
- if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to encrypt data-block "
- " src: %p srclen: %lu buf: %p buflen: %u."
- " return-code: %d. Can't continue!\n",
- input_buf, srv_sort_buf_size,
- crypted_buf, dstlen, rc);
- }
-}
-
-/******************************************************//**
-Decrypt a merge block. */
-static
-bool
-row_merge_decrypt_buf(
-/*==================*/
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
- ulint offset, /*!< in: offset where to
- write */
- ulint space, /*!< in: tablespace id */
- const byte* input_buf, /*!< in: input buffer */
- byte* crypted_buf) /*!< out: crypted buffer */
-{
- uint key_version;
- uint dstlen=0;
- os_offset_t ofs = (os_offset_t)srv_sort_buf_size * (os_offset_t)offset;
-
- /* Read key_version from beginning of the buffer */
- key_version = mach_read_from_4((byte *)input_buf);
-
- if (key_version == 0) {
- /* block not encrypted */
- return false;
- }
-
- int rc = encryption_scheme_decrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
- srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
- crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
- crypt_data, key_version,
- space, ofs, 0);
-
- if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
- ib_logf(IB_LOG_LEVEL_FATAL,
- "Unable to encrypt data-block "
- " src: %p srclen: %lu buf: %p buflen: %d."
- " return-code: %d. Can't continue!\n",
- input_buf, srv_sort_buf_size,
- crypted_buf, dstlen, rc);
- }
-
- return (true);
-}
-
#ifdef UNIV_DEBUG
/******************************************************//**
Display a merge tuple. */
@@ -279,7 +197,7 @@ row_merge_buf_create(
ulint buf_size;
mem_heap_t* heap;
- max_tuples = (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE)
+ max_tuples = (srv_sort_buf_size)
/ ut_max(1, dict_index_get_min_size(index));
buf_size = (sizeof *buf);
@@ -702,7 +620,7 @@ row_merge_buf_add(
ut_ad(data_size < srv_sort_buf_size);
/* Reserve bytes for the end marker of row_merge_block_t. */
- if (buf->total_size + data_size >= (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE)) {
+ if (buf->total_size + data_size >= srv_sort_buf_size) {
DBUG_RETURN(0);
}
@@ -823,7 +741,7 @@ UT_SORT_FUNCTION_BODY().
/**********************************************************************//**
Merge sort the tuple buffer in main memory. */
-static MY_ATTRIBUTE((nonnull(4,5)))
+static
void
row_merge_tuple_sort(
/*=================*/
@@ -874,7 +792,7 @@ row_merge_buf_write(
{
const dict_index_t* index = buf->index;
ulint n_fields= dict_index_get_n_fields(index);
- byte* b = &block[ROW_MERGE_RESERVE_SIZE];
+ byte* b = &block[0];
for (ulint i = 0; i < buf->n_tuples; i++) {
const mtuple_t* entry = &buf->tuples[i];
@@ -893,7 +811,7 @@ row_merge_buf_write(
/* Write an "end-of-chunk" marker. */
ut_a(b < &block[srv_sort_buf_size]);
- ut_a(b == &block[0] + buf->total_size + ROW_MERGE_RESERVE_SIZE);
+ ut_a(b == &block[0] + buf->total_size);
*b++ = 0;
#ifdef UNIV_DEBUG_VALGRIND
/* The rest of the block is uninitialized. Initialize it
@@ -943,7 +861,7 @@ row_merge_heap_create(
Read a merge block from the file system.
@return TRUE if request was successful, FALSE if fail */
UNIV_INTERN
-ibool
+bool
row_merge_read(
/*===========*/
int fd, /*!< in: file descriptor */
@@ -951,12 +869,11 @@ row_merge_read(
in number of row_merge_block_t
elements */
row_merge_block_t* buf, /*!< out: data */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
os_offset_t ofs = ((os_offset_t) offset) * srv_sort_buf_size;
- ibool success;
+ bool success;
DBUG_EXECUTE_IF("row_merge_read_failure", return(FALSE););
@@ -971,10 +888,14 @@ row_merge_read(
ofs, srv_sort_buf_size);
/* For encrypted tables, decrypt data after reading and copy data */
- if (crypt_data && crypt_buf) {
- if( row_merge_decrypt_buf(crypt_data, offset, space, buf, crypt_buf)) {
- memcpy(buf, crypt_buf, srv_sort_buf_size);
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_decrypt(buf, srv_sort_buf_size,
+ crypt_buf, ofs, space)) {
+ return (FALSE);
}
+
+ srv_stats.n_merge_blocks_decrypted.inc();
+ memcpy(buf, crypt_buf, srv_sort_buf_size);
}
#ifdef POSIX_FADV_DONTNEED
@@ -996,31 +917,32 @@ row_merge_read(
Write a merge block to the file system.
@return TRUE if request was successful, FALSE if fail */
UNIV_INTERN
-ibool
+bool
row_merge_write(
/*============*/
int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */
const void* buf, /*!< in: data */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
{
size_t buf_len = srv_sort_buf_size;
os_offset_t ofs = buf_len * (os_offset_t) offset;
- ibool ret;
+ bool ret;
void* out_buf = (void *)buf;
DBUG_EXECUTE_IF("row_merge_write_failure", return(FALSE););
/* For encrypted tables, encrypt data before writing */
- if (crypt_data && crypt_buf) {
- row_merge_encrypt_buf(crypt_data, offset, space, (const byte *)buf, (byte *)crypt_buf);
+ if (log_tmp_is_encrypted()) {
+ if (!log_tmp_block_encrypt((const byte *)buf, buf_len,
+ (byte *)crypt_buf, ofs, space)) {
+ return (FALSE);
+ }
+
+ srv_stats.n_merge_blocks_encrypted.inc();
out_buf = crypt_buf;
- } else {
- /* Mark block unencrypted */
- mach_write_to_4((byte *)out_buf, 0);
}
ret = os_file_write_int_fd("(merge)", fd, out_buf, ofs, buf_len);
@@ -1058,9 +980,8 @@ row_merge_read_rec(
or NULL on end of list
(non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
ulint extra_size;
ulint data_size;
@@ -1072,10 +993,6 @@ row_merge_read_rec(
ut_ad(*offsets == 1 + REC_OFFS_HEADER_SIZE
+ dict_index_get_n_fields(index));
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
extra_size = *b++;
if (UNIV_UNLIKELY(!extra_size)) {
@@ -1097,7 +1014,8 @@ row_merge_read_rec(
if (UNIV_UNLIKELY(b >= &block[srv_sort_buf_size])) {
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
err_exit:
/* Signal I/O error. */
*mrec = b;
@@ -1105,7 +1023,7 @@ err_exit:
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
}
extra_size = (extra_size & 0x7f) << 8;
@@ -1127,13 +1045,14 @@ err_exit:
memcpy(*buf, b, avail_size);
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
goto err_exit;
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
/* Copy the record. */
memcpy(*buf + avail_size, b, extra_size - avail_size);
@@ -1189,13 +1108,14 @@ err_exit:
#endif /* UNIV_DEBUG */
if (!row_merge_read(fd, ++(*foffs), block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
goto err_exit;
}
/* Wrap around to the beginning of the buffer. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
/* Copy the rest of the record. */
memcpy(*buf + avail_size, b, extra_size + data_size - avail_size);
@@ -1272,9 +1192,8 @@ row_merge_write_rec(
ulint* foffs, /*!< in/out: file offset */
const mrec_t* mrec, /*!< in: record to write */
const ulint* offsets,/*!< in: offsets of mrec */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
ulint extra_size;
ulint size;
@@ -1295,10 +1214,6 @@ row_merge_write_rec(
size = extra_size + (extra_size >= 0x80)
+ rec_offs_data_size(offsets);
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
if (UNIV_UNLIKELY(b + size >= &block[srv_sort_buf_size])) {
/* The record spans two blocks.
Copy it to the temporary buffer first. */
@@ -1314,14 +1229,15 @@ row_merge_write_rec(
memcpy(b, buf[0], avail_size);
if (!row_merge_write(fd, (*foffs)++, block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
return(NULL);
}
UNIV_MEM_INVALID(&block[0], srv_sort_buf_size);
/* Copy the rest. */
- b = &block[ROW_MERGE_RESERVE_SIZE];
+ b = &block[0];
memcpy(b, buf[0] + avail_size, size - avail_size);
b += size - avail_size;
} else {
@@ -1344,7 +1260,6 @@ row_merge_write_eof(
byte* b, /*!< in: pointer to end of block */
int fd, /*!< in: file descriptor */
ulint* foffs, /*!< in/out: file offset */
- fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */
{
@@ -1359,10 +1274,6 @@ row_merge_write_eof(
}
#endif /* UNIV_DEBUG */
- if (b == &block[0]) {
- b+= ROW_MERGE_RESERVE_SIZE;
- }
-
*b++ = 0;
UNIV_MEM_ASSERT_RW(&block[0], b - &block[0]);
UNIV_MEM_ASSERT_W(&block[0], srv_sort_buf_size);
@@ -1374,7 +1285,8 @@ row_merge_write_eof(
#endif /* UNIV_DEBUG_VALGRIND */
if (!row_merge_write(fd, (*foffs)++, block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
return(NULL);
}
@@ -1451,8 +1363,10 @@ containing the index entries for the indexes to be built.
@param[in,out] sequence autoinc sequence
@param[in,out] block file buffer
@param[in,out] tmpfd temporary file handle
-return DB_SUCCESS or error */
-static MY_ATTRIBUTE((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
+@param[in] pct_cost percent of task weight out of total alter job
+@param[in,out] crypt_block crypted file buffer
+@return DB_SUCCESS or error */
+static MY_ATTRIBUTE((warn_unused_result))
dberr_t
row_merge_read_clustered_index(
trx_t* trx,
@@ -1472,11 +1386,8 @@ row_merge_read_clustered_index(
ib_sequence_t& sequence,
row_merge_block_t* block,
int* tmpfd,
- float pct_cost, /*!< in: percent of task weight
- out of total alter job */
- fil_space_crypt_t* crypt_data,/*!< in: crypt data or NULL */
- row_merge_block_t* crypt_block)/*!< in: in/out: crypted file
- buffer */
+ float pct_cost,
+ row_merge_block_t* crypt_block)
{
dict_index_t* clust_index; /* Clustered index */
mem_heap_t* row_heap; /* Heap memory to create
@@ -2014,7 +1925,7 @@ write_buffers:
row_merge_buf_write(buf, file, block);
if (!row_merge_write(file->fd, file->offset++,
- block, crypt_data, crypt_block,
+ block, crypt_block,
new_table->space)) {
err = DB_TEMP_FILE_WRITE_FAILURE;
trx->error_key_num = i;
@@ -2066,7 +1977,7 @@ write_buffers:
if(read_rows % 1000 == 0) {
/* Update progress for each 1000 rows */
curr_progress = (read_rows >= table_total_rows) ?
- pct_cost :
+ pct_cost :
((pct_cost * read_rows) / table_total_rows);
/* presenting 10.12% as 1012 integer */
onlineddl_pct_progress = (ulint) (curr_progress * 100);
@@ -2195,9 +2106,8 @@ wait_again:
&buf[2], b2, \
of->fd, &of->offset, \
mrec##N, offsets##N, \
- crypt_data, \
crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL , \
- space); \
+ space); \
if (UNIV_UNLIKELY(!b2 || ++of->n_rec > file->n_rec)) { \
goto corrupt; \
} \
@@ -2205,7 +2115,6 @@ wait_again:
&buf[N], b##N, INDEX, \
file->fd, foffs##N, \
&mrec##N, offsets##N, \
- crypt_data, \
crypt_block ? &crypt_block[N * srv_sort_buf_size] : NULL, \
space); \
\
@@ -2220,7 +2129,7 @@ wait_again:
/*************************************************************//**
Merge two blocks of records on disk and write a bigger block.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull(1,2,3,4,5,6), warn_unused_result))
+static __attribute__((warn_unused_result))
dberr_t
row_merge_blocks(
/*=============*/
@@ -2234,7 +2143,6 @@ row_merge_blocks(
ulint* foffs1, /*!< in/out: offset of second
source list in the file */
merge_file_t* of, /*!< in/out: output file */
- fil_space_crypt_t* crypt_data,/*!< in: crypt data or NULL */
row_merge_block_t* crypt_block,/*!< in: in/out: crypted file
buffer */
ulint space) /*!< in: space id */
@@ -2270,9 +2178,11 @@ row_merge_blocks(
file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0],
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space)
- || !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size],
- crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space)) {
+ crypt_block ? &crypt_block[0] : NULL,
+ space) ||
+ !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size],
+ crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
+ space)) {
corrupt:
mem_heap_free(heap);
return(DB_CORRUPTION);
@@ -2285,13 +2195,15 @@ corrupt:
b0 = row_merge_read_rec(
&block[0], &buf[0], b0, dup->index,
file->fd, foffs0, &mrec0, offsets0,
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space);
+ crypt_block ? &crypt_block[0] : NULL,
+ space);
b1 = row_merge_read_rec(
&block[srv_sort_buf_size],
&buf[srv_sort_buf_size], b1, dup->index,
file->fd, foffs1, &mrec1, offsets1,
- crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space);
+ crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
+ space);
if (UNIV_UNLIKELY(!b0 && mrec0)
|| UNIV_UNLIKELY(!b1 && mrec1)) {
@@ -2337,7 +2249,8 @@ done1:
b2 = row_merge_write_eof(&block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset,
- crypt_data, crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space);
+ crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL,
+ space);
return(b2 ? DB_SUCCESS : DB_CORRUPTION);
}
@@ -2345,8 +2258,8 @@ done1:
/*************************************************************//**
Copy a block of index entries.
@return TRUE on success, FALSE on failure */
-static __attribute__((nonnull(1,2,3,4,5), warn_unused_result))
-ibool
+static __attribute__((warn_unused_result))
+bool
row_merge_blocks_copy(
/*==================*/
const dict_index_t* index, /*!< in: index being created */
@@ -2354,9 +2267,8 @@ row_merge_blocks_copy(
row_merge_block_t* block, /*!< in/out: 3 buffers */
ulint* foffs0, /*!< in/out: input file offset */
merge_file_t* of, /*!< in/out: output file */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */
@@ -2384,7 +2296,8 @@ row_merge_blocks_copy(
file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0],
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space)) {
+ crypt_block ? &crypt_block[0] : NULL,
+ space)) {
corrupt:
mem_heap_free(heap);
return(FALSE);
@@ -2396,7 +2309,8 @@ corrupt:
b0 = row_merge_read_rec(&block[0], &buf[0], b0, index,
file->fd, foffs0, &mrec0, offsets0,
- crypt_data, crypt_block ? &crypt_block[0] : NULL, space);
+ crypt_block ? &crypt_block[0] : NULL,
+ space);
if (UNIV_UNLIKELY(!b0 && mrec0)) {
@@ -2419,15 +2333,15 @@ done0:
return(row_merge_write_eof(&block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset,
- crypt_data,
- crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space)
+ crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL,
+ space)
!= NULL);
}
/*************************************************************//**
Merge disk files.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull(1,2,3,4,5,6,7)))
+static
dberr_t
row_merge(
/*======*/
@@ -2443,9 +2357,8 @@ row_merge(
ulint* run_offset, /*!< in/out: Array contains the
first offset number for each merge
run */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
ulint foffs0; /*!< first input offset */
ulint foffs1; /*!< second input offset */
@@ -2493,7 +2406,8 @@ row_merge(
error = row_merge_blocks(dup, file, block,
&foffs0, &foffs1, &of,
- crypt_data, crypt_block, space);
+ crypt_block,
+ space);
if (error != DB_SUCCESS) {
return(error);
@@ -2514,7 +2428,8 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block,
&foffs0, &of,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
return(DB_CORRUPTION);
}
}
@@ -2532,7 +2447,8 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block,
&foffs1, &of,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
return(DB_CORRUPTION);
}
}
@@ -2588,9 +2504,8 @@ row_merge_sort(
/*!< in: total progress percent
until now */
const float pct_cost, /*!< in: current progress percent */
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
const ulint half = file->offset / 2;
ulint num_runs;
@@ -2650,7 +2565,8 @@ row_merge_sort(
error = row_merge(trx, dup, file, block, tmpfd,
&num_runs, run_offset,
- crypt_data, crypt_block, space);
+ crypt_block,
+ space);
if(update_progress) {
merge_count++;
@@ -2725,7 +2641,7 @@ row_merge_copy_blobs(
Read sorted file containing index data tuples and insert these data
tuples to the index
@return DB_SUCCESS or error number */
-static __attribute__((nonnull(2,3,5), warn_unused_result))
+static __attribute__((warn_unused_result))
dberr_t
row_merge_insert_index_tuples(
/*==========================*/
@@ -2738,9 +2654,8 @@ row_merge_insert_index_tuples(
const float pct_progress, /*!< in: total progress percent until now */
const float pct_cost, /*!< in: current progress percent
*/
- fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
- ulint space) /*!< in: space id */
+ ulint space) /*!< in: space id */
{
const byte* b;
mem_heap_t* heap;
@@ -2774,7 +2689,8 @@ row_merge_insert_index_tuples(
b = &block[0];
if (!row_merge_read(fd, foffs, block,
- crypt_data, crypt_block, space)) {
+ crypt_block,
+ space)) {
error = DB_CORRUPTION;
} else {
buf = static_cast<mrec_buf_t*>(
@@ -2791,7 +2707,9 @@ row_merge_insert_index_tuples(
b = row_merge_read_rec(block, buf, b, index,
fd, &foffs, &mrec, offsets,
- crypt_data, crypt_block, space);
+ crypt_block,
+ space);
+
if (UNIV_UNLIKELY(!b)) {
/* End of list, or I/O error */
if (mrec) {
@@ -3976,7 +3894,6 @@ row_merge_build_indexes(
fts_psort_t* merge_info = NULL;
ib_int64_t sig_count = 0;
bool fts_psort_initiated = false;
- fil_space_crypt_t * crypt_data = NULL;
float total_static_cost = 0;
float total_dynamic_cost = 0;
@@ -4005,25 +3922,20 @@ row_merge_build_indexes(
from concurrent DDL (e.g. drop table) by MDL-locks. */
fil_space_t* space = fil_space_acquire(new_table->space);
- if (space) {
- crypt_data = space->crypt_data;
- } else {
+ if (!space) {
DBUG_RETURN(DB_TABLESPACE_NOT_FOUND);
}
- /* If tablespace is encrypted, allocate additional buffer for
+ /* If temporal log file is encrypted allocate memory for
encryption/decryption. */
- if (crypt_data && crypt_data->should_encrypt()) {
+ if (log_tmp_is_encrypted()) {
crypt_block = static_cast<row_merge_block_t*>(
- os_mem_alloc_large(&block_size));
+ os_mem_alloc_large(&block_size));
if (crypt_block == NULL) {
fil_space_release(space);
DBUG_RETURN(DB_OUT_OF_MEMORY);
}
- } else {
- /* Not needed */
- crypt_data = NULL;
}
trx_start_if_not_started_xa(trx);
@@ -4105,7 +4017,7 @@ row_merge_build_indexes(
fts_sort_idx, psort_info, merge_files, key_numbers,
n_indexes, add_cols, col_map,
add_autoinc, sequence, block, &tmpfd, pct_cost,
- crypt_data, crypt_block);
+ crypt_block);
pct_progress += pct_cost;
@@ -4128,10 +4040,6 @@ row_merge_build_indexes(
/* Now we have files containing index entries ready for
sorting and inserting. */
- DBUG_EXECUTE_IF(
- "ib_merge_wait_after_read",
- os_thread_sleep(20000000);); /* 20 sec */
-
for (i = 0; i < n_indexes; i++) {
dict_index_t* sort_idx = indexes[i];
@@ -4242,7 +4150,8 @@ wait_again:
trx, &dup, &merge_files[i],
block, &tmpfd, true,
pct_progress, pct_cost,
- crypt_data, crypt_block, new_table->space);
+ crypt_block,
+ new_table->space);
pct_progress += pct_cost;
@@ -4280,7 +4189,8 @@ wait_again:
trx->id, sort_idx, old_table,
merge_files[i].fd, block,
merge_files[i].n_rec, pct_progress, pct_cost,
- crypt_data, crypt_block, new_table->space);
+ crypt_block, new_table->space);
+
pct_progress += pct_cost;
if (global_system_variables.log_warnings > 2) {
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index 80e8304ea10..9694e16ef08 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -2055,6 +2055,10 @@ srv_export_innodb_status(void)
export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error;
export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted;
export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted;
+ export_vars.innodb_n_merge_blocks_encrypted = srv_stats.n_merge_blocks_encrypted;
+ export_vars.innodb_n_merge_blocks_decrypted = srv_stats.n_merge_blocks_decrypted;
+ export_vars.innodb_n_rowlog_blocks_encrypted = srv_stats.n_rowlog_blocks_encrypted;
+ export_vars.innodb_n_rowlog_blocks_decrypted = srv_stats.n_rowlog_blocks_decrypted;
export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures;
@@ -2461,7 +2465,7 @@ srv_get_active_thread_type(void)
{
srv_thread_type ret = SRV_NONE;
- if (srv_read_only_mode) {
+ if (srv_read_only_mode || srv_apply_log_only) {
return(SRV_NONE);
}
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index e89b4c4d323..a3c5a03a1d9 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -767,7 +767,7 @@ create_log_files(
/* Create a log checkpoint. */
mutex_enter(&log_sys->mutex);
- ut_d(recv_no_log_write = FALSE);
+ ut_d(recv_no_log_write = srv_apply_log_only);
recv_reset_logs(
#ifdef UNIV_LOG_ARCHIVE
UT_LIST_GET_FIRST(log_sys->log_groups)->archived_file_no,
@@ -2717,6 +2717,11 @@ files_checked:
recv_recovery_from_checkpoint_finish();
+ if (srv_apply_log_only) {
+ ut_ad(IS_XTRABACKUP());
+ goto skip_processes;
+ }
+
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
/* The following call is necessary for the insert
buffer to work with multiple tablespaces. We must
@@ -3125,6 +3130,7 @@ files_checked:
os_thread_create(btr_defragment_thread, NULL, NULL);
}
+skip_processes:
srv_was_started = TRUE;
return(DB_SUCCESS);
@@ -3287,7 +3293,7 @@ innodb_shutdown()
srv_misc_tmpfile = 0;
}
- if (!srv_read_only_mode) {
+ if (!srv_read_only_mode && !srv_apply_log_only) {
dict_stats_thread_deinit();
fil_crypt_threads_cleanup();
btr_scrub_cleanup();
diff --git a/storage/xtradb/trx/trx0rseg.cc b/storage/xtradb/trx/trx0rseg.cc
index 16fa334872b..38719a1c771 100644
--- a/storage/xtradb/trx/trx0rseg.cc
+++ b/storage/xtradb/trx/trx0rseg.cc
@@ -122,9 +122,11 @@ trx_rseg_mem_free(
mutex_free(&rseg->mutex);
+ if (!srv_apply_log_only) {
/* There can't be any active transactions. */
ut_a(UT_LIST_GET_LEN(rseg->update_undo_list) == 0);
ut_a(UT_LIST_GET_LEN(rseg->insert_undo_list) == 0);
+ }
for (undo = UT_LIST_GET_FIRST(rseg->update_undo_cached);
undo != NULL;
diff --git a/storage/xtradb/trx/trx0sys.cc b/storage/xtradb/trx/trx0sys.cc
index d2b1a8f9f0d..83bb28b3c07 100644
--- a/storage/xtradb/trx/trx0sys.cc
+++ b/storage/xtradb/trx/trx0sys.cc
@@ -1346,8 +1346,7 @@ trx_sys_close(void)
ut_a(UT_LIST_GET_LEN(trx_sys->rw_trx_list) == trx_sys->n_prepared_trx
|| srv_read_only_mode
|| srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO
- || (IS_XTRABACKUP() && srv_apply_log_only));
-
+ || srv_apply_log_only);
while ((trx = UT_LIST_GET_FIRST(trx_sys->rw_trx_list)) != NULL) {
trx_free_prepared(trx);
@@ -1378,7 +1377,7 @@ trx_sys_close(void)
UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
}
- if (!IS_XTRABACKUP() || !srv_apply_log_only) {
+ if (!srv_apply_log_only) {
ut_a(UT_LIST_GET_LEN(trx_sys->view_list) == 0);
ut_a(UT_LIST_GET_LEN(trx_sys->ro_trx_list) == 0);
ut_a(UT_LIST_GET_LEN(trx_sys->rw_trx_list) == 0);
@@ -1430,7 +1429,7 @@ ulint
trx_sys_any_active_transactions(void)
/*=================================*/
{
- if (IS_XTRABACKUP() && srv_apply_log_only) {
+ if (srv_apply_log_only) {
return(0);
}
mutex_enter(&trx_sys->mutex);
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index cfc1f83053a..ef6e7d01cc4 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -483,6 +483,7 @@ trx_free_prepared(
|| (trx_state_eq(trx, TRX_STATE_ACTIVE)
&& trx->is_recovered
&& (srv_read_only_mode
+ || srv_apply_log_only
|| srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO)));
ut_a(trx->magic_n == TRX_MAGIC_N);
diff --git a/storage/xtradb/trx/trx0undo.cc b/storage/xtradb/trx/trx0undo.cc
index 220589dd9ff..cb064e3d485 100644
--- a/storage/xtradb/trx/trx0undo.cc
+++ b/storage/xtradb/trx/trx0undo.cc
@@ -2037,6 +2037,7 @@ trx_undo_free_prepared(
/* lock_trx_release_locks() assigns
trx->is_recovered=false */
ut_a(srv_read_only_mode
+ || srv_apply_log_only
|| srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO);
break;
default: