summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/ctype_utf8_ilseq.inc114
-rwxr-xr-xmysql-test/lib/generate-ssl-certs.sh11
-rwxr-xr-xmysql-test/mysql-test-run.pl33
-rw-r--r--mysql-test/r/blackhole.result7
-rw-r--r--mysql-test/r/ctype_uca.result412
-rw-r--r--mysql-test/r/ctype_uca_innodb.result218
-rw-r--r--mysql-test/r/ctype_upgrade.result22
-rw-r--r--mysql-test/r/ctype_utf8.result628
-rw-r--r--mysql-test/r/derived.result12
-rw-r--r--mysql-test/r/filesort_bad_i_s-7585.result9
-rw-r--r--mysql-test/r/func_gconcat.result12
-rw-r--r--mysql-test/r/gis.result12
-rw-r--r--mysql-test/r/group_by.result10
-rw-r--r--mysql-test/r/having.result31
-rw-r--r--mysql-test/r/log_errchk.result5
-rw-r--r--mysql-test/r/log_tables_upgrade.result11
-rw-r--r--mysql-test/r/multi_update.result194
-rw-r--r--mysql-test/r/mysql_upgrade-6984.result11
-rw-r--r--mysql-test/r/mysql_upgrade.result97
-rw-r--r--mysql-test/r/mysql_upgrade_no_innodb.result9
-rw-r--r--mysql-test/r/mysql_upgrade_ssl.result11
-rw-r--r--mysql-test/r/mysql_upgrade_view.result286
-rw-r--r--mysql-test/r/openssl_1.result4
-rw-r--r--mysql-test/r/select_jcl6.result4
-rw-r--r--mysql-test/r/sp-destruct.result4
-rw-r--r--mysql-test/r/sp-innodb.result100
-rw-r--r--mysql-test/r/ssl.result4
-rw-r--r--mysql-test/r/subselect_sj.result9
-rw-r--r--mysql-test/r/subselect_sj2.result84
-rw-r--r--mysql-test/r/subselect_sj2_jcl6.result84
-rw-r--r--mysql-test/r/subselect_sj2_mat.result84
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result9
-rw-r--r--mysql-test/r/table_elim.result32
-rw-r--r--mysql-test/r/trigger-trans.result25
-rw-r--r--mysql-test/r/uniques_crash-7912.result11
-rw-r--r--mysql-test/std_data/cacert.pem123
-rw-r--r--mysql-test/std_data/client-cert.pem115
-rw-r--r--mysql-test/std_data/client-key.pem38
-rw-r--r--mysql-test/std_data/mysql_upgrade/event.MYD0
-rw-r--r--mysql-test/std_data/mysql_upgrade/event.MYIbin0 -> 2048 bytes
-rw-r--r--mysql-test/std_data/mysql_upgrade/event.frmbin0 -> 10223 bytes
-rw-r--r--mysql-test/std_data/mysql_upgrade/v1.frm15
-rw-r--r--mysql-test/std_data/mysql_upgrade/v1badcheck.frm15
-rw-r--r--mysql-test/std_data/mysql_upgrade/v2.frm15
-rw-r--r--mysql-test/std_data/mysql_upgrade/v3.frm15
-rw-r--r--mysql-test/std_data/mysql_upgrade/v4.frm16
-rw-r--r--mysql-test/std_data/server-cert.pem120
-rw-r--r--mysql-test/std_data/server-key.pem38
-rw-r--r--mysql-test/std_data/server8k-cert.pem317
-rw-r--r--mysql-test/std_data/server8k-key.pem194
-rw-r--r--mysql-test/suite/binlog/r/temptable_uservar_disconnect-7938.result8
-rw-r--r--mysql-test/suite/binlog/t/temptable_uservar_disconnect-7938.test17
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev-7055.result1
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7055.test23
-rw-r--r--mysql-test/suite/percona/innodb_sys_index.result5
-rw-r--r--mysql-test/suite/percona/innodb_sys_index.test1
-rw-r--r--mysql-test/suite/perfschema/r/digest_table_full.result2
-rw-r--r--mysql-test/suite/perfschema/r/rpl_gtid_func.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result64
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result64
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_long_query.result4
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result47
-rw-r--r--mysql-test/suite/plugins/t/server_audit.test21
-rw-r--r--mysql-test/suite/rpl/r/rpl_special_charset.result8
-rw-r--r--mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_db_fail.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_special_charset.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_special_charset.test26
-rw-r--r--mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test12
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result28
-rw-r--r--mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test6
-rw-r--r--mysql-test/t/blackhole.test10
-rw-r--r--mysql-test/t/ctype_uca.test11
-rw-r--r--mysql-test/t/ctype_uca_innodb.test25
-rw-r--r--mysql-test/t/ctype_utf8.test20
-rw-r--r--mysql-test/t/derived.test14
-rw-r--r--mysql-test/t/file_contents.test4
-rw-r--r--mysql-test/t/filesort_bad_i_s-7585.test14
-rw-r--r--mysql-test/t/func_gconcat.test18
-rw-r--r--mysql-test/t/gis.test11
-rw-r--r--mysql-test/t/group_by.test11
-rw-r--r--mysql-test/t/having.test36
-rw-r--r--mysql-test/t/log_errchk.test15
-rw-r--r--mysql-test/t/multi_update.test206
-rw-r--r--mysql-test/t/mysql_upgrade_view.test132
-rw-r--r--mysql-test/t/mysqladmin.test6
-rw-r--r--mysql-test/t/openssl_1.test4
-rw-r--r--mysql-test/t/sp-destruct.test8
-rw-r--r--mysql-test/t/sp-innodb.test117
-rw-r--r--mysql-test/t/subselect_sj.test11
-rw-r--r--mysql-test/t/subselect_sj2.test71
-rw-r--r--mysql-test/t/table_elim.test31
-rw-r--r--mysql-test/t/trigger-trans.test54
-rw-r--r--mysql-test/t/uniques_crash-7912.test26
96 files changed, 4071 insertions, 782 deletions
diff --git a/mysql-test/include/ctype_utf8_ilseq.inc b/mysql-test/include/ctype_utf8_ilseq.inc
new file mode 100644
index 00000000000..c400731c07f
--- /dev/null
+++ b/mysql-test/include/ctype_utf8_ilseq.inc
@@ -0,0 +1,114 @@
+#
+# Compare a field to an utf8 string literal with illegal byte sequences
+#
+
+--echo #
+--echo # Start of ctype_utf8_ilseq.inc
+--echo #
+
+--eval CREATE TABLE t1 ENGINE=$ENGINE AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;
+ALTER TABLE t1
+ ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ ADD KEY(ch);
+SHOW CREATE TABLE t1;
+
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+# LATIN SMALL LETTER A + LATIN CAPITAL LETTER E WITH GRAVE
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+# LATIN SMALL LETTER A + ARMENIAN SMALL LETTER REH
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+
+ALTER TABLE t1 DROP KEY ch;
+
+--echo # 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+#
+# Non-equality comparison currently work differently depending on collation:
+#
+# - utf8_general_ci falls back to memcmp() on bad byte
+# - utf8_unicode_ci treats bad bytes greater than any valid character
+#
+# For example, these two characters:
+# _utf8 0xD080 (U+00C8 LATIN CAPITAL LETTER E WITH GRAVE)
+# _utf8 0xD680 (U+0580 ARMENIAN SMALL LETTER REH)
+#
+# will give different results (depending on collation) when compared
+# to an incomplete byte sequence 0xD1 (mb2head not followed by mb2tail).
+#
+# For utf8_general_ci the result depends on the valid side:
+# - 0xD080 is smaller than 0xD1, because 0xD0 < 0xD1
+# - 0xD680 is greater than 0xD1, because 0xD6 > 0xD1
+#
+# For utf8_unicode_ci the result does not depend on the valid side:
+# - 0xD080 is smaller than 0xD1, because 0xD1 is greater than any valid character
+# - 0xD680 is smaller than 0xD1, because 0xD1 is greater than any valid character
+#
+# utf8_general_ci should be eventually fixed to treat bad bytes greater
+# than any valid character, similar to utf8_unicode_ci.
+#
+
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+--echo # 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+--echo # 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+--echo # 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+
+DROP TABLE t1;
+
+--echo #
+--echo # End of ctype_utf8_ilseq.inc
+--echo #
diff --git a/mysql-test/lib/generate-ssl-certs.sh b/mysql-test/lib/generate-ssl-certs.sh
index 0ca9bcd41b8..5dca21a755d 100755
--- a/mysql-test/lib/generate-ssl-certs.sh
+++ b/mysql-test/lib/generate-ssl-certs.sh
@@ -10,22 +10,21 @@ touch demoCA/index.txt
echo 01 > demoCA/serial
# CA certificate, self-signed
-openssl req -x509 -newkey rsa:2048 -keyout demoCA/private/cakey.pem -out cacert.pem -days 7300 -nodes -subj '/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB' -text
+openssl req -x509 -newkey rsa:2048 -keyout demoCA/private/cakey.pem -out cacert.pem -days 7300 -nodes -subj '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB' -text
-# server certificate signing request and private key
-openssl req -newkey rsa:1024 -keyout server-key.pem -out demoCA/server-req.pem -days 7300 -nodes -subj '/C=SE/ST=Uppsala/O=MySQL AB/CN=localhost'
+# server certificate signing request and private key. Note the very long subject (for MDEV-7859)
+openssl req -newkey rsa:1024 -keyout server-key.pem -out demoCA/server-req.pem -days 7300 -nodes -subj '/CN=localhost/C=FI/ST=state or province within country, in other certificates in this file it is the same as L/L=location, usually an address but often ambiguously used/OU=organizational unit name, a division name within an organization/O=organization name, typically a company name'
# convert the key to yassl compatible format
openssl rsa -in server-key.pem -out server-key.pem
# sign the server certificate with CA certificate
openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -infiles demoCA/server-req.pem
-openssl req -newkey rsa:8192 -keyout server8k-key.pem -out demoCA/server8k-req.pem -days 7300 -nodes -subj '/C=SE/ST=Uppsala/O=MySQL AB/CN=server'
+openssl req -newkey rsa:8192 -keyout server8k-key.pem -out demoCA/server8k-req.pem -days 7300 -nodes -subj '/CN=server8k/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl rsa -in server8k-key.pem -out server8k-key.pem
openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out server8k-cert.pem -infiles demoCA/server8k-req.pem
-openssl req -newkey rsa:1024 -keyout client-key.pem -out demoCA/client-req.pem -days 7300 -nodes -subj '/C=SE/ST=Uppsala/O=MySQL AB'
+openssl req -newkey rsa:1024 -keyout client-key.pem -out demoCA/client-req.pem -days 7300 -nodes -subj '/CN=client/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl rsa -in client-key.pem -out client-key.pem
-# if the folloing will require a common name - that's defined in /etc/ssl/openssl.cnf, under policy_anything
openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -infiles demoCA/client-req.pem
rm -rf demoCA
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 03c3ac90c1f..befd47d9c94 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1036,15 +1036,7 @@ sub ignore_option {
# Setup any paths that are $opt_vardir related
sub set_vardir {
- my ($vardir)= @_;
- if(IS_WINDOWS)
- {
- $opt_vardir= $vardir;
- }
- else
- {
- $opt_vardir= realpath($vardir);
- }
+ ($opt_vardir)= @_;
$path_vardir_trace= $opt_vardir;
# Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/...
@@ -1478,7 +1470,7 @@ sub command_line_setup {
# Search through list of locations that are known
# to be "fast disks" to find a suitable location
# Use --mem=<dir> as first location to look.
- my @tmpfs_locations= ($opt_mem, "/dev/shm", "/tmp");
+ my @tmpfs_locations= ($opt_mem,"/run/shm", "/dev/shm", "/tmp");
foreach my $fs (@tmpfs_locations)
{
@@ -1494,20 +1486,11 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Set the "var/" directory, the base for everything else
# --------------------------------------------------------------------------
- if(defined $ENV{MTR_BINDIR})
- {
- $default_vardir= "$ENV{MTR_BINDIR}/mysql-test/var";
- }
- else
- {
- $default_vardir= "$glob_mysql_test_dir/var";
- }
- unless (IS_WINDOWS) {
- my $realpath = realpath($default_vardir);
- die "realpath('$default_vardir') failed: $!\n"
- unless defined($realpath) && $realpath ne '';
- $default_vardir = $realpath;
- }
+ my $vardir_location= (defined $ENV{MTR_BINDIR}
+ ? "$ENV{MTR_BINDIR}/mysql-test"
+ : $glob_mysql_test_dir);
+ $vardir_location= realpath $vardir_location unless IS_WINDOWS;
+ $default_vardir= "$vardir_location/var";
if ( ! $opt_vardir )
{
@@ -6448,7 +6431,7 @@ Options to control directories to use
mem Run testsuite in "memory" using tmpfs or ramdisk
Attempts to find a suitable location
using a builtin list of standard locations
- for tmpfs (/dev/shm)
+ for tmpfs (/run/shm, /dev/shm, /tmp)
The option can also be set using environment
variable MTR_MEM=[DIR]
clean-vardir Clean vardir if tests were successful and if
diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result
index 16a97927262..36f5459ff85 100644
--- a/mysql-test/r/blackhole.result
+++ b/mysql-test/r/blackhole.result
@@ -8,6 +8,13 @@ CREATE TABLE t2 (a INT UNSIGNED, b INT, UNIQUE KEY (a, b)) ENGINE=BLACKHOLE;
SELECT 1 FROM t1 WHERE a = ANY (SELECT a FROM t2);
1
DROP TABLE t1, t2;
+create temporary table t1 (a int) engine=blackhole;
+lock table t1 write;
+truncate table t1;
+select * from t1;
+a
+unlock tables;
+drop temporary table t1;
End of 5.5 tests
#
# Bug#13948247 DIVISION BY 0 IN GET_BEST_DISJUNCT_QUICK WITH FORCE INDEX GROUP BY
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 16b60aed07f..02809f3be22 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -6466,6 +6466,418 @@ a c1
10 => DŽ
drop table t1;
#
+# MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+#
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=MyISAM AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=HEAP AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/ctype_uca_innodb.result b/mysql-test/r/ctype_uca_innodb.result
new file mode 100644
index 00000000000..a4e1ae09130
--- /dev/null
+++ b/mysql-test/r/ctype_uca_innodb.result
@@ -0,0 +1,218 @@
+#
+# Start of 5.5 tests
+#
+#
+# MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+#
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=InnoDB AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
+# End of 5.5 tests
+#
diff --git a/mysql-test/r/ctype_upgrade.result b/mysql-test/r/ctype_upgrade.result
index 56e2ef96ead..6bef89f6cd6 100644
--- a/mysql-test/r/ctype_upgrade.result
+++ b/mysql-test/r/ctype_upgrade.result
@@ -227,7 +227,7 @@ DROP TABLE mysql050614_xxx_croatian_ci;
# Checking mysql_upgrade
#
# Running mysql_upgrade
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -258,9 +258,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -279,11 +280,11 @@ test.maria050313_ucs2_croatian_ci_def OK
test.maria050313_utf8_croatian_ci OK
test.maria050533_xxx_croatian_ci OK
test.maria100004_xxx_croatian_ci OK
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
# Running mysql_upgrade for the second time
# This should report OK for all tables
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -314,9 +315,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -329,7 +331,7 @@ test.maria050313_utf8_croatian_ci OK
test.maria050533_xxx_croatian_ci OK
test.maria100004_xxx_croatian_ci OK
test.mysql050614_xxx_croatian_ci OK
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
Table Create Table
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 40854183a92..ef957c54f45 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -5412,6 +5412,634 @@ a 1024
Warnings:
Warning 1260 Row 2 was cut by GROUP_CONCAT()
#
+# MDEV-7814 Assertion `args[0]->fixed' fails in Item_func_conv_charset::Item_func_conv_charset
+#
+CREATE TABLE t1(a CHAR(1) CHARACTER SET latin1, b INT NOT NULL);
+CREATE TABLE t2(a CHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci, b INT NOT NULL);
+SELECT (SELECT t2.a FROM t2 WHERE t2.a=t1.a) AS aa, b, COUNT(b) FROM t1 GROUP BY aa;
+aa b COUNT(b)
+DROP TABLE t1,t2;
+#
+# MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+#
+SET NAMES utf8 COLLATE utf8_general_ci;
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=InnoDB AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+aր
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=MyISAM AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+aր
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
+# Start of ctype_utf8_ilseq.inc
+#
+CREATE TABLE t1 ENGINE=HEAP AS SELECT REPEAT(' ', 60) AS ch LIMIT 0;;
+ALTER TABLE t1
+ADD id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ADD KEY(ch);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ch` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ KEY `ch` (`ch`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
+SELECT ch FROM t1 WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='admin𝌆';
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='admin𝌆';
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+DELETE FROM t1;
+INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
+INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
+INSERT INTO t1 (ch) VALUES ('az'),('a?z'),('a??z'),('a???z'),('a????z');
+INSERT INTO t1 (ch) VALUES ('z');
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D080);
+INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
+ch
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+aր
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
+ch
+z
+SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
+ch
+z
+ALTER TABLE t1 DROP KEY ch;
+# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'b''');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch<''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+a
+a?
+a??
+a???
+a????
+a????b
+a????z
+a???b
+a???z
+a??b
+a??z
+a?b
+a?z
+ab
+az
+aЀ
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch>''a', 0xD1,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+aր
+z
+# 0xEA9A96 would be a good 3-byte character, 0xEA9A is an incomplete sequence
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xEA9A,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F is a bad byte sequence (an mb2tail without mb2head)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+# 0x8F8F is a bad byte sequence (an mb2tail without mb2head, two times)
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,''' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0x8F8F,'b'' ORDER BY ch');
+PREPARE stmt FROM @query;
+EXECUTE stmt;
+ch
+DROP TABLE t1;
+#
+# End of ctype_utf8_ilseq.inc
+#
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index d0f42c3d3ec..7c44466ae92 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -568,3 +568,15 @@ update t1 set balance=(select sum(balance) from (SELECT balance FROM t1 where ac
set optimizer_switch=@save_derived_optimizer_switch_bug;
drop table t1;
set optimizer_switch=@save_derived_optimizer_switch;
+#
+# MDEV-6892: WHERE does not apply
+#
+create table t1 (id int);
+create table t2 (id int);
+insert into t1 values(1),(2),(3);
+insert into t2 values(4),(5),(6);
+select x.id, message from (select id from t1) x left join
+(select id, 1 as message from t2) y on x.id=y.id
+where coalesce(message,0) <> 0;
+id message
+drop table t1,t2;
diff --git a/mysql-test/r/filesort_bad_i_s-7585.result b/mysql-test/r/filesort_bad_i_s-7585.result
new file mode 100644
index 00000000000..edb1574288f
--- /dev/null
+++ b/mysql-test/r/filesort_bad_i_s-7585.result
@@ -0,0 +1,9 @@
+SET sql_mode=STRICT_TRANS_TABLES;
+CREATE TABLE t0 (i INT) ENGINE=MyISAM;
+CREATE VIEW v1 AS SELECT * FROM t0;
+CREATE VIEW v2 AS SELECT * FROM v1;
+DROP VIEW IF EXISTS v1;
+CREATE TABLE t1 (i INT) ENGINE=MyISAM;
+INSERT INTO t1 SELECT TABLE_ROWS FROM information_schema.tables ORDER BY TABLE_ROWS;
+DROP VIEW v2;
+DROP TABLE t1, t0;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index b60deae1c80..f12a0c1127a 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -1091,3 +1091,15 @@ insert into t1 values ('a'),('b');
select 1 from t1 where a in (select group_concat(a) from t1);
1
drop table t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('b');
+CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('c');
+CREATE TABLE t3 (f3 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES ('d'),('e');
+SELECT GROUP_CONCAT( f2 ORDER BY ( f2 IN ( SELECT f1 FROM t1 WHERE f1 <= f2 ) ) ) AS field
+FROM ( SELECT * FROM t2 ) AS sq2, t3
+ORDER BY field;
+field
+c,c
+drop table t3, t2, t1;
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index f00ea0e041b..174088bf944 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
+DROP VIEW IF EXISTS v1;
CREATE TABLE gis_point (fid INTEGER NOT NULL PRIMARY KEY, g POINT);
CREATE TABLE gis_line (fid INTEGER NOT NULL PRIMARY KEY, g LINESTRING);
CREATE TABLE gis_polygon (fid INTEGER NOT NULL PRIMARY KEY, g POLYGON);
@@ -489,7 +490,7 @@ explain extended select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimpl
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select st_issimple(st_multipoint(st_point(3,6),st_point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(st_point(3,6)) AS `issimple(Point(3, 6))`
+Note 1003 select st_issimple(st_multipoint(point(3,6),point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `issimple(Point(3, 6))`
create table t1 (a geometry not null);
insert into t1 values (GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
@@ -1621,4 +1622,11 @@ drop table t1;
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100))
GEOMETRYCOLLECTION EMPTY
-End of 5.5 tests
+CREATE VIEW v1 AS SELECT POINT(1,1) AS p;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select point(1,1) AS `p` latin1 latin1_swedish_ci
+SELECT ASTEXT(p) FROM v1;
+ASTEXT(p)
+POINT(1 1)
+DROP VIEW v1;
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 9a259b3c4c6..9f5eb053cb7 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2339,6 +2339,16 @@ MIN(a) b
0 a
DROP TABLE t1;
+create table t1 (a int, b int);
+insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
+create table t2 (c int, d int);
+insert into t2 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
+select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
+a sum(b) (select d from t2 where c=a order by max(b) limit 1)
+1 23 11
+2 45 22
+4 89 44
+drop table t1, t2;
#
# LP bug#993726 Wrong result from a query with ALL subquery predicate in WHERE
#
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 99cc5d484bd..eda67460205 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -667,6 +667,37 @@ pk f
DROP TABLE t1;
End of 5.3 tests
#
+# Bug MDEV-7301: Unknown column quoted with backticks in HAVING clause when using function.
+# Bug#16221433 MYSQL REJECTS QUERY DUE TO BAD RESOLUTION OF NAMES IN HAVING; VIEW UNREADABLE
+#
+CREATE TABLE `t1` (
+`id` int(11) NOT NULL,
+`title` varchar(45) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) DEFAULT CHARSET=utf8;
+INSERT INTO `t1` VALUES ('1', 'Just for fun');
+INSERT INTO `t1` VALUES ('2', 'Wait until a sunhine');
+INSERT INTO `t1` VALUES ('3', 'Take a new turn');
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING `column_1` LIKE '8%';
+id column_1
+1 80a12660d24a72460e5e292fe33f870276d7f40a
+expected 1 row(s) returned
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING UPPER(column_1) LIKE '8%';
+id column_1
+1 80a12660d24a72460e5e292fe33f870276d7f40a
+expected -- 1 row(s) returned
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING UPPER(`column_1`) LIKE '8%';
+id column_1
+1 80a12660d24a72460e5e292fe33f870276d7f40a
+expected -- 1 row(s) returned not ER_BAD_FIELD_ERROR
+drop table t1;
+#
# Bug mdev-5160: two-way join with HAVING over the second table
#
CREATE TABLE t1 (c1 varchar(6)) ENGINE=MyISAM;
diff --git a/mysql-test/r/log_errchk.result b/mysql-test/r/log_errchk.result
index 407fba2323e..e1968e29662 100644
--- a/mysql-test/r/log_errchk.result
+++ b/mysql-test/r/log_errchk.result
@@ -1,5 +1,4 @@
-call mtr.add_suppression("Could not use");
-# Case 1: Setting fife file to general_log_file and slow_query_log_file
+# Case 1: Setting fifo file to general_log_file and slow_query_log_file
# system variable.
SET GLOBAL general_log_file="MYSQLTEST_VARDIR/tmp/general_log.fifo";;
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR/tmp/general_log.fifo'
@@ -7,4 +6,6 @@ SET GLOBAL slow_query_log_file="MYSQLTEST_VARDIR/tmp/slow_log.fifo";;
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'MYSQLTEST_VARDIR/tmp/slow_log.fifo'
# Case 2: Starting server with fifo file as general log file
# and slow query log file.
+call mtr.add_suppression("Could not use .* for logging \\(error 6\\)");
+call mtr.add_suppression("File '.*' not found \\(Errcode: 6 ");
Setting fifo file as general log file and slow query log failed.
diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result
index a609b222d53..6cbb25bd1d4 100644
--- a/mysql-test/r/log_tables_upgrade.result
+++ b/mysql-test/r/log_tables_upgrade.result
@@ -11,7 +11,7 @@ Table Op Msg_type Msg_text
test.bug49823 repair status OK
RENAME TABLE general_log TO renamed_general_log;
RENAME TABLE test.bug49823 TO general_log;
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -43,9 +43,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -53,7 +54,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
DROP TABLE general_log;
RENAME TABLE renamed_general_log TO general_log;
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index f701e7fa085..688184f2f83 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -823,6 +823,200 @@ create view v3 as select t2.id, t3.b from t2 join t3 using(id);
update t1 join v3 using (id) set t1.a=0;
drop view v1, v2, v3;
drop table t2, t3, t1;
+#
+# MDEV-7613: MariaDB 5.5.40 server crash on update table left join
+# with a view
+#
+CREATE TABLE `t1` (
+`f1` varchar(6) COLLATE latin1_general_ci DEFAULT NULL,
+`f2` varchar(6) COLLATE latin1_general_ci DEFAULT NULL,
+`f3` varchar(7) COLLATE latin1_general_ci DEFAULT NULL,
+`f4` varchar(15) COLLATE latin1_general_ci DEFAULT NULL,
+`f5` datetime DEFAULT NULL,
+`f6` varchar(2) COLLATE latin1_general_ci DEFAULT NULL,
+`f7` varchar(2) COLLATE latin1_general_ci DEFAULT NULL,
+`ff1` int(1) DEFAULT NULL,
+`ff2` int(1) DEFAULT NULL,
+`ff3` int(1) DEFAULT NULL,
+`ff4` int(1) DEFAULT NULL,
+`ff5` int(1) DEFAULT NULL,
+`ff6` int(1) DEFAULT NULL,
+`ff7` int(1) DEFAULT NULL,
+`ff8` int(2) DEFAULT NULL,
+`ff9` int(1) DEFAULT NULL,
+`ff10` int(1) DEFAULT NULL,
+`ff11` int(1) DEFAULT NULL,
+`ff12` int(1) DEFAULT NULL,
+`ff13` int(1) DEFAULT NULL,
+`ff14` int(1) DEFAULT NULL,
+`ff15` int(1) DEFAULT NULL,
+`f8` varchar(70) COLLATE latin1_general_ci DEFAULT NULL,
+`f9` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+`f10` varchar(50) COLLATE latin1_general_ci NOT NULL,
+`f11` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f12` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`f13` text COLLATE latin1_general_ci,
+`f14` time DEFAULT NULL,
+`f15` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
+`fg1` int(11) DEFAULT NULL,
+`fg2` int(11) DEFAULT NULL,
+`fg3` int(11) DEFAULT NULL,
+`fg4` int(11) DEFAULT NULL,
+`fg5` int(11) DEFAULT NULL,
+`fg6` int(11) DEFAULT NULL,
+`fg7` int(11) DEFAULT NULL,
+`fg9` int(11) DEFAULT NULL,
+`fg10` int(11) DEFAULT NULL,
+`fg11` int(11) DEFAULT NULL,
+`fg12` int(11) DEFAULT NULL,
+`fg13` int(11) DEFAULT NULL,
+`fg14` int(11) DEFAULT NULL,
+`fg15` int(11) DEFAULT NULL,
+`f16` double DEFAULT NULL,
+`f17` double DEFAULT NULL,
+`f18` int(11) DEFAULT NULL,
+`f19` int(11) DEFAULT NULL,
+`f20` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`f21` int(11) DEFAULT NULL,
+`f22` int(11) DEFAULT NULL,
+`f23` int(11) DEFAULT NULL,
+`f24` double DEFAULT NULL,
+`f25` int(11) DEFAULT NULL,
+`f26` double DEFAULT NULL,
+`f27` int(11) DEFAULT NULL,
+`f28` int(11) DEFAULT NULL,
+`f29` double DEFAULT NULL,
+`f30` int(11) DEFAULT NULL,
+`f31` double DEFAULT NULL,
+`PZ` double DEFAULT NULL,
+`f32` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f33` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f34` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f35` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
+`f36` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+`f37` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f20_2` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+`f38` varchar(30) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'Email = E-Mail / Whitemail = Brief',
+`insert_ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`f10`),
+KEY `f5_f12` (`f5`,`f12`),
+KEY `f5_f20` (`f5`,`f20`),
+KEY `f5_f33` (`f5`,`f33`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=COMPACT;
+INSERT INTO `t1` VALUES ('2011/2','201105','2011/19','gstfbnfr','2011-05-06
+00:00:00','gg','Ag',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'','','','','','','21:56:28','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,0,0,'Dffgult',1,0,0,NULL,0,NULL,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ggggil',NULL),('2008/4','200812','2008/50','hgckbgfx','2008-12-08
+00:00:00','gg','Ag',2,NULL,2,1,1,1,1,24,1,NULL,1,1,1,2,0,'gusschlifßlich
+zugg
+gflffonifrfn','88.77.79.214','10001614','fg-gtgggggdgtfn','fg-gtgggggdgtfn','birgit.tfrpfllf@gggx.df','11:55:21',NULL,1,0,1,1,1,1,1,1,0,1,1,1,0,0,NULL,NULL,0,4,'ffrtrgg',1,6,10,1.66666666666667,4,1,10,14,1.4,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.',NULL,'ggggil',NULL),('2008/4','200812','2008/51','hgckbgfx','2008-12-15
+00:00:00','gg','Ag',4,5,5,4,5,5,5,NULL,4,5,1,1,1,4,0,'gusschlifßlich zugg
+gflffonifrfn','79.197.185.64','10001686','fg-gtgggggdgtfn','fg-gtgggggdgtfn','kgtjg@swfftys.df','09:28:42',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,11,4.71428571428571,16,1.2,12,49,4.08111111111111,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.',NULL,'ggggil',NULL),('2008/4','200812','2008/50','nufchti','2008-12-08
+00:00:00','gg','Ag',4,1,1,5,5,5,5,12,4,5,1,1,2,1,0,'gusschlifßlich zugg
+gflffonifrfn','89.54.151.216','10001700','fg-gtgggggdgtfn','fg-gtgggggdgtfn','H_K2006@frffnft.df','16:41:45',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,10,4.28571428571429,11,2.6,12,41,1.58111111111111,1,NULL,NULL,'ffrtrgg
+Bgckofficf 5','vb5','Nufchtfr,
+Iris','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','junghdro','2008-12-11
+00:00:00','Do','Ag',2,2,5,5,4,4,2,72,2,5,2,2,1,1,0,'gusschlifßlich zugg
+gflffonifrfn','84.61.20.216','10001849','fg-ggriff','fg-ggriff','schofnf-glftfr@grcor.df','20:18:05',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,24,1.42857142857141,12,2.4,12,16,1,1,NULL,NULL,'ffrtrgg
+Bgckofficf 5','vb5','Junghfinrich,
+Dorothfg','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','fbflktj','2008-12-08
+00:00:00','gg','Ag',4,2,2,5,1,1,1,24,NULL,NULL,NULL,NULL,NULL,0,0,'Kgggfrg
+bzw. DigiCggg
+Funktion','217.84.62.6','10001888','fg-Kündigungfn','fg-Kündigungfn','f.frofschkf@gggx.df','21:05:59',NULL,1,1,1,1,1,1,1,0,0,0,0,0,0,0,NULL,NULL,0,0,'ffrtrgg',1,7,16,2.28571428571429,0,NULL,7,16,2.28571428571429,0,NULL,NULL,'out',NULL,'gbfl,
+Kgtjg','49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL),('2008/4','200812','2008/50','gltggggri','2008-12-09
+00:00:00','Di','Ag',4,1,1,4,2,1,2,16,1,2,2,2,2,2,0,'gusschlifßlich zugg
+gflffonifrfn','81.171.157.211','10001988','fg-gtgggggdgtfn','fg-gtgggggdgtfn','bistfr@nftcolognf.df','11:07:54',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,21,1,11,2.2,12,12,2.66666666666667,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL),('2008/4','200812','2008/50','ggufllfsg','2008-12-09
+00:00:00','Di','Ag',2,2,2,2,1,1,2,12,2,2,2,1,1,2,0,'ggobilfs
+Intfrnft','62.154.142.186','10002097','fg-gtgggggdgtfn','fg-gtgggggdgtfn','norbfrtwfdlich@fgggil.df','09:42:11',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,12,1.71428571428571,8,1.6,12,20,1.66666666666667,1,NULL,NULL,'ffrtrgg
+Bgckofficf 1','vb1','Mufllfr,
+ggbinf','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','wggnfg','2008-12-09
+00:00:00','Di','Ag',5,5,5,5,5,5,5,12,5,5,5,5,5,5,0,'gls grsgtz für
+Ffstnftz','85.180.141.246','10002127','fg-Kündigungfn','fg-Kündigungfn','rfinhgrt.gdolph@yghoo.df','17:44:11',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,15,5,25,5,12,60,5,1,NULL,NULL,'ffrtrgg
+Bgckofficf 1','vb1','Wggnfr,
+Annftt','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','schubrbf','2008-12-10
+00:00:00','Mi','Ag',1,2,NULL,2,1,2,1,24,NULL,NULL,NULL,NULL,NULL,0,0,'Kgggfrg
+bzw. DigiCggg
+Funktion','91.40.98.242','10002160','fg-gtgggggdgtfn','fg-gtgggggdgtfn','olgf.lifb@gggx.nft','18:18:25',NULL,1,1,0,1,1,1,1,0,0,0,0,0,0,0,NULL,NULL,0,0,'ffrtrgg',1,6,11,1.81111111111111,0,NULL,6,11,1.81111111111111,0,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL);
+CREATE TABLE `t2` (
+`ft1` datetime DEFAULT NULL,
+`ft2` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+`ft3` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+`ft4` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '',
+`ft5` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '',
+`ft6` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`ft6_2` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`ft7` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`ft8` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`ft9` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+`ft10` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+PRIMARY KEY (`ft4`,`ft5`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+INSERT INTO `t2` VALUES ('2013-03-13 00:00:00','2013-03-13 00:00:00','9999-12-31 00:00:00','#','extern FP f32 2','Default','Intern','DEFAULT',NULL,NULL,NULL),('2013-03-13 00:00:00','2013-03-13 00:00:00','9999-12-31 00:00:00','#','extern FP f32 3','Default','Intern','DEFAULT',NULL,NULL,NULL);
+CREATE TABLE `t3` (
+`fe1` int(10) NOT NULL DEFAULT '0',
+`fe2` char(50) COLLATE latin1_general_ci DEFAULT 'nn',
+`f34` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe3` double DEFAULT NULL,
+`fe4` double DEFAULT NULL,
+`fe5` char(4) COLLATE latin1_general_ci DEFAULT NULL,
+`f32` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe6` int(3) DEFAULT '0',
+`fe7` char(1) COLLATE latin1_general_ci DEFAULT NULL,
+`ft6` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`f33` char(4) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'virtuelle f33s',
+`fe8` char(4) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'aus dem ADS',
+`f37` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe9` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe10` int(5) DEFAULT '0',
+`fe11` int(10) DEFAULT '0',
+`fe12` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe13` double DEFAULT NULL,
+`fe14` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+`fe15` date DEFAULT NULL,
+`fe16` date DEFAULT NULL,
+`fe17` int(10) DEFAULT '0',
+`fe18` date NOT NULL DEFAULT '0000-00-00',
+`ft3` date NOT NULL DEFAULT '0000-00-00',
+PRIMARY KEY (`fe1`),
+KEY `fe2` (`fe2`,`fe18`,`ft3`),
+KEY `f33` (`f33`),
+KEY `fe8` (`fe8`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=COMPACT COMMENT='CustomerService und Outsourcer Userinformationen';
+INSERT INTO `t3` VALUES (1,'aabggn','gab, glgna',0,NULL,NULL,'gxtgrn D gnd g
+gggsbgrg',0,NULL,'gxtgrn','dsa','dsa','gggsbgrg','0',91611,0,'0',0,'agsggschigdgn','2014-08-11','2014-09-05',0,'2011-01-01','2014-08-11'),(4,'aabigr','gab,
+Iggr',0,NULL,NULL,'gxtgrn D gnd g
+gggsbgrg',0,NULL,'gxtgrn','dsa','dsa','gggsbgrg','0',0,0,'0',0,'agsggschigdgn','2014-08-11','2014-09-05',0,'2012-10-01','2014-08-11'),(7,'abgcrist','gbg,
+ghristggna',15182,1,'ja','ggshilfg gxtgrn 1',1,NULL,'gg
+galgs','ag1','ag1','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'1900-01-01','2010-06-10'),(8,'abgcrist','gbg,
+ghristggna',15182,1,'ja','Zgntralg gftgr galgs Bgtrgggng 1',1,NULL,'gg
+galgs','sb1','sb1','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'2010-07-01','2012-08-11'),(9,'abgcrist','gbg,
+ghristggna',15182,1,'ja','galgs Inbggnd 2',1,NULL,'gg
+galgs','si2','si2','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'2012-09-01','2014-01-11'),(10,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 1',1,NULL,'gg
+galgs','sg1','sg1','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'1900-01-01','2010-11-10'),(11,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 1',1,NULL,'gg
+galgs','sg1','sg1','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'2010-12-01','2011-08-11'),(12,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 2',1,NULL,'gg
+galgs','sg2','sg2','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'2011-09-01','2012-01-11'),(13,'abgcgr','gbg,
+ggrnglgg',14962,0.75,NULL,'galgs Ogtbggnd 2',1,NULL,'gg
+galgs','sg2','sg2','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,'2011-09-11',11800647,'2012-02-01','2011-08-11'),(14,'rgghrsgr','gbg,
+gigrid',14781,1,'ja','Fgrdgrgngsmanaggmgnt 1',1,NULL,'gg
+Zahlgng','fm1','fm1','grfgrt','0',12141,0,'0',1,NULL,NULL,NULL,11010781,'1900-01-01','2012-08-11');
+CREATE ALGORITHM=MERGE
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v1` AS select `t1a`.`ft1` AS `ft1`,`t1a`.`ft2` AS `ft2`,`t1a`.`ft3` AS `ft3`,`t1a`.`ft4` AS `ft4`,`t1a`.`ft5` AS `ft5`,`t1a`.`ft6` AS `ft6`,`t1a`.`ft6_2` AS `ft6_2`,`t1a`.`ft7` AS `ft7`,`t1a`.`ft8` AS `ft8`,`t1a`.`ft9` AS `ft9`,`t1a`.`ft10` AS `ft10` from `t2` `t1a` where (if((`t1a`.`ft10` = 'virtuell'),0,1) = 1);
+CREATE ALGORITHM=UNDEFINED
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v2` AS select distinct `t1b`.`fe2` AS `fe2`,min(`t1b`.`fe18`) AS `fe18`,max(`t1b`.`ft3`) AS `ft3` from `t3` `t1b` where ((`t1b`.`fe2` <> '') and (curdate() >= `t1b`.`fe18`)) group by `t1b`.`fe2`;
+CREATE ALGORITHM=UNDEFINED
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v3` AS select `t1c`.`fe2` AS `fe2`,`t1c`.`f34` AS `f34`,`t1c`.`f33` AS `f33`,`t1c`.`f32` AS `f32`,`t1c`.`f37` AS `f37`,`t1c`.`fe10` AS `fe10`,if((`tov`.`ft6` in ('klarmobil','callmobile')),`tov`.`ft9`,`tov`.`ft6`) AS `ft6_1`,`tov`.`ft6_2` AS `ft6_2`,`ua`.`fe18` AS `fe18`,`ua`.`ft3` AS `ft3` from ((`t3` `t1c` left join `v2` `ua` on((`t1c`.`fe2` = `ua`.`fe2`))) left join `v1` `tov` on((`t1c`.`fe8` = `tov`.`ft4`))) where (`t1c`.`ft3` = `ua`.`ft3`) group by `t1c`.`fe2`,`t1c`.`f34`,`t1c`.`f33`,`t1c`.`f32` order by `t1c`.`f34`;
+UPDATE t1 t1 left join v3 t2 on t1.f4 = t2.fe2 SET t1.f20 = t2.ft6_1, t1.f32 = t2.f32, t1.f33 = t2.f33, t1.f37 = t2.f37 WHERE f5 >= '2015-02-01';
+#MDEV-8018: main.multi_update fails with --ps-protocol
+prepare stmt1 from "UPDATE t1 t1 left join v3 t2 on t1.f4 = t2.fe2 SET t1.f20 = t2.ft6_1, t1.f32 = t2.f32, t1.f33 = t2.f33, t1.f37 = t2.f37 WHERE f5 >= '2015-02-01'";
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+drop view v3,v2,v1;
+drop table t1,t2,t3;
end of 5.5 tests
# Bug mdev-5970
diff --git a/mysql-test/r/mysql_upgrade-6984.result b/mysql-test/r/mysql_upgrade-6984.result
index 6ae995cd030..7890b66d494 100644
--- a/mysql-test/r/mysql_upgrade-6984.result
+++ b/mysql-test/r/mysql_upgrade-6984.result
@@ -1,5 +1,5 @@
update mysql.user set password=password("foo") where user='root';
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -42,9 +42,10 @@ error : Corrupt
mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -52,7 +53,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
update mysql.user set password='' where user='root';
flush privileges;
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index 64c2c0222fc..737f8b63783 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -1,5 +1,5 @@
Run mysql_upgrade once
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -30,9 +30,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -40,12 +41,12 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
Run it again - should say already completed
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
Force should run it regardless of wether it's been run before
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -76,9 +77,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -86,12 +88,12 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
GRANT ALL ON *.* TO mysqltest1@'%';
Run mysql_upgrade with password protected account
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -122,9 +124,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -132,7 +135,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
DROP USER mysqltest1@'%';
Version check failed. Got the following error when calling the 'mysql' command line client
@@ -142,7 +145,7 @@ Run mysql_upgrade with a non existing server socket
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
FATAL ERROR: Upgrade failed
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -173,9 +176,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -183,7 +187,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
set GLOBAL sql_mode=default;
#
@@ -194,7 +198,7 @@ CREATE PROCEDURE testproc() BEGIN END;
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -225,9 +229,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -235,7 +240,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
CALL testproc();
DROP PROCEDURE testproc;
@@ -249,7 +254,7 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
Run mysql_upgrade with all privileges on a user
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -280,9 +285,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -290,7 +296,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
SHOW GRANTS FOR 'user3'@'%';
Grants for user3@%
@@ -299,7 +305,7 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%';
End of 5.1 tests
The --upgrade-system-tables option was used, user tables won't be touched.
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -330,8 +336,11 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 2/6: Fixing views... Skipped
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names ... Skipped
+Phase 5/6: Checking and upgrading tables... Skipped
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
#
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
@@ -339,7 +348,7 @@ OK
#
# Droping the previously created mysql_upgrade_info file..
# Running mysql_upgrade with --skip-write-binlog..
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -370,9 +379,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -380,7 +390,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
#
# MDEV-4332 Increase username length from 16 characters
@@ -394,7 +404,7 @@ GRANT INSERT ON mysql.user TO very_long_user_name_number_2;
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
CREATE PROCEDURE test.pr() BEGIN END;
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -425,9 +435,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -435,7 +446,7 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
definer
diff --git a/mysql-test/r/mysql_upgrade_no_innodb.result b/mysql-test/r/mysql_upgrade_no_innodb.result
index e65c6ae05f7..acbca131587 100644
--- a/mysql-test/r/mysql_upgrade_no_innodb.result
+++ b/mysql-test/r/mysql_upgrade_no_innodb.result
@@ -1,5 +1,5 @@
The --upgrade-system-tables option was used, user tables won't be touched.
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -42,6 +42,9 @@ error : Corrupt
mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 2/6: Fixing views... Skipped
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names ... Skipped
+Phase 5/6: Checking and upgrading tables... Skipped
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result
index 1bbee22aba2..e06d1bb1671 100644
--- a/mysql-test/r/mysql_upgrade_ssl.result
+++ b/mysql-test/r/mysql_upgrade_ssl.result
@@ -1,7 +1,7 @@
#
# Bug#55672 mysql_upgrade dies with internal error
#
-Phase 1/5: Checking mysql database
+Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
@@ -32,9 +32,10 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
-Phase 2/5: Running 'mysql_fix_privilege_tables'...
-Phase 3/5: Fixing table and database names
-Phase 4/5: Checking and upgrading tables
+Phase 2/6: Fixing views
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
Processing databases
information_schema
mtr
@@ -42,5 +43,5 @@ mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
-Phase 5/5: Running 'FLUSH PRIVILEGES'...
+Phase 6/6: Running 'FLUSH PRIVILEGES'
OK
diff --git a/mysql-test/r/mysql_upgrade_view.result b/mysql-test/r/mysql_upgrade_view.result
new file mode 100644
index 00000000000..37c9c926149
--- /dev/null
+++ b/mysql-test/r/mysql_upgrade_view.result
@@ -0,0 +1,286 @@
+set sql_log_bin=0;
+drop table if exists t1,v1,v2,v3,v4,v1badcheck;
+drop view if exists t1,v1,v2,v3,v4,v1badcheck;
+create table t1(a int);
+create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
+flush tables;
+check view v1;
+Table Op Msg_type Msg_text
+test.v1 check status OK
+check view v1badcheck;
+Table Op Msg_type Msg_text
+test.v1badcheck check note View text checksum failed
+check view v2;
+Table Op Msg_type Msg_text
+test.v2 check status OK
+check view v3;
+Table Op Msg_type Msg_text
+test.v3 check status OK
+check view v1 for upgrade;
+Table Op Msg_type Msg_text
+test.v1 check error Upgrade required. Please do "REPAIR VIEW `v1`" or dump/reload to fix it!
+check view v1badcheck for upgrade;
+Table Op Msg_type Msg_text
+test.v1badcheck check note View text checksum failed
+check view v2 for upgrade;
+Table Op Msg_type Msg_text
+test.v2 check error Upgrade required. Please do "REPAIR VIEW `v2`" or dump/reload to fix it!
+check view v3 for upgrade;
+Table Op Msg_type Msg_text
+test.v3 check error Upgrade required. Please do "REPAIR VIEW `v3`" or dump/reload to fix it!
+Phase 1/6: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/6: Fixing views
+test.v1 OK
+test.v1badcheck OK
+test.v2 OK
+test.v3 OK
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.kv OK
+test.t1 OK
+Phase 6/6: Running 'FLUSH PRIVILEGES'
+OK
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+set sql_log_bin=1;
+REPAIR VIEW v1,v2;
+Table Op Msg_type Msg_text
+test.v1 repair status OK
+test.v2 repair status OK
+REPAIR VIEW v1badcheck;
+Table Op Msg_type Msg_text
+test.v1badcheck repair status OK
+REPAIR NO_WRITE_TO_BINLOG VIEW v3;
+Table Op Msg_type Msg_text
+test.v3 repair status OK
+set sql_log_bin=0;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW v1,v2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW v1badcheck
+LOAD DATA INFILE 'MYSQLD_DATADIR/test/v1.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+k v
+algorithm 1
+md5 5e6eaf216e7b016fcedfd4e1113517af
+SELECT k from kv where k ='mariadb-version';
+k
+mariadb-version
+truncate table kv;
+LOAD DATA INFILE 'MYSQLD_DATADIR/test/v2.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+k v
+algorithm 2
+md5 5e6eaf216e7b016fcedfd4e1113517af
+SELECT k from kv where k ='mariadb-version';
+k
+mariadb-version
+truncate table kv;
+LOAD DATA INFILE 'MYSQLD_DATADIR/test/v3.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+k v
+algorithm 0
+md5 5e6eaf216e7b016fcedfd4e1113517af
+SELECT k from kv where k ='mariadb-version';
+k
+mariadb-version
+truncate table kv;
+LOAD DATA INFILE 'MYSQLD_DATADIR/test/v1badcheck.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+k v
+algorithm 1
+md5 5e6eaf216e7b016fcedfd4e1113517af
+SELECT k from kv where k ='mariadb-version';
+k
+mariadb-version
+truncate table kv;
+drop view if exists v1,v2,v3,v1badcheck;
+rename table mysql.event to mysql.ev_bk;
+flush tables;
+create algorithm=temptable view v4 as select a from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v4;
+View Create View character_set_client collation_connection
+v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
+MySQL upgrade detected
+Phase 1/6: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.ev_bk OK
+mysql.event OK
+mysql.func OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/6: Fixing views from mysql
+test.v1 OK
+test.v2 OK
+test.v3 OK
+test.v4 OK
+Phase 3/6: Running 'mysql_fix_privilege_tables'
+Phase 4/6: Fixing table and database names
+Phase 5/6: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.kv OK
+test.t1 OK
+Phase 6/6: Running 'FLUSH PRIVILEGES'
+OK
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`a` AS `a` from `t1` utf8 utf8_general_ci
+show create view v4;
+View Create View character_set_client collation_connection
+v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
+LOAD DATA INFILE 'MYSQLD_DATADIR/test/v1.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+k v
+algorithm 2
+md5 5e6eaf216e7b016fcedfd4e1113517af
+SELECT k from kv where k ='mariadb-version';
+k
+mariadb-version
+truncate table kv;
+drop view if exists v1,v2,v3;
+drop table mysql.event;
+rename table mysql.ev_bk to mysql.event;
+test.kv OK
+test.t1 OK
+test.v1 OK
+test.v2 OK
+test.v3 OK
+test.v4 OK
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW v1,v2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW v1badcheck
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR TABLE `kv` USE_FRM
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR TABLE `t1` USE_FRM
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW `v1` FROM MYSQL
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW `v2` FROM MYSQL
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW `v3` FROM MYSQL
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; REPAIR VIEW `v4` FROM MYSQL
+drop table if exists kv;
+drop view v1,v2,v3,v4;
+drop table t1;
diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result
index 5de1b9d8b6d..c5dd1500110 100644
--- a/mysql-test/r/openssl_1.result
+++ b/mysql-test/r/openssl_1.result
@@ -3,8 +3,8 @@ create table t1(f1 int);
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA";
+grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
+grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges;
connect(localhost,ssl_user2,,test,MASTER_PORT,MASTER_SOCKET);
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index e1014002784..3c62d0676ae 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -4423,7 +4423,7 @@ INSERT INTO t1 VALUES
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 hash_ALL a #hash#$hj 2 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE t2 hash_ALL a #hash#$hj 6 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
1
1
@@ -4433,7 +4433,7 @@ SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 hash_ALL a #hash#$hj 2 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE t2 hash_ALL a #hash#$hj 6 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
1
1
diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result
index 172e40cb40c..81c0adb36cc 100644
--- a/mysql-test/r/sp-destruct.result
+++ b/mysql-test/r/sp-destruct.result
@@ -170,3 +170,7 @@ Error 1728 Cannot load from mysql.proc. The table is probably corrupted
# Restore mysql.proc
DROP TABLE mysql.proc;
RENAME TABLE proc_backup TO mysql.proc;
+create database mysqltest1;
+create procedure mysqltest1.foo() select "foo";
+update mysql.proc set name='' where db='mysqltest1';
+drop database mysqltest1;
diff --git a/mysql-test/r/sp-innodb.result b/mysql-test/r/sp-innodb.result
index da02957d3c9..b3405705698 100644
--- a/mysql-test/r/sp-innodb.result
+++ b/mysql-test/r/sp-innodb.result
@@ -30,3 +30,103 @@ CALL p1();
CALL p1();
drop procedure p1;
drop table t1,t2;
+
+#
+# BUG 16041903: CONTINUE HANDLER NOT INVOKED
+# IN A STORED FUNCTION AFTER A LOCK WAIT TIMEOUT
+#
+
+# Save and set lock wait timeout
+SET @lock_wait_timeout_saved= @@lock_wait_timeout;
+SET @innodb_lock_wait_timeout_saved= @@innodb_lock_wait_timeout;
+SET @@lock_wait_timeout= 1;
+SET @@innodb_lock_wait_timeout= 1;
+
+# Create a function with exit handler:
+CREATE FUNCTION f1() RETURNS VARCHAR(20)
+BEGIN
+DECLARE EXIT HANDLER FOR SQLSTATE '42S02' RETURN 'No such table';
+INSERT INTO no_such_table VALUES (1);
+END//
+
+# Create a function calling f1():
+CREATE FUNCTION f2() RETURNS VARCHAR(20)
+BEGIN
+RETURN f1();
+END//
+
+# Create a function provoking deadlock:
+CREATE FUNCTION f3() RETURNS VARCHAR(20)
+BEGIN
+UPDATE t1 SET i= 1 WHERE i= 1;
+RETURN 'Will never get here';
+END//
+
+# Create a function calling f3, to create
+# a deadlock indirectly:
+CREATE FUNCTION f4() RETURNS VARCHAR(20)
+BEGIN
+RETURN f3();
+END//
+
+# Open another connection, create and initialize a table
+# to be used for provoking deadlock, put a lock on the table:
+CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET AUTOCOMMIT= 0;
+UPDATE t1 SET i=1 WHERE i=1;
+
+# On the default connection, do an update to provoke a
+# deadlock, then call the function with handler. This case
+# fails without the patch (with error ER_NO_SUCH_TABLE):
+SET AUTOCOMMIT= 0;
+UPDATE t1 SET i=1 WHERE i=1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT f1() AS 'f1():';
+f1():
+No such table
+
+# Provoke another deadlock, then call the function with
+# handler indirectly. This case fails without the patch
+# (with error ER_NO_SUCH_TABLE):
+UPDATE t1 SET i= 1 WHERE i= 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT f2() AS 'f2():';
+f2():
+No such table
+
+# Provoke yet another deadlock, but now from within a function,
+# then call the function with handler. This succeeds even
+# without the patch because is_fatal_sub_stmt_error is reset
+# in restore_sub_stmt after the failing function has been
+# executed. The test case is included anyway for better coverage:
+SELECT f3() AS 'f3():';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT f1() AS 'f1():';
+f1():
+No such table
+# Provoke yet another deadlock, but now from within a function,
+# calling another function, then call the function with handler.
+# This succeeds even without the patch because
+# is_fatal_sub_stmt_error is reset in restore_sub_stmt after
+# the failing function has been executed. The test case is
+# included anyway for better coverage:
+SELECT f4() AS 'f4():';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT f1() AS 'f1():';
+f1():
+No such table
+
+# Disconnect, drop functions and table:
+DROP FUNCTION f4;
+DROP FUNCTION f3;
+DROP FUNCTION f2;
+DROP FUNCTION f1;
+DROP TABLE t1;
+
+# Reset lock wait timeouts
+SET @@lock_wait_timeout= @lock_wait_timeout_saved;
+SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved;
+#
+# BUG 16041903: End of test case
+#
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index 525bae01b23..57427a228eb 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -3,10 +3,10 @@ Variable_name Value
Ssl_cipher DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
-Ssl_server_not_before Dec 5 04:48:40 2014 GMT
+Ssl_server_not_before Apr 25 14:55:05 2015 GMT
SHOW STATUS LIKE 'Ssl_server_not_after';
Variable_name Value
-Ssl_server_not_after Dec 1 04:48:40 2029 GMT
+Ssl_server_not_after Apr 20 14:55:05 2035 GMT
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 2bb00835a75..46c799c4f6e 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -2988,4 +2988,13 @@ pk1 i1 i2 c2 pk3 i3 c3
SET join_cache_level=@tmp_mdev5059;
set optimizer_switch=@tmp_os_mdev5059;
DROP TABLE t1,t2,t3,t4;
+#
+# MDEV-7911: crash in Item_cond::eval_not_null_tables
+#
+create table t1(a int);
+insert into t1 values(1),(2),(3),(null);
+explain
+select 1 from t1 where _cp932 "1" in (select '1' from t1);
+ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
+drop table t1;
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result
index 43ba6ead575..9a5da710a4c 100644
--- a/mysql-test/r/subselect_sj2.result
+++ b/mysql-test/r/subselect_sj2.result
@@ -1178,5 +1178,89 @@ id nombre
2 row 2
3 row 3
DROP TABLE t1, t2;
+#
+# MDEV-7474: Semi-Join's DuplicateWeedout strategy skipped for some values of optimizer_search_depth
+#
+CREATE TABLE t1 (
+t1id BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t2 (
+t2id BIGINT(20) NOT NULL,
+t1idref BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t2id),
+INDEX FK_T2_T1Id (t1idref),
+CONSTRAINT FK_T2_T1Id FOREIGN KEY (t1idref) REFERENCES t1 (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t3 (
+t3idref BIGINT(20) NOT NULL,
+t2idref BIGINT(20) NOT NULL,
+sequencenumber INT(10) NOT NULL,
+PRIMARY KEY (t3idref, t2idref),
+INDEX FK_T3_T2Id (t2idref),
+CONSTRAINT FK_T3_T2Id FOREIGN KEY (t2idref) REFERENCES t2 (t2id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+INSERT INTO t1 (t1id) VALUES (100001),(100017),(100018),(100026),(100027),(100028),(100029),(100030),
+(100031),(100032),(100033),(100034),(100035),(100036),(100037),(100038),(100040),(100041),(100042),
+(100043),(100044),(100045),(100046),(100047);
+INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
+INSERT IGNORE INTO t1 VALUES (200001, 'a');
+INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
+INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+set @tmp7474= @@optimizer_search_depth;
+SET SESSION optimizer_search_depth = 1;
+SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+t1idref t2id
+200001 200011
+200001 200012
+200001 200013
+explain SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY T3_0_ ref PRIMARY,FK_T3_T2Id PRIMARY 8 const 3 Using index; Start temporary
+1 PRIMARY T2_1_ eq_ref PRIMARY,FK_T2_T1Id PRIMARY 8 test.T3_0_.t2idref 1
+1 PRIMARY T1_1_ eq_ref PRIMARY PRIMARY 8 test.T2_1_.t1idref 1 Using index
+1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary
+drop table t3,t2,t1;
+set optimizer_search_depth=@tmp7474;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result
index ee8aa39d095..c10b550d11a 100644
--- a/mysql-test/r/subselect_sj2_jcl6.result
+++ b/mysql-test/r/subselect_sj2_jcl6.result
@@ -1193,6 +1193,90 @@ id nombre
2 row 2
3 row 3
DROP TABLE t1, t2;
+#
+# MDEV-7474: Semi-Join's DuplicateWeedout strategy skipped for some values of optimizer_search_depth
+#
+CREATE TABLE t1 (
+t1id BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t2 (
+t2id BIGINT(20) NOT NULL,
+t1idref BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t2id),
+INDEX FK_T2_T1Id (t1idref),
+CONSTRAINT FK_T2_T1Id FOREIGN KEY (t1idref) REFERENCES t1 (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t3 (
+t3idref BIGINT(20) NOT NULL,
+t2idref BIGINT(20) NOT NULL,
+sequencenumber INT(10) NOT NULL,
+PRIMARY KEY (t3idref, t2idref),
+INDEX FK_T3_T2Id (t2idref),
+CONSTRAINT FK_T3_T2Id FOREIGN KEY (t2idref) REFERENCES t2 (t2id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+INSERT INTO t1 (t1id) VALUES (100001),(100017),(100018),(100026),(100027),(100028),(100029),(100030),
+(100031),(100032),(100033),(100034),(100035),(100036),(100037),(100038),(100040),(100041),(100042),
+(100043),(100044),(100045),(100046),(100047);
+INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
+INSERT IGNORE INTO t1 VALUES (200001, 'a');
+INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
+INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+set @tmp7474= @@optimizer_search_depth;
+SET SESSION optimizer_search_depth = 1;
+SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+t1idref t2id
+200001 200011
+200001 200012
+200001 200013
+explain SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY T3_0_ ref PRIMARY,FK_T3_T2Id PRIMARY 8 const 3 Using index; Start temporary
+1 PRIMARY T2_1_ eq_ref PRIMARY,FK_T2_T1Id PRIMARY 8 test.T3_0_.t2idref 1 Using join buffer (flat, BKA join); Key-ordered scan
+1 PRIMARY T1_1_ eq_ref PRIMARY PRIMARY 8 test.T2_1_.t1idref 1 Using index
+1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary
+drop table t3,t2,t1;
+set optimizer_search_depth=@tmp7474;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
#
diff --git a/mysql-test/r/subselect_sj2_mat.result b/mysql-test/r/subselect_sj2_mat.result
index 0ff366b0d7a..4e75aee24a2 100644
--- a/mysql-test/r/subselect_sj2_mat.result
+++ b/mysql-test/r/subselect_sj2_mat.result
@@ -1180,6 +1180,90 @@ id nombre
2 row 2
3 row 3
DROP TABLE t1, t2;
+#
+# MDEV-7474: Semi-Join's DuplicateWeedout strategy skipped for some values of optimizer_search_depth
+#
+CREATE TABLE t1 (
+t1id BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t2 (
+t2id BIGINT(20) NOT NULL,
+t1idref BIGINT(20) NOT NULL,
+code VARCHAR(20),
+PRIMARY KEY (t2id),
+INDEX FK_T2_T1Id (t1idref),
+CONSTRAINT FK_T2_T1Id FOREIGN KEY (t1idref) REFERENCES t1 (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+CREATE TABLE t3 (
+t3idref BIGINT(20) NOT NULL,
+t2idref BIGINT(20) NOT NULL,
+sequencenumber INT(10) NOT NULL,
+PRIMARY KEY (t3idref, t2idref),
+INDEX FK_T3_T2Id (t2idref),
+CONSTRAINT FK_T3_T2Id FOREIGN KEY (t2idref) REFERENCES t2 (t2id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+INSERT INTO t1 (t1id) VALUES (100001),(100017),(100018),(100026),(100027),(100028),(100029),(100030),
+(100031),(100032),(100033),(100034),(100035),(100036),(100037),(100038),(100040),(100041),(100042),
+(100043),(100044),(100045),(100046),(100047);
+INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
+INSERT IGNORE INTO t1 VALUES (200001, 'a');
+INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
+INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+set @tmp7474= @@optimizer_search_depth;
+SET SESSION optimizer_search_depth = 1;
+SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+t1idref t2id
+200001 200011
+200001 200012
+200001 200013
+explain SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+t2 T2_0_
+WHERE
+T2_0_.t1idref IN (
+SELECT
+T1_1_.t1id
+FROM
+t3 T3_0_
+INNER JOIN
+t2 T2_1_
+ON T3_0_.t2idref=T2_1_.t2id
+INNER JOIN
+t1 T1_1_
+ON T2_1_.t1idref=T1_1_.t1id
+WHERE
+T3_0_.t3idref= 1
+);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY T3_0_ ref PRIMARY,FK_T3_T2Id PRIMARY 8 const 3 Using index; Start temporary
+1 PRIMARY T2_1_ eq_ref PRIMARY,FK_T2_T1Id PRIMARY 8 test.T3_0_.t2idref 1
+1 PRIMARY T1_1_ eq_ref PRIMARY PRIMARY 8 test.T2_1_.t1idref 1 Using index
+1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary
+drop table t3,t2,t1;
+set optimizer_search_depth=@tmp7474;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
set optimizer_switch=default;
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index f388fd41ce8..ba582d7e008 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -3002,6 +3002,15 @@ pk1 i1 i2 c2 pk3 i3 c3
SET join_cache_level=@tmp_mdev5059;
set optimizer_switch=@tmp_os_mdev5059;
DROP TABLE t1,t2,t3,t4;
+#
+# MDEV-7911: crash in Item_cond::eval_not_null_tables
+#
+create table t1(a int);
+insert into t1 values(1),(2),(3),(null);
+explain
+select 1 from t1 where _cp932 "1" in (select '1' from t1);
+ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
+drop table t1;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result
index ff488fea427..c633261bcd3 100644
--- a/mysql-test/r/table_elim.result
+++ b/mysql-test/r/table_elim.result
@@ -677,3 +677,35 @@ USA
CAN
DROP TABLE t1, t2, t3;
SET optimizer_switch=@save_optimizer_switch;
+#
+# MDEV-7893: table_elimination works wrong with on computed expression and compound unique key
+# (just a testcase)
+CREATE TABLE t1 (
+PostID int(10) unsigned NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1266 Using storage engine MyISAM for table 't1'
+INSERT INTO t1 (PostID) VALUES (1), (2);
+CREATE TABLE t2 (
+VoteID int(10) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+EntityID int(10) unsigned NOT NULL,
+UserID int(10) unsigned NOT NULL,
+UNIQUE KEY EntityID (EntityID,UserID)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1266 Using storage engine MyISAM for table 't2'
+INSERT INTO t2 (EntityID, UserID) VALUES (1, 30), (2, 30);
+SELECT t1.*, T.Voted as Voted
+FROM
+t1 LEFT JOIN (
+SELECT 1 AS Voted, EntityID
+FROM t2
+WHERE t2.UserID = '20' ) AS T
+ON T.EntityID = t1.PostID
+WHERE t1.PostID='1'
+LIMIT 1;
+PostID Voted
+1 NULL
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/trigger-trans.result b/mysql-test/r/trigger-trans.result
index 722ac79854d..cab7336cbe5 100644
--- a/mysql-test/r/trigger-trans.result
+++ b/mysql-test/r/trigger-trans.result
@@ -195,3 +195,28 @@ b val
14 g
drop trigger t1_after_insert;
drop table t1,t2;
+#
+#Bug#19683834 SOME INNODB ERRORS CAUSES STORED FUNCTION
+# AND TRIGGER HANDLERS TO BE IGNORED
+#Code fixed in Bug#16041903
+CREATE TABLE t1 (id int unsigned PRIMARY KEY, val int DEFAULT 0)
+ENGINE=InnoDB;
+INSERT INTO t1 (id) VALUES (1), (2);
+CREATE TABLE t2 (id int PRIMARY KEY);
+CREATE TABLE t3 LIKE t2;
+CREATE TRIGGER bef_insert BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+DECLARE CONTINUE HANDLER FOR 1062 BEGIN END;
+INSERT INTO t3 (id) VALUES (NEW.id);
+INSERT INTO t3 (id) VALUES (NEW.id);
+END//
+START TRANSACTION;
+UPDATE t1 SET val = val + 1;
+connect con2,localhost,root,,test,,;
+SET SESSION innodb_lock_wait_timeout = 2;
+UPDATE t1 SET val = val + 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t2 (id) VALUES (1);
+disconnect con2;
+connection default;
+DROP TABLE t3, t2, t1;
diff --git a/mysql-test/r/uniques_crash-7912.result b/mysql-test/r/uniques_crash-7912.result
new file mode 100644
index 00000000000..bf3aab684ae
--- /dev/null
+++ b/mysql-test/r/uniques_crash-7912.result
@@ -0,0 +1,11 @@
+call mtr.add_suppression("Out of memory");
+set sql_mode="";
+drop table if exists t1,t2;
+create table `t1` (`a` datetime not null) engine=InnoDB;
+create table `t2` (`a` int not null) engine=innodb;
+replace into t1 values (),();
+insert into t2 values(0);
+set session sort_buffer_size = 1024*1024*1024*1024;
+delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a;
+drop table t2;
+drop table t1;
diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem
index a0ba67444ef..e934823eea3 100644
--- a/mysql-test/std_data/cacert.pem
+++ b/mysql-test/std_data/cacert.pem
@@ -1,79 +1,78 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 16263805969935345171 (0xe1b4a55c3ddfa613)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Serial Number: 11580370790696127632 (0xa0b5bde0f2c08c90)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Dec 5 04:48:11 2014 GMT
- Not After : Dec 1 04:48:11 2030 GMT
- Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Not Before: Apr 25 14:55:05 2015 GMT
+ Not After : Apr 20 14:55:05 2035 GMT
+ Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:b4:95:bd:24:92:73:06:22:01:13:28:0e:09:a3:
- 94:05:96:54:9d:dc:8f:83:39:f3:64:7a:31:70:f6:
- d9:c4:14:19:75:87:a6:b1:ea:52:ed:40:54:5a:f6:
- 9c:13:8e:d8:76:8f:5a:65:a5:20:19:19:bd:51:9d:
- ba:35:ce:9a:a9:58:0a:fc:11:6e:1d:cb:a8:f1:92:
- 79:ee:aa:fc:e3:32:5e:aa:0d:0b:23:34:95:e9:d3:
- 8e:3f:72:93:90:bc:2c:b0:04:75:4f:a4:4a:a0:32:
- db:ac:89:ac:34:9b:d0:07:e3:81:e9:ca:5b:26:f0:
- f5:de:fe:d5:5e:a0:54:26:dd:ec:58:07:6e:b9:e5:
- 97:f6:20:6d:d8:4a:c0:50:cc:81:e6:d2:3f:c7:47:
- 70:8b:15:89:65:71:2e:47:c3:42:76:b5:ee:16:0e:
- 26:97:6a:a3:1c:ad:90:53:50:b0:b1:6d:1d:b0:b8:
- 6d:df:3c:ee:bd:3b:87:e8:db:4d:3a:72:78:dd:db:
- 40:3d:c9:20:46:b8:4e:33:bb:76:b7:4f:b2:79:da:
- 03:cc:f9:75:c0:1d:4c:51:0a:b9:9b:25:34:50:11:
- 97:df:82:46:02:a9:bc:98:51:3e:c3:df:57:ad:b7:
- 28:be:de:65:ce:2b:f3:2c:22:f5:af:31:28:1c:ef:
- 10:09
+ 00:c0:1f:90:7c:2b:c2:ea:01:93:ce:e0:c5:72:e8:
+ 1c:06:bd:63:4e:b6:d2:c6:00:32:13:27:42:9e:c9:
+ 3c:91:33:4d:15:90:67:7d:9d:d8:be:9b:12:e2:f6:
+ 1b:46:81:4a:8b:10:c5:b8:14:53:ab:6a:2c:c3:7f:
+ 66:87:6c:0e:18:51:4e:9c:93:7a:6d:a1:d4:06:47:
+ 58:61:a6:04:21:2c:bd:74:7a:e4:68:45:fe:91:fe:
+ fb:a6:29:47:ec:c5:c3:88:c8:c9:e7:d7:c6:1a:0d:
+ b8:f5:c5:02:57:25:01:cc:d5:8c:37:46:58:c6:71:
+ 30:ee:63:38:99:84:5e:9e:3c:af:40:d4:f0:f2:12:
+ 44:6e:2f:4d:cd:f9:da:4d:0e:1f:a6:fe:35:c3:9d:
+ 40:08:82:5e:6f:7d:4d:09:16:7d:a1:78:d6:9f:9f:
+ 44:d6:b1:ad:e7:50:25:1a:f3:4e:16:92:4a:17:5e:
+ 0b:e1:c8:9f:62:22:c4:e2:01:96:63:ed:37:a2:e5:
+ 70:b9:dc:c8:8e:c4:fe:00:21:f5:b9:48:c0:43:55:
+ 4a:d8:0c:9d:ce:d6:60:30:bb:81:31:c8:e9:0e:aa:
+ 1c:18:3d:e4:10:47:42:17:c0:4d:fb:f5:d9:c2:e4:
+ 07:33:f7:15:94:63:6d:11:ad:4f:d4:1d:11:41:c1:
+ e2:dd
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
- 94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+ C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
X509v3 Authority Key Identifier:
- keyid:94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+ keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
X509v3 Basic Constraints:
CA:TRUE
- Signature Algorithm: sha256WithRSAEncryption
- 32:97:4c:af:bf:ca:e0:10:66:b7:cc:8b:0d:05:d1:d2:ca:b8:
- 0c:c2:78:57:1f:f6:55:9c:74:fc:bd:31:58:05:18:bc:6d:b5:
- 79:9a:22:8c:1f:da:33:ea:ef:db:e3:cb:46:bc:36:91:8b:d8:
- 36:8d:06:40:c2:e9:fe:79:1b:4a:c5:70:74:6d:9d:92:2c:90:
- be:3c:a7:88:03:e4:b7:ef:f4:b0:00:34:ec:8f:d1:c3:23:2b:
- ef:bc:ff:ab:a2:0e:bc:ba:11:a5:8e:44:80:fa:d6:f4:26:66:
- 84:64:2c:e3:23:62:0c:e2:ba:01:ab:5f:24:d6:9d:7e:9c:7b:
- f4:5d:0e:ba:64:35:6e:a5:fa:98:0c:57:f3:72:e8:3e:2e:ce:
- b3:f9:e3:fa:ee:aa:79:f9:06:01:19:b2:b3:28:ff:f4:d6:bb:
- 17:bb:a6:a0:e0:45:23:f3:61:40:31:5c:a3:ee:88:1c:00:31:
- 54:96:f9:71:37:b5:7f:66:6a:af:04:94:09:39:99:b3:88:86:
- 9e:bb:d6:36:24:24:f4:37:2c:a6:6c:0b:35:2e:bb:40:af:a7:
- 64:8a:7f:f2:74:e3:94:0c:32:bd:31:3d:d9:79:68:0f:1e:4b:
- 17:c0:4e:df:85:3c:f0:84:df:58:f1:d2:4d:2f:ad:ff:1b:d7:
- c8:9b:fe:dc
+ Signature Algorithm: sha1WithRSAEncryption
+ 40:6f:6a:54:f3:29:30:48:46:bd:da:46:71:64:52:14:a7:c2:
+ 34:b7:5e:1e:42:3d:e7:47:92:cd:87:e7:9d:5d:1a:82:77:82:
+ 62:32:d4:9d:b6:44:11:dc:88:78:38:a5:d3:1f:1e:be:c2:d6:
+ 14:b0:58:35:cd:66:22:43:97:ba:bb:e3:44:4f:9d:75:14:9f:
+ 6f:37:d3:50:07:09:36:bc:58:92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GA1UECgwH
+TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAfkHwrwuoB
+k87gxXLoHAa9Y0620sYAMhMnQp7JPJEzTRWQZ32d2L6bEuL2G0aBSosQxbgUU6tq
+LMN/ZodsDhhRTpyTem2h1AZHWGGmBCEsvXR65GhF/pH++6YpR+zFw4jIyefXxhoN
+uPXFAlclAczVjDdGWMZxMO5jOJmEXp48r0DU8PISRG4vTc352k0OH6b+NcOdQAiC
+Xm99TQkWfaF41p+fRNaxredQJRrzThaSShdeC+HIn2IixOIBlmPtN6LlcLncyI7E
+/gAh9blIwENVStgMnc7WYDC7gTHI6Q6qHBg95BBHQhfATfv12cLkBzP3FZRjbRGt
+T9QdEUHB4t0CAwEAAaNQME4wHQYDVR0OBBYEFMcsAZUa9T7NBKYkNTUE2acWASp5
+MB8GA1UdIwQYMBaAFMcsAZUa9T7NBKYkNTUE2acWASp5MAwGA1UdEwQFMAMBAf8w
+DQYJKoZIhvcNAQEFBQADggEBAEBvalTzKTBIRr3aRnFkUhSnwjS3Xh5CPedHks2H
+551dGoJ3gmIy1J22RBHciHg4pdMfHr7C1hSwWDXNZiJDl7q740RPnXUUn28301AH
+CTa8WJLo/sCouilVZeJvj6ulHU9WN97HtDkgTKhM21ZREn7nf4OdxMdyj2+D8K/j
+NxxA/l44Ji8FRqcMpYF51pyc11brlv7Hro5PXkpsOvpovmVgotM/B3ZFs5U+Ee86
+Dm9zR0yQ3Qs2tCLfYo1Y0qY0W/AGXc2/Uvrum0/oeRhuHG5flhBtLwIb3b8UyTI8
+g6VuVlZ4nc6EUKTfzLWpsewJB3QCJ3qd0papgJWa8ozp75k=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem
index f60a0884178..cbe8bc2c677 100644
--- a/mysql-test/std_data/client-cert.pem
+++ b/mysql-test/std_data/client-cert.pem
@@ -1,35 +1,26 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 16263805969935345173 (0xe1b4a55c3ddfa615)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Serial Number: 3 (0x3)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Dec 5 04:49:23 2014 GMT
- Not After : Dec 1 04:49:23 2029 GMT
- Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=Client
+ Not Before: Apr 25 14:55:16 2015 GMT
+ Not After : Apr 20 14:55:16 2035 GMT
+ Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
+ Public-Key: (1024 bit)
Modulus:
- 00:c8:d1:a1:fe:a4:8c:f3:1b:17:71:1b:74:35:11:
- e0:0e:6c:40:0a:fb:c0:f7:f0:eb:bb:c9:1d:a1:c7:
- d7:b0:8a:f6:f1:cf:fa:6b:d0:79:64:eb:bb:69:a5:
- 0d:80:06:df:52:14:d2:85:32:cf:bf:ce:2a:47:28:
- 5b:cd:0b:28:ab:bb:07:33:d5:8b:d3:b4:72:c4:a6:
- b5:cc:37:b9:03:a8:78:56:25:58:1f:17:30:7c:d1:
- 0a:bb:ec:3c:a3:03:90:97:99:92:49:ae:b3:57:96:
- 5c:1a:e9:e8:02:23:ae:c8:c9:05:50:63:e5:77:a1:
- 9a:73:06:74:0e:46:50:28:d8:c9:4f:c4:1c:37:b8:
- 52:18:0b:af:19:2b:d4:e5:66:74:a4:f3:f0:da:09:
- 30:f7:bc:0c:c9:9b:ce:57:06:04:27:e5:a1:2f:2b:
- a0:ba:b7:99:69:9d:46:fc:21:b6:45:81:9d:b2:3d:
- 2f:76:15:78:b5:33:62:ac:1e:6b:66:dd:27:61:0a:
- 47:02:20:2b:57:bb:32:20:dd:06:4c:76:a4:9b:72:
- 42:4c:9c:2c:76:72:12:1f:4b:df:1e:11:1f:a9:06:
- 54:dc:88:12:b0:49:d5:40:83:ef:7e:48:43:86:7a:
- 37:a6:c1:d7:9b:fe:08:34:98:e0:54:3c:30:4f:79:
- 15:29
+ 00:ce:a0:3d:3c:a4:bb:4f:a1:4f:91:0d:05:ac:5b:
+ 8a:15:7f:d7:aa:0c:a3:a7:9f:b2:c7:26:9d:65:28:
+ b1:84:d3:a0:ef:9e:b1:45:0f:33:df:98:6e:71:ff:
+ 2b:66:9c:9c:c1:25:13:27:42:b6:20:46:e7:e7:47:
+ a1:88:47:c2:9e:e2:45:25:99:9f:f9:28:1a:9a:13:
+ 67:5d:3e:b3:b8:fe:40:25:ac:26:49:46:2c:03:43:
+ 83:67:d8:0f:41:ae:2e:f4:d8:71:60:3c:8e:e7:91:
+ d0:bb:2c:ca:12:da:71:1a:7b:e3:fa:8c:8f:c3:bb:
+ 62:55:89:b3:bf:85:45:01:61
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -37,46 +28,42 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 26:0C:90:BC:97:12:9E:43:BB:5E:FE:EB:A9:66:B3:C3:EE:B2:18:CB
+ 5A:73:74:8E:14:29:C3:FB:B4:19:0F:97:8F:AA:6F:E1:E1:A8:F7:5B
X509v3 Authority Key Identifier:
- keyid:94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+ keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
- Signature Algorithm: sha256WithRSAEncryption
- 3e:3c:1f:6c:5b:83:d1:71:15:f5:45:52:fc:7f:67:bc:af:c5:
- 92:f5:74:78:13:43:3c:fe:b5:61:bf:00:47:43:45:a0:b9:dd:
- a1:10:0c:29:69:2a:6f:7d:67:3d:1e:09:b5:15:74:bf:73:11:
- e6:e9:09:b6:6b:b5:cc:1e:06:fd:bd:3a:11:d3:44:bd:ca:7a:
- a1:f1:09:43:fc:bf:83:89:3a:b1:18:40:f3:cf:6d:12:ef:6e:
- 0c:b7:a4:99:03:8a:4f:0c:3c:2c:23:78:35:2a:99:ea:de:9c:
- 1b:e8:8d:19:fb:44:80:13:89:81:c5:05:4b:a7:66:6b:c0:31:
- 41:f0:6c:60:aa:ec:d3:4c:ff:c1:3b:d5:bb:0d:42:7d:37:5e:
- 80:e7:9c:7e:60:90:0f:a4:4e:70:20:9c:b1:e4:1b:70:65:b0:
- ef:bb:41:16:ed:ad:46:ce:34:d3:02:3d:dd:e2:50:fa:3c:5d:
- f0:e2:71:f8:9a:ef:a3:32:25:c5:8e:64:f4:46:e1:f4:c0:69:
- d2:34:56:8d:d9:c2:6e:b6:55:3b:6a:4d:b6:d2:84:ab:85:7b:
- cb:fd:b4:73:40:ba:5d:49:e2:0d:39:77:17:01:49:bb:72:8b:
- 3a:c9:b1:e2:cd:13:d2:9c:ce:7d:6c:a8:f0:32:c9:a4:af:56:
- 6f:8a:e6:88
+ Signature Algorithm: sha1WithRSAEncryption
+ 32:42:4b:36:44:a5:6c:fb:70:d8:08:2b:cb:16:34:15:db:39:
+ 60:7b:7e:b4:4a:bc:fb:e5:16:04:97:0d:eb:f5:68:95:da:2f:
+ 23:57:4c:c9:29:2b:d1:1b:1b:9f:bd:f4:79:75:df:62:7f:63:
+ b4:84:7a:95:5c:c4:ee:f3:77:16:e4:0b:8a:5e:c9:64:bd:7c:
+ 04:50:ac:ff:9a:41:6b:b1:6a:9f:cd:45:10:72:83:10:8a:26:
+ 1d:7f:6c:84:34:5a:41:79:72:91:ee:87:5d:1d:3a:55:ff:91:
+ 7e:52:85:ff:42:41:eb:76:56:23:e5:bc:bc:79:b1:aa:4e:4c:
+ bf:7b:df:63:8b:1a:3c:4b:01:72:89:35:bb:0d:92:97:16:6e:
+ ae:50:cb:89:ee:c6:7a:d0:d3:32:22:0f:19:33:1e:ee:ff:41:
+ a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0GuLvTYcWA8jueR0LssyhLacRp74/qM
+j8O7YlWJs7+FRQFhAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
+HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRac3SOFCnD
++7QZD5ePqm/h4aj3WzAfBgNVHSMEGDAWgBTHLAGVGvU+zQSmJDU1BNmnFgEqeTAN
+BgkqhkiG9w0BAQUFAAOCAQEAMkJLNkSlbPtw2AgryxY0Fds5YHt+tEq8++UWBJcN
+6/VoldovI1dMySkr0Rsbn730eXXfYn9jtIR6lVzE7vN3FuQLil7JZL18BFCs/5pB
+a7Fqn81FEHKDEIomHX9shDRaQXlyke6HXR06Vf+RflKF/0JB63ZWI+W8vHmxqk5M
+v3vfY4saPEsBcok1uw2SlxZurlDLie7GetDTMiIPGTMe7v9BpaElxUzOj5hMtSwf
+7MzxIeI6/31qh/6J/SwgPvubuMD5CZnORWOCCRy7edioQCFGx64+3YmdVkZK9O19
+W6Yephsm+ewmtFE6h7ZQE4QzIhqKIMVEZLi73jLsa1jbFw==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem
index e0aae4f2c4a..5037c6e2728 100644
--- a/mysql-test/std_data/client-key.pem
+++ b/mysql-test/std_data/client-key.pem
@@ -1,27 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAyNGh/qSM8xsXcRt0NRHgDmxACvvA9/Dru8kdocfXsIr28c/6
-a9B5ZOu7aaUNgAbfUhTShTLPv84qRyhbzQsoq7sHM9WL07RyxKa1zDe5A6h4ViVY
-HxcwfNEKu+w8owOQl5mSSa6zV5ZcGunoAiOuyMkFUGPld6GacwZ0DkZQKNjJT8Qc
-N7hSGAuvGSvU5WZ0pPPw2gkw97wMyZvOVwYEJ+WhLyugureZaZ1G/CG2RYGdsj0v
-dhV4tTNirB5rZt0nYQpHAiArV7syIN0GTHakm3J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IkNu3pfEzmvQnmRlTEtXGjNn+i8=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/mysql_upgrade/event.MYD b/mysql-test/std_data/mysql_upgrade/event.MYD
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/event.MYD
diff --git a/mysql-test/std_data/mysql_upgrade/event.MYI b/mysql-test/std_data/mysql_upgrade/event.MYI
new file mode 100644
index 00000000000..d5c16c3892f
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/event.MYI
Binary files differ
diff --git a/mysql-test/std_data/mysql_upgrade/event.frm b/mysql-test/std_data/mysql_upgrade/event.frm
new file mode 100644
index 00000000000..fd4ff199b56
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/event.frm
Binary files differ
diff --git a/mysql-test/std_data/mysql_upgrade/v1.frm b/mysql-test/std_data/mysql_upgrade/v1.frm
new file mode 100644
index 00000000000..be197fd76a8
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/v1.frm
@@ -0,0 +1,15 @@
+TYPE=VIEW
+query=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+md5=5e6eaf216e7b016fcedfd4e1113517af
+updatable=0
+algorithm=1
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2014-12-11 15:26:20
+create-version=1
+source=select a from t1
+client_cs_name=utf8
+connection_cl_name=utf8_general_ci
+view_body_utf8=select `test`.`t1`.`a` AS `a` from `test`.`t1`
diff --git a/mysql-test/std_data/mysql_upgrade/v1badcheck.frm b/mysql-test/std_data/mysql_upgrade/v1badcheck.frm
new file mode 100644
index 00000000000..a1e3bfe5cbc
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/v1badcheck.frm
@@ -0,0 +1,15 @@
+TYPE=VIEW
+query=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+md5=00000000000000000000000000000000
+updatable=0
+algorithm=1
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2014-12-11 15:26:20
+create-version=1
+source=select a from t1
+client_cs_name=utf8
+connection_cl_name=utf8_general_ci
+view_body_utf8=select `test`.`t1`.`a` AS `a` from `test`.`t1`
diff --git a/mysql-test/std_data/mysql_upgrade/v2.frm b/mysql-test/std_data/mysql_upgrade/v2.frm
new file mode 100644
index 00000000000..42cc06d9fba
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/v2.frm
@@ -0,0 +1,15 @@
+TYPE=VIEW
+query=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+md5=5e6eaf216e7b016fcedfd4e1113517af
+updatable=1
+algorithm=2
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2014-12-11 15:26:29
+create-version=1
+source=select a from t1
+client_cs_name=utf8
+connection_cl_name=utf8_general_ci
+view_body_utf8=select `test`.`t1`.`a` AS `a` from `test`.`t1`
diff --git a/mysql-test/std_data/mysql_upgrade/v3.frm b/mysql-test/std_data/mysql_upgrade/v3.frm
new file mode 100644
index 00000000000..cca46ae9170
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/v3.frm
@@ -0,0 +1,15 @@
+TYPE=VIEW
+query=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+md5=5e6eaf216e7b016fcedfd4e1113517af
+updatable=0
+algorithm=0
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2014-12-11 15:26:20
+create-version=1
+source=select a from t1
+client_cs_name=utf8
+connection_cl_name=utf8_general_ci
+view_body_utf8=select `test`.`t1`.`a` AS `a` from `test`.`t1`
diff --git a/mysql-test/std_data/mysql_upgrade/v4.frm b/mysql-test/std_data/mysql_upgrade/v4.frm
new file mode 100644
index 00000000000..9d0cc48447d
--- /dev/null
+++ b/mysql-test/std_data/mysql_upgrade/v4.frm
@@ -0,0 +1,16 @@
+TYPE=VIEW
+query=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+md5=5e6eaf216e7b016fcedfd4e1113517a0
+updatable=1
+algorithm=0
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2015-02-08 19:21:14
+create-version=1
+source=select a from t1
+client_cs_name=latin1
+connection_cl_name=latin1_swedish_ci
+view_body_utf8=select `test`.`t1`.`a` AS `a` from `test`.`t1`
+mariadb-version=50542
diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem
index f6acc62ff5f..1cc1519ada9 100644
--- a/mysql-test/std_data/server-cert.pem
+++ b/mysql-test/std_data/server-cert.pem
@@ -1,35 +1,26 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 16263805969935345172 (0xe1b4a55c3ddfa614)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Serial Number: 1 (0x1)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Dec 5 04:48:40 2014 GMT
- Not After : Dec 1 04:48:40 2029 GMT
- Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=localhost
+ Not Before: Apr 25 14:55:05 2015 GMT
+ Not After : Apr 20 14:55:05 2035 GMT
+ Subject: C=FI, ST=state or province within country, in other certificates in this file it is the same as L, L=location, usually an address but often ambiguously used, O=organization name, typically a company name, OU=organizational unit name, a division name within an organization, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
+ Public-Key: (1024 bit)
Modulus:
- 00:e9:20:e7:05:51:07:3a:48:b9:e2:62:a2:24:45:
- 1f:f1:54:34:22:5c:62:86:9b:01:e8:c2:45:90:00:
- 8d:4e:e4:a2:ea:e9:d7:b5:95:25:ce:18:ac:1a:4f:
- b3:e6:30:46:af:20:13:40:84:df:21:dc:df:09:e5:
- a0:7f:81:12:6e:1e:84:58:5c:a1:11:db:aa:b6:04:
- e0:fc:1e:0c:11:2e:f3:30:62:1a:f9:ee:df:fe:a3:
- d3:d6:83:6e:ad:e8:8d:98:89:b1:69:63:b8:72:f4:
- 5a:e6:22:5e:73:64:95:ef:56:92:92:0b:e1:93:a5:
- d7:4c:41:47:e7:31:ed:09:68:b3:c5:6e:c1:1b:01:
- 39:bb:f1:8f:bf:ba:f4:02:e2:e5:e5:9e:b7:d6:9a:
- b2:94:76:9b:48:d8:27:18:0e:9f:30:98:f5:9a:3e:
- 23:e6:3b:4a:48:ee:a5:26:e8:80:94:37:e4:4a:ba:
- ff:9f:42:b9:32:dd:7a:9d:63:11:a8:25:99:b1:1f:
- 86:e5:7c:b1:31:e3:12:11:0c:eb:f6:1d:02:4b:1d:
- 34:cb:74:1d:7f:2f:40:c0:81:e2:04:d4:8e:ea:96:
- f8:22:35:8e:ab:b6:99:33:36:ef:b5:83:11:88:6d:
- 06:0f:76:4d:bf:db:a8:df:6c:3c:91:e2:ba:73:a0:
- 73:45
+ 00:aa:e6:54:bd:dd:52:1e:16:f7:24:52:37:58:2b:
+ a7:af:49:e1:cd:75:2a:18:52:e1:48:f0:59:82:c0:
+ 7a:d9:66:b3:97:04:b3:77:f4:39:fd:d1:c0:1a:c5:
+ a6:ab:44:84:d2:17:39:53:25:63:9b:c3:24:78:51:
+ 5c:77:6b:df:b4:82:1d:e4:43:f4:67:0a:5d:89:a2:
+ fe:b0:ea:64:3a:1d:9d:49:78:c8:7f:79:a5:cd:45:
+ 4b:0c:ad:ae:4f:e2:d4:5d:ec:e8:73:06:ed:98:92:
+ 85:49:b2:9c:31:3b:44:38:5f:bb:5a:f1:68:84:a9:
+ c3:5b:31:39:d4:47:98:38:55
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -37,46 +28,47 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- E4:31:D8:D5:06:EA:C6:B3:A2:F6:01:39:8F:58:08:36:2C:7B:3F:DB
+ E5:72:8F:57:72:D6:75:63:28:7F:E2:BF:00:B7:1D:B8:AA:FE:94:59
X509v3 Authority Key Identifier:
- keyid:94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+ keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
- Signature Algorithm: sha256WithRSAEncryption
- 46:ef:cd:bf:c1:ef:36:a9:cb:99:b5:be:e2:a7:ba:69:0d:f5:
- 9b:63:39:78:32:35:01:a8:b9:f1:70:0e:b5:d1:8f:94:2e:7a:
- cb:65:d4:d0:b4:ad:52:b8:51:5f:64:2e:a8:08:a5:71:fe:c2:
- 35:8a:0d:28:26:e5:be:ca:d7:f4:79:54:e1:27:8f:87:92:d3:
- 04:72:1b:cc:c4:7f:8b:26:09:92:2d:c8:6f:27:da:97:31:80:
- 0f:83:84:9c:e0:a4:88:c9:e3:8f:35:e7:de:bd:31:e2:fa:52:
- 83:de:ee:5c:60:6e:8f:a5:8d:5e:53:41:18:42:f3:03:0b:05:
- 0b:59:09:42:2e:1b:0b:29:b3:fe:11:3b:d5:ad:3f:4d:24:e8:
- c0:da:4c:0d:93:94:ec:cd:18:0f:66:cd:03:d3:ee:a0:b2:7f:
- 64:d7:39:66:19:72:9f:64:43:38:b4:b6:b3:ea:6f:39:e7:09:
- 98:90:9f:6c:f5:e8:b3:2e:09:8d:7b:76:65:30:f4:c4:9b:8e:
- 10:4e:9b:8c:93:63:44:9d:2b:8a:f3:f0:cf:f8:7b:65:95:38:
- fb:b4:92:e8:6c:11:03:a2:a2:2f:ea:e0:22:b7:cd:cf:0d:a5:
- 91:23:14:47:0c:34:8f:f1:11:cc:e8:1e:37:53:ec:a1:01:81:
- 20:c0:2c:f5
+ Signature Algorithm: sha1WithRSAEncryption
+ 88:44:46:fa:7d:16:ae:9d:16:5b:95:26:03:3c:71:f4:29:3d:
+ df:cb:f4:14:20:9f:87:24:b4:29:17:2d:7a:12:48:76:ac:00:
+ 44:26:ba:93:83:ad:58:7e:b7:77:e4:b0:32:0d:e5:dd:fb:cc:
+ 0e:9b:88:e0:24:82:e4:41:43:47:5a:4e:d3:b4:5b:47:4b:57:
+ eb:67:02:63:bb:dd:05:12:f5:95:01:0b:89:81:ca:c2:91:14:
+ 21:9a:9e:c9:84:91:46:35:0e:26:44:1e:91:88:74:4f:fe:d3:
+ 19:9e:65:fa:46:e2:46:04:ad:91:79:4c:70:1b:68:b2:49:e9:
+ 6c:f4:58:44:3b:43:15:85:56:64:1b:84:74:49:95:9f:cd:93:
+ 9d:8e:69:ab:ca:46:97:b6:74:e9:2a:83:85:62:cd:e5:be:c3:
+ 52:bd:cf:90:cc:60:27:76:ee:1b:3c:da:69:73:e2:11:68:14:
+ dc:7d:9f:b8:6f:20:a2:0c:b7:8e:33:40:89:d1:a3:89:e2:60:
+ 6a:ec:b5:9f:e8:c5:55:10:40:b2:95:5e:54:8a:10:8e:d5:90:
+ d9:98:86:d8:f9:b6:01:41:8c:d7:0d:0e:86:0e:50:6d:a2:64:
+ 00:2a:91:5e:35:64:15:e3:86:34:3a:39:eb:0f:4f:56:c7:15:
+ 4c:74:2e:91
-----BEGIN CERTIFICATE-----
-MIIDyzCCArOgAwIBAgIJAOG0pVw936YUMA0GCSqGSIb3DQEBCwUAMGMxCzAJBgNV
-BAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hvbG0xEjAQBgNVBAcMCVN0b2NraG9sbTEP
-MA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNRTDELMAkGA1UEAwwCQ0EwHhcN
-MTQxMjA1MDQ0ODQwWhcNMjkxMjAxMDQ0ODQwWjBqMQswCQYDVQQGEwJTRTESMBAG
-A1UECAwJU3RvY2tob2xtMRIwEAYDVQQHDAlTdG9ja2hvbG0xDzANBgNVBAoMBk9y
-YWNsZTEOMAwGA1UECwwFTXlTUUwxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAOkg5wVRBzpIueJ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+kbiRgStkXlMcBto
+sknpbPRYRDtDFYVWZBuEdEmVn82TnY5pq8pGl7Z06SqDhWLN5b7DUr3PkMxgJ3bu
+GzzaaXPiEWgU3H2fuG8gogy3jjNAidGjieJgauy1n+jFVRBAspVeVIoQjtWQ2ZiG
+2Pm2AUGM1w0Ohg5QbaJkACqRXjVkFeOGNDo56w9PVscVTHQukQ==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem
index 89aead41877..3125ae88a8a 100644
--- a/mysql-test/std_data/server-key.pem
+++ b/mysql-test/std_data/server-key.pem
@@ -1,27 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEA6SDnBVEHOki54mKiJEUf8VQ0IlxihpsB6MJFkACNTuSi6unX
-tZUlzhisGk+z5jBGryATQITfIdzfCeWgf4ESbh6EWFyhEduqtgTg/B4MES7zMGIa
-+e7f/qPT1oNureiNmImxaWO4cvRa5iJec2SV71aSkgvhk6XXTEFH5zHtCWizxW7B
-GwE5u/GPv7r0AuLl5Z631pqylHabSNgnGA6fMJj1mj4j5jtKSO6lJuiAlDfkSrr/
-n0K5Mt16nWMRqCWZsR+G5XyxMeMSEQzr9h0CSx00y3Qdfy9AwIHiBNSO6pb4IjWO
-q7aZMzbvtYMRiG0GD3ZNv9uo32w8keK6c6BzRQIDAQABAoIBAQDUbdzVJV6Wp4pq
-VUI2Fp7iwr22ycQlr71voQbODxK0XvZtZKPgnIWUZTr9xr7A9CCUl3+zfN/t9Vtv
-o0Q6qxxmJ3ylH9LNeQL3VT7FvYN1bPjAj8TRFfAaEqKHh8AkzBGqe12kEPAUH8Fs
-jsjOEUvmiVaJqjXk2mty2tFwRDggJwCrN5bXkhkzwhDcMfH2Wgc4c4XkyUrciJQU
-ua4d0L354B3UmRYtrzwPr6WHLXCGPGhyWvXYpDjjdUGMVf2YcBSQdABF+mhCEb2b
-NP4dYUqKHjKn6p4B1/qfJtf0c9Lz229nz0WTzan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aXNRUsMra5P4tRd7OhzBu2YkoVJspwxO0Q4X7ta8WiEqcNbMTnUR5g4VQIDAQAB
+AoGAblQWXyBzdBN1Z5BgRF6ieYpj6OT70QoogJMR5lRmutUPma4iQo17pr3znBT/
+nU+1w3/UtTXNEXCwqbA01q/gkbP2PaW/sbHLVow1B7u/o42WW6I3Btnl3ClnCNjD
+Mo7/Gj027hhp7mC61r81JeJVh8fJUgxdNqoH7AkDnA+FJAECQQDjIl3k6W2P+bHb
+bp+8eyY7ITQbppZh+3hFJKRL7DZKFYL5J6gejiBURnG9DKnhoSP2nqzqdrRhWZhB
+ZHr+ciEBAkEAwJ5rMpFoIwRzgPD4Q4iSqHcBbFcJE7dK1XLq6MYUVNQGfDU8pBvI
+EocXphpsJ8CbR35dGDY19rmO2LjG3RBDVQJAetRN9Inrjw2YCjNzvKjYTuew1zcq
+YghszO94zfoKjdu+PWEdwJBZmVmTDoo3oGXVHfxHRHA3MeISvWJKRSmRAQJAHL9H
+9msXJKrEZkkQdFvMr5HbR4UR2LxxUbvt7UGqxSJDuYPkggWXbZR15hdpbuFjC1+D
+m1pz4Ve+RwAExfdoZQJBANfmuWtlLU+SMpDG4zOyC7u4dz+TtnEOfDUECFNZtqvU
+MWz98MIXAjiBDYU1Z0BrA7b0/FVsPR3t6JZFQWWI2y8=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem
index dfae47b05d2..7e41195cea4 100644
--- a/mysql-test/std_data/server8k-cert.pem
+++ b/mysql-test/std_data/server8k-cert.pem
@@ -1,86 +1,86 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 10754692786786449447 (0x9540581bd8dcb827)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Serial Number: 2 (0x2)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Dec 5 04:50:48 2014 GMT
- Not After : Dec 1 04:50:48 2029 GMT
- Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=Server
+ Not Before: Apr 25 14:55:16 2015 GMT
+ Not After : Apr 20 14:55:16 2035 GMT
+ Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server8k
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (8192 bit)
Modulus:
- 00:d8:8f:9d:66:66:9c:12:ca:0a:ad:9e:9f:05:66:
- 6c:6c:8a:db:19:9f:a2:d0:fa:38:dc:de:c5:a6:94:
- 60:0d:4b:72:c9:85:e2:ff:27:c8:d4:ce:b1:29:66:
- 31:e7:2b:4e:08:b3:a2:71:cf:1e:36:7c:8e:4d:08:
- 6e:fd:7a:ea:c1:0d:5c:97:09:66:fa:ed:0b:36:64:
- 8f:cc:39:35:a9:43:6c:a9:17:48:0f:2e:0a:4b:d3:
- 94:bb:b0:5b:43:f1:4e:f7:e5:30:e1:ae:a2:a8:5d:
- 3c:db:39:df:d6:4b:70:a6:c9:68:c3:f3:9d:19:d7:
- 2f:2a:38:31:11:ab:f1:60:66:c3:38:4f:d9:6f:b5:
- 49:df:ce:14:b5:fa:c8:95:04:50:69:90:9d:26:c2:
- e9:07:69:7b:a2:d8:91:e7:cd:de:c4:ed:9c:e4:c8:
- 8c:e3:a0:cd:dd:2b:37:21:8f:ee:54:38:91:2b:2b:
- 01:86:90:f0:2e:9a:06:8a:e1:f2:a2:3f:d1:d4:21:
- 9f:b0:81:eb:d0:e9:d3:e9:a9:28:6e:c2:06:4b:94:
- 6e:96:70:f5:31:33:dd:97:2f:cc:5d:80:c5:74:ce:
- c0:3d:b2:6a:81:b7:ce:65:4f:6a:49:3e:c9:5d:00:
- 3c:06:4a:57:c9:a7:f9:bb:46:50:df:64:dc:13:1f:
- 22:ad:21:0b:aa:4b:5d:94:60:9f:20:ff:28:aa:56:
- 5f:f6:cd:23:34:fe:44:a2:d6:80:bd:a9:67:00:d6:
- a1:82:82:9f:c9:e8:0c:97:26:1e:a9:b1:e2:ee:01:
- ef:9d:c6:82:fc:72:33:02:40:35:cc:ae:51:23:f4:
- f8:92:29:d3:2f:5c:1f:03:c6:81:7d:fb:4f:e9:de:
- ed:68:3c:a1:be:7c:fa:11:96:2b:5a:10:c5:c5:cb:
- 2e:7a:54:4c:7b:12:b8:07:01:d9:b5:38:0f:a6:43:
- 70:28:81:8d:d7:95:ad:d6:e8:88:b4:19:62:05:7b:
- 75:c0:2d:24:72:1c:4d:04:a3:f7:1d:6b:8b:fa:16:
- a3:5a:6c:51:ba:5c:62:fa:3e:82:7f:4e:10:db:d0:
- 52:d4:81:df:0e:5b:33:7e:20:77:1d:51:ca:4e:13:
- ee:cd:72:36:28:b4:31:88:3d:61:0f:1a:80:19:f6:
- 7d:71:5d:21:1f:dd:0b:d9:73:88:a9:72:4b:8d:a3:
- d6:f1:4f:5d:01:6e:9e:c2:28:97:80:de:5b:2d:ac:
- a3:c9:24:db:e9:0f:2b:36:ee:a7:f2:94:c1:41:7a:
- 70:9f:fd:d0:31:a9:de:55:38:65:89:20:f4:02:f1:
- 83:73:40:77:db:35:d2:66:ff:26:5f:f4:d2:e6:f9:
- ba:fc:6a:66:b1:02:24:04:a3:32:4b:21:85:83:b4:
- 6a:97:3c:25:7f:65:cc:a6:dd:cc:ac:e5:22:09:58:
- dc:a1:0d:7d:b4:ac:98:98:81:1d:a7:83:d4:3a:e4:
- 39:a7:04:6a:b6:b7:5d:a8:fe:0e:47:08:1d:95:61:
- eb:a8:97:53:91:1e:ca:1f:3f:19:5a:01:73:da:33:
- 32:d7:33:ca:39:1e:00:37:6b:f8:18:47:30:3a:2e:
- 99:39:d0:d0:49:6d:87:c1:98:59:d0:21:ca:12:6d:
- 89:33:0f:f2:52:6e:d6:c5:78:dd:15:b6:11:d6:5e:
- 72:e8:c7:12:00:c3:8d:57:34:e5:d8:6d:a2:e8:47:
- 79:83:8c:49:17:3b:75:24:0d:de:e1:3b:dd:bc:b7:
- df:89:a6:31:e6:49:37:80:f8:8f:86:e3:42:f4:2e:
- dc:de:58:45:c4:41:a9:2d:a6:5d:f0:7d:81:3d:54:
- f4:8a:a3:5f:18:7c:02:c9:7f:1c:f5:9f:dd:0a:29:
- 49:40:92:24:b3:b7:65:37:91:9a:a8:00:c4:4e:7f:
- 7e:f7:97:de:24:2a:d7:3b:f2:a2:63:ec:38:b7:1f:
- 9e:b5:72:99:bd:b1:c0:41:6a:57:97:e2:fb:11:32:
- ba:a3:5d:82:48:c5:0a:cc:2c:f5:21:7a:f1:99:56:
- 1b:54:9d:c7:64:50:62:80:94:50:5a:40:32:61:f3:
- 2c:f8:09:dc:f0:6d:2b:60:29:c2:86:70:5a:57:12:
- 7d:09:73:ca:41:6d:22:61:18:1a:48:cb:80:95:be:
- 08:e8:15:99:de:36:3a:bf:09:67:35:e8:53:d9:40:
- 1b:27:e5:14:32:09:73:e0:f6:a9:19:ee:81:90:dc:
- b7:9d:b6:91:51:33:1e:1f:22:e0:bd:df:a8:d1:33:
- a7:ab:9b:9c:27:7a:3c:ef:aa:9e:4d:f8:a8:97:63:
- 24:20:c8:36:ab:05:8a:c0:80:9b:64:0c:1f:ec:4f:
- de:ec:f0:9c:9c:54:db:02:ab:12:aa:ab:58:a3:49:
- 25:bf:6a:0a:04:7f:2f:1d:41:11:23:4e:e2:83:51:
- e3:f5:12:95:22:72:13:f4:be:6f:e2:00:29:4f:fe:
- 9b:ae:b9:e2:7d:72:d3:1b:e8:12:3b:6d:b6:d2:62:
- a4:91:31:46:e7:16:7f:9d:8d:74:5e:97:51:d1:cb:
- 82:57:bb:bd:46:e4:9c:c5:bd:08:8b:68:20:f8:5e:
- d6:aa:ed:6e:4d:ba:a4:29:fd:ac:5c:2f:25:14:d3:
- 19:63:0c:01:75:6c:87:a5:0b:29:09:7f:13:7f:00:
- d4:63:72:e2:a0:39:88:80:68:2c:3f:49:b1:9b:94:
- 77:63:08:05:55
+ 00:e6:24:79:3d:3a:58:6a:12:1c:13:6a:43:d9:c1:
+ 65:ec:55:c1:4f:7d:fc:f2:a6:56:a5:ab:c5:48:2c:
+ ce:9c:9d:47:3d:94:93:d5:3b:a3:d0:09:a8:8f:e0:
+ 4b:36:a0:95:ae:2d:ad:7f:a2:a3:c5:f6:87:80:4c:
+ 6a:26:15:47:73:20:47:e1:f8:5f:49:b7:13:20:f7:
+ 32:9f:db:7d:62:41:1b:60:26:7b:41:26:16:0c:92:
+ 22:ef:b4:2e:b3:db:90:e9:09:ca:fe:1a:1b:e4:f3:
+ 78:69:7d:ca:6e:c5:39:4b:46:72:09:51:08:40:78:
+ 8e:04:2a:23:cb:d5:50:cf:96:dd:56:43:10:1b:d2:
+ 71:28:8f:10:a9:e4:44:1c:39:8a:06:a7:fa:37:48:
+ bd:5a:dd:37:7f:7a:00:cf:84:8a:48:a3:75:a5:67:
+ fb:7b:47:2d:26:00:2e:65:ed:63:4e:b7:94:18:3f:
+ 5a:08:74:54:e5:af:dd:86:1b:34:9b:4c:de:fe:d8:
+ 69:3d:72:90:c7:5c:83:82:78:ea:ab:06:d4:f1:06:
+ 20:ad:fd:24:bb:e9:94:e0:c6:32:f5:df:af:b4:14:
+ 4d:9c:ce:0d:62:3a:3a:2b:11:f9:9e:d7:8e:63:2b:
+ 57:35:10:7e:d5:44:64:8c:61:9b:4e:f8:e8:a5:fb:
+ 47:bb:85:33:ea:c6:e0:3d:e2:2c:e8:41:e1:15:e2:
+ a7:45:23:df:d0:f9:93:01:97:89:95:77:4d:d5:d4:
+ c1:db:61:ca:e2:84:36:9c:01:9b:33:ec:53:83:2f:
+ dd:d7:d8:20:c0:6b:4a:73:92:d2:6c:22:a6:a2:68:
+ 46:8b:aa:3f:aa:fe:47:b7:98:70:fd:ba:59:88:af:
+ 9f:0d:d7:cb:a0:42:44:f9:f0:54:39:c1:cd:fb:b4:
+ e4:c6:d6:7e:1d:f5:ed:b9:1a:0f:d7:e6:a2:ab:a2:
+ 25:1f:6c:f9:ab:9c:d8:a3:b9:da:32:72:51:6d:61:
+ f1:3b:7d:06:2b:3d:43:d5:52:1f:cb:62:14:53:69:
+ 4d:91:12:22:f0:55:f9:fc:4f:de:ee:e3:fc:fd:40:
+ 57:50:eb:0e:7a:45:cc:52:0f:24:6f:45:02:72:6b:
+ 6d:90:94:1c:d4:fb:34:f6:4b:4d:25:17:6f:df:4a:
+ 64:f8:ad:1e:6e:df:ad:6c:b3:1d:1a:e6:0e:59:7b:
+ f8:a7:13:77:78:85:bf:3f:7c:12:d4:8e:34:ff:01:
+ 90:03:42:85:60:e4:99:d6:19:32:46:41:e8:50:ca:
+ 2a:03:61:cd:c5:68:f4:92:0f:6e:48:89:41:9e:53:
+ bc:41:62:ed:4a:92:64:b5:cb:3d:55:6c:d9:87:87:
+ 9a:ab:fc:22:50:66:92:2b:b9:d7:9e:3b:ed:80:e3:
+ fa:19:69:38:87:b6:25:3a:db:b5:d0:f2:80:4d:af:
+ 6d:7d:92:90:de:aa:df:be:80:26:1c:69:ee:7a:e3:
+ 45:c9:a4:4e:6a:e0:56:5f:1f:61:44:3f:62:34:c9:
+ 1e:21:5f:f6:7f:68:c0:6e:bf:d2:35:1e:53:99:e4:
+ e1:bd:64:a4:49:3c:c3:ce:b6:e8:a9:3d:27:54:ea:
+ f1:3e:a1:fc:7b:bf:8d:71:60:90:c5:66:24:85:de:
+ 7d:47:1f:62:83:e2:63:8e:10:5c:14:cd:d0:7e:86:
+ 44:4d:df:05:10:43:b8:3c:87:64:69:ec:ea:fb:49:
+ 9a:c6:76:c1:8f:ea:49:98:0a:d3:97:af:64:ef:da:
+ 5f:a9:57:03:e3:a0:15:d8:68:c5:40:d8:7b:0f:26:
+ 0d:5f:f0:be:5a:4c:fd:af:9e:bf:2d:31:40:71:25:
+ de:d0:73:19:2d:ae:a6:cb:7c:f0:b8:a4:a9:5c:50:
+ 80:41:4e:dc:f7:20:a4:a6:66:65:fb:92:d1:43:2d:
+ bf:30:b2:0d:db:9b:a3:ac:28:08:c4:81:99:0c:0d:
+ 45:e9:a9:e5:6c:da:bf:10:bb:a7:3e:5a:5f:b7:93:
+ 4a:20:15:29:69:74:78:d1:eb:53:a8:88:49:cb:de:
+ 0c:e2:9b:31:e2:2f:56:95:cf:55:92:a3:8e:a9:ef:
+ 68:cb:00:11:d4:71:06:4b:e5:89:0c:b6:e7:2b:2f:
+ 98:65:21:8e:2a:a3:86:73:bb:1b:76:e1:94:02:d8:
+ a1:51:97:15:60:a2:39:d5:fd:dc:a8:be:30:12:44:
+ b1:49:0b:94:82:cf:5f:93:61:1c:3c:eb:05:5b:a4:
+ 17:ee:30:cd:7c:db:3f:ee:79:02:da:14:20:98:fd:
+ 9a:0a:f1:39:c8:59:5b:4e:a3:ad:f8:04:e6:0b:b6:
+ 81:7e:41:00:af:f7:37:ec:6e:bc:28:a3:3d:76:b6:
+ fd:e9:88:c7:1e:78:79:27:62:a2:83:34:15:61:b8:
+ e4:c3:ac:f5:7f:3e:4e:5f:5f:31:5b:e8:91:1b:80:
+ 5e:cb:74:b2:e5:a3:8a:d5:5a:89:fa:63:f1:ff:67:
+ bd:59:d0:70:77:b7:75:b5:34:74:3d:2e:99:46:0b:
+ 4b:c4:64:2f:93:48:fe:47:92:6a:0b:42:5e:ef:c9:
+ 06:64:84:60:89:2b:84:1f:31:0d:36:15:4e:6b:cd:
+ 14:f7:a0:d1:b2:b8:ff:53:f5:aa:b9:ed:63:50:7a:
+ 6f:62:e7:c7:7f:bc:f5:e2:0c:f8:28:a4:0d:ba:75:
+ d0:b8:c7:9b:e3:94:62:66:1c:d8:6c:02:2e:a5:a2:
+ 62:50:fe:cf:31
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -88,120 +88,61 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 3E:96:BB:23:C2:FD:41:11:7F:EB:63:9B:39:5F:58:2D:92:A0:F0:9F
+ B3:A9:00:04:C7:9C:2B:CD:C0:5F:D1:28:5C:5C:C6:1F:26:F7:17:5A
X509v3 Authority Key Identifier:
- keyid:60:57:8F:09:CF:83:86:4B:35:32:BF:73:EB:81:4C:DB:36:27:12:8F
+ keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
- Signature Algorithm: sha256WithRSAEncryption
- 19:b8:4d:94:a3:41:1b:78:e8:fa:da:7c:c3:0c:f5:42:6a:2e:
- 04:8c:f4:6e:90:e0:d1:55:28:7c:97:85:18:12:c4:ff:d3:ba:
- 74:f1:7f:af:b0:ab:4d:64:f4:45:58:6e:b1:2e:06:cc:a7:5b:
- cd:25:8f:60:68:14:e1:f9:56:21:40:43:e4:c4:ee:91:72:01:
- 7d:86:41:2f:ac:6d:be:c6:1a:2a:ae:dd:13:ca:51:01:37:33:
- 7e:b9:1a:9a:28:16:8c:bc:d1:e7:d4:46:55:87:1f:05:93:4c:
- b5:75:ff:ed:ca:29:b2:5d:15:05:4c:02:a9:53:3c:d9:11:01:
- 04:db:82:ad:01:ad:4e:d4:7d:9e:6a:00:5e:cc:88:83:42:98:
- 6e:4b:cd:7c:55:c6:4c:98:39:db:d1:e3:aa:f3:27:83:6a:3c:
- 01:ad:c5:ee:ef:01:aa:b7:4d:f7:a1:86:34:9d:61:20:7c:a0:
- c0:75:26:24:6f:a3:68:0e:03:4d:cf:f3:bf:d9:40:4f:1a:04:
- 4d:9c:5e:62:49:37:5b:78:ee:c5:11:78:ee:e5:87:f7:f4:f1:
- 6d:0d:bd:a2:fb:a2:6c:27:91:d4:84:43:03:f5:9b:11:50:ab:
- 45:ca:7c:3d:fe:5c:6b:e1:03:20:c8:c9:ac:66:ff:74:6e:0d:
- 87:47:75:77:41:ca:5e:e9:77:5f:2b:09:bb:a5:7d:fc:cf:ed:
- 75:dd:b0:ee:b8:da:3e:59:d0:e2:7f:38:16:fe:04:c9:99:d1:
- 06:84:11:b1:07:8a:4d:59:d6:70:c3:9b:f7:f8:b9:ae:99:86:
- b6:31:a4:13:de:7e:23:27:33:96:d1:9b:15:65:98:04:e5:f8:
- 73:3c:f3:72:ef:a1:28:06:1d:7e:88:52:c1:f7:eb:2a:e1:f7:
- 57:e5:ed:08:e9:ee:f8:95:3d:ec:4c:98:93:e7:e1:ea:a5:02:
- 37:c1:66:18:ba:01:78:05:6d:c4:6b:2c:61:ee:bf:a9:e1:4d:
- bf:95:31:f5:28:2a:f8:c9:ce:72:a5:c7:a3:38:2c:f6:69:34:
- eb:cb:e9:b3:4f:78:de:87:61:8a:34:bd:5a:64:27:f0:42:1a:
- 22:e9:2b:ac:97:f1:ed:7a:50:3b:3e:18:ae:b7:d9:20:9b:d6:
- 12:3b:18:b1:47:71:39:0a:31:54:9f:fe:f2:90:d7:b8:27:6b:
- 49:e5:82:cd:82:99:95:b1:ab:aa:1f:7a:e4:4e:6e:46:91:a7:
- 16:b8:09:a3:5b:ec:6f:57:ca:b4:4f:69:e7:f5:f3:b9:03:93:
- 08:90:9d:8d:57:82:77:bc:69:f8:e4:46:d9:4d:d1:25:ea:b8:
- 60:b0:e2:cd:0c:ff:c2:63:65:20:f4:2c:34:36:34:a3:cf:67:
- 6a:01:3e:51:5f:4a:49:26:9d:30:3f:03:05:70:22:b1:e3:46:
- d1:ff:23:23:45:08:4b:0e:77:db:91:d9:a2:5c:15:48:49:ee:
- 08:48:90:c3:25:44:b7:7b:9f:82:96:7e:8e:91:91:e5:a0:4d:
- af:04:b8:72:df:07:a0:4b:02:79:0e:38:05:47:61:c3:9e:b4:
- bf:01:00:10:c3:12:44:64:12:7a:bc:e1:c8:41:e5:cb:0d:7c:
- 52:32:7f:71:c1:3f:6e:d3:81:d3:12:ec:85:4c:16:72:d2:79:
- f8:bf:c0:fe:31:14:47:53:20:87:73:bb:34:8f:60:4a:9e:91:
- 35:6e:20:96:da:bd:4b:7e:bd:c7:c4:f9:25:54:40:2c:9d:b0:
- 8b:b5:fb:1e:74:59:a5:f7:b9:b7:23:56:3b:eb:2e:0a:eb:f5:
- 10:9b:88:5b:49:8e:0f:05:61:7b:e5:a9:a0:24:f2:16:3f:cb:
- 5b:06:d6:a5:bb:94:3a:46:2e:43:c5:02:67:b1:7d:5d:b6:c0:
- f9:93:2a:d6:18:95:89:73:ff:3b:a1:f3:a6:bd:5b:6a:f0:e0:
- 11:e8:95:09:83:5d:69:c3:91:e8:88:ea:b2:7c:32:73:a8:b0:
- a4:24:d8:e5:6f:c7:97:8b:3e:c7:1e:69:6a:2a:b7:db:d1:26:
- 7b:94:83:27:6d:d2:82:58:dd:a7:c2:74:0d:43:13:e2:c5:96:
- 9f:3c:00:40:1a:10:b1:da:62:23:2e:b7:5c:33:61:56:3b:8b:
- b4:b9:01:64:71:67:82:7c:18:2c:e8:d9:cf:e7:da:4b:16:7a:
- 91:67:af:82:0e:ac:7a:c9:cc:47:9b:84:b9:49:e8:3d:33:a4:
- 66:3f:c3:c1:20:ba:d1:0e:1e:11:80:82:78:90:25:a4:bc:80:
- a2:25:8a:5c:de:3c:59:52:2f:b3:50:bb:0b:5a:f1:96:8d:d2:
- eb:b9:f1:e9:72:a8:ae:f2:15:fd:5a:9c:a3:e8:ca:26:e9:67:
- 80:13:38:1f:38:9f:85:8a:82:3c:4f:d3:04:ff:3a:13:f7:b5:
- 13:f7:e3:50:1d:d6:e1:e6:1e:d0:b4:c8:5e:21:d7:22:cc:01:
- de:db:d1:c4:a2:5c:0b:dc:dc:2f:08:e4:2e:12:c5:4a:bc:a1:
- b3:92:32:1e:05:5c:7e:ca:43:6e:2e:06:3f:27:fd:1b:75:f0:
- 01:42:8d:ff:aa:f8:f1:47:5b:56:67:74:66:1b:aa:b5:75:41:
- 69:ba:91:66:ce:c3:3a:00:7a:93:59:1c:0c:49:c2:d2:d8:8d:
- 7a:57:a4:7d:ba:61:26:1e:e9:aa:ab:e6:cb:2c:16:0a
+ Signature Algorithm: sha1WithRSAEncryption
+ 01:43:2c:d5:1d:b5:36:05:31:ca:b2:f3:9e:71:ce:62:fe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ax+esxo09AWBaQd7Y9b4WVEqnKcAqazWFGJ4TOnjNUj5pBbU0RvRR/
+/zLpBrw2OBFcD+mlWg9cfPr1c1tMR/Ly
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem
index 9b3f7ed2aa3..72d2756477c 100644
--- a/mysql-test/std_data/server8k-key.pem
+++ b/mysql-test/std_data/server8k-key.pem
@@ -1,99 +1,99 @@
-----BEGIN RSA PRIVATE KEY-----
-MIISKQIBAAKCBAEA2I+dZmacEsoKrZ6fBWZsbIrbGZ+i0Po43N7FppRgDUtyyYXi
-/yfI1M6xKWYx5ytOCLOicc8eNnyOTQhu/XrqwQ1clwlm+u0LNmSPzDk1qUNsqRdI
-Dy4KS9OUu7BbQ/FO9+Uw4a6iqF082znf1ktwpslow/OdGdcvKjgxEavxYGbDOE/Z
-b7VJ384UtfrIlQRQaZCdJsLpB2l7otiR583exO2c5MiM46DN3Ss3IY/uVDiRKysB
-hpDwLpoGiuHyoj/R1CGfsIHr0OnT6akobsIGS5RulnD1MTPdly/MXYDFdM7APbJq
-gbfOZU9qST7JXQA8BkpXyaf5u0ZQ32TcEx8irSELqktdlGCfIP8oqlZf9s0jNP5E
-otaAvalnANahgoKfyegMlyYeqbHi7gHvncaC/HIzAkA1zK5RI/T4kinTL1wfA8aB
-fftP6d7taDyhvnz6EZYrWhDFxcsuelRMexK4BwHZtTgPpkNwKIGN15Wt1uiItBli
-BXt1wC0kchxNBKP3HWuL+hajWmxRulxi+j6Cf04Q29BS1IHfDlszfiB3HVHKThPu
-zXI2KLQxiD1hDxqAGfZ9cV0hH90L2XOIqXJLjaPW8U9dAW6ewiiXgN5bLayjySTb
-6Q8rNu6n8pTBQXpwn/3QManeVThliSD0AvGDc0B32zXSZv8mX/TS5vm6/GpmsQIk
-BKMySyGFg7Rqlzwlf2XMpt3MrOUiCVjcoQ19tKyYmIEdp4PUOuQ5pwRqtrddqP4O
-RwgdlWHrqJdTkR7KH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rg9rTAMJSnm2YWBHK1Z8DDlLzw3SkNZVKm6Ai4yEcLs1PzGZejsJvsu3zGgq
+nM4liRHK2QqY1SJf6PsJGxAI62tlyTRfjxtC3Jq9oJbmJs+jl0gtNKEbkfQc83IL
+8wCHOm9G7KK7XJjMCb50Dh80YIDFj5GTQLU1tKdpDBfq6YTKUHqjPA8GRnz8vA==
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/suite/binlog/r/temptable_uservar_disconnect-7938.result b/mysql-test/suite/binlog/r/temptable_uservar_disconnect-7938.result
new file mode 100644
index 00000000000..f09216cb539
--- /dev/null
+++ b/mysql-test/suite/binlog/r/temptable_uservar_disconnect-7938.result
@@ -0,0 +1,8 @@
+create table t1 (i int);
+create trigger tr after insert on t1 for each row set @b=@a;
+create temporary table tmp like t1;
+insert into t1 values (1);
+select * from t1;
+i
+1
+drop table t1;
diff --git a/mysql-test/suite/binlog/t/temptable_uservar_disconnect-7938.test b/mysql-test/suite/binlog/t/temptable_uservar_disconnect-7938.test
new file mode 100644
index 00000000000..a1d91e2f98f
--- /dev/null
+++ b/mysql-test/suite/binlog/t/temptable_uservar_disconnect-7938.test
@@ -0,0 +1,17 @@
+#
+# MDEV-7938 MariaDB Crashes Suddenly while writing binlogs
+#
+--source include/have_log_bin.inc
+--source include/have_binlog_format_mixed.inc
+
+--connect(con1,localhost,root,,)
+create table t1 (i int);
+create trigger tr after insert on t1 for each row set @b=@a;
+
+create temporary table tmp like t1;
+insert into t1 values (1);
+--disconnect con1
+
+--connection default
+select * from t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-mdev-7055.result b/mysql-test/suite/innodb/r/innodb-mdev-7055.result
deleted file mode 100644
index d00491fd7e5..00000000000
--- a/mysql-test/suite/innodb/r/innodb-mdev-7055.result
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7055.test b/mysql-test/suite/innodb/t/innodb-mdev-7055.test
deleted file mode 100644
index 8f4d647e35d..00000000000
--- a/mysql-test/suite/innodb/t/innodb-mdev-7055.test
+++ /dev/null
@@ -1,23 +0,0 @@
--- source include/have_innodb.inc
-
-# MDEV-7055: MySQL#74664 - InnoDB: Failing assertion: len <= col->len
-# || col->mtype == 5 || (col->len == 0 && col->mtype == 1) in
-# file rem0rec.cc line 845
---disable_query_log
---disable_warnings
---disable_result_log
-set @old_character_set=@@character_set_connection;
-set character_set_connection=ucs2;
-create TABLE t1 engine=innodb select if(0=0,'Y','N');
-insert INTO t1 values(date_format('2001-01-01','%W'));
-select * from t1;
-drop table t1;
-set @@character_set_connection=@old_character_set;
---enable_result_log
---enable_warnings
---enable_query_log
-
-#produce something
---echo 1
-
-
diff --git a/mysql-test/suite/percona/innodb_sys_index.result b/mysql-test/suite/percona/innodb_sys_index.result
index 67604236366..1f1bd814886 100644
--- a/mysql-test/suite/percona/innodb_sys_index.result
+++ b/mysql-test/suite/percona/innodb_sys_index.result
@@ -1,9 +1,6 @@
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 'test.t1'
-select @@version_comment limit 1 ;
-@@version_comment
-Source distribution
+Note 1051 Unknown table 't1'
SELECT COUNT(*) FROM `information_schema`.`INNODB_SYS_INDEXES` ;
CREATE TABLE test.t1 ( `a` SERIAL NOT NULL , `b` VARCHAR( 255 ) NOT NULL , INDEX ( `b` ) ) ENGINE = InnoDB ;
SHOW TABLE STATUS FROM `information_schema` LIKE 'INNODB\_SYS\_INDEXES%' ;
diff --git a/mysql-test/suite/percona/innodb_sys_index.test b/mysql-test/suite/percona/innodb_sys_index.test
index 212baeda663..d8c22e7f5f9 100644
--- a/mysql-test/suite/percona/innodb_sys_index.test
+++ b/mysql-test/suite/percona/innodb_sys_index.test
@@ -5,7 +5,6 @@ drop table if exists t1;
#
# test for bug LP#875797 "Using 'innodb_sys_indexes' causes core dump"
#
-select @@version_comment limit 1 ;
--disable_result_log
SELECT COUNT(*) FROM `information_schema`.`INNODB_SYS_INDEXES` ;
CREATE TABLE test.t1 ( `a` SERIAL NOT NULL , `b` VARCHAR( 255 ) NOT NULL , INDEX ( `b` ) ) ENGINE = InnoDB ;
diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result
index 9c0efb7b1ca..d910f29c91e 100644
--- a/mysql-test/suite/perfschema/r/digest_table_full.result
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result
@@ -113,7 +113,7 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARN
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
NULL NULL NULL 55 32 1 2
-statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+statements_digest 8de787d0e3e3a062aea121ff528fcfce TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
SHOW VARIABLES LIKE "performance_schema_digests_size";
Variable_name Value
performance_schema_digests_size 2
diff --git a/mysql-test/suite/perfschema/r/rpl_gtid_func.result b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
index 98342bc4869..bfe4e08a3c1 100644
--- a/mysql-test/suite/perfschema/r/rpl_gtid_func.result
+++ b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
@@ -37,7 +37,7 @@ select digest, digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
digest digest_text count_star
-e315485f9cbc06befb4e59970905a034 SELECT ? AS in_master_digest 1
+f1cd3e758822a4ef0e1502ec30818476 SELECT ? AS in_master_digest 1
insert into test.marker values (2);
**** On Slave ****
select * from test.marker;
@@ -64,7 +64,7 @@ select digest, digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
digest digest_text count_star
-bd2f53b41efcd037df41a3dd8bf3312a SELECT ? AS in_slave_digest 1
+c1cef2eb67ca48bb5d81d2e5e68aaf35 SELECT ? AS in_slave_digest 1
**** On Master ****
delete from performance_schema.setup_objects
where object_schema='master';
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
index 41cba435cb6..4669a6c25a1 100644
--- a/mysql-test/suite/perfschema/r/statement_digest.result
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -112,43 +112,43 @@ DROP TRIGGER trg;
SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
-statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
-statements_digest 954f43425c3234acc8e194afd97e8a0a SELECT ? FROM t1 1 0 0 0
-statements_digest fc365a54bc19d746bd24c27aba46b990 SELECT ? FROM `t1` 1 0 0 0
-statements_digest 27ba28f6252e4ae0e9b14b36da536fbe SELECT ?, ... FROM t1 2 0 0 0
-statements_digest 81d03922612900032ec4b81934ab4841 SELECT ? FROM t2 1 0 0 0
-statements_digest adce8aec12b6b5046cd4bf55951014c7 SELECT ?, ... FROM t2 2 0 0 0
-statements_digest 59a1bd93c424b10802fe66bb6dcd94d2 INSERT INTO t1 VALUES (?) 1 1 0 0
-statements_digest 91b2da58b0eb49c35a38fbc49f5e491d INSERT INTO t2 VALUES (?) 1 1 0 0
-statements_digest 967114adbf91d8a4a99ec5e49e909ff4 INSERT INTO t3 VALUES (...) 4 4 0 0
-statements_digest 8f25e7a48487e0aa7377e816816bb658 INSERT INTO t4 VALUES (...) 1 1 0 0
-statements_digest 4e51253af793867fba66166de1f314f7 INSERT INTO t5 VALUES (...) 1 1 0 0
-statements_digest fa47b3109e117216cd10209690d28596 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
-statements_digest 72409f84bc236e6fe9f2f7b4d727f2d3 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
-statements_digest d40aaddb41ed794d65dd8273f0c75700 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
-statements_digest 57a82b28388e52e99fc64339dd30edde INSERT INTO t1 VALUES ( NULL ) 1 1 0 0
-statements_digest 6a56b694106442474cb0e5fb7575c8b9 INSERT INTO t6 VALUES (...) 5 5 0 0
-statements_digest c9abf55e296c4317dbaf2d14ef907ad7 SELECT ? + ? 3 0 0 0
-statements_digest 156304a0851a3e3626b39fb3da841a82 SELECT ? 1 0 0 0
+statements_digest 8de787d0e3e3a062aea121ff528fcfce TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+statements_digest a871edd1a65606b404c0b6e65c1f142c SELECT ? FROM t1 1 0 0 0
+statements_digest d60830f376a7724280dfc422224bb475 SELECT ? FROM `t1` 1 0 0 0
+statements_digest 09309c60c199a727b7ebed40975e8764 SELECT ?, ... FROM t1 2 0 0 0
+statements_digest dc0dcaefa9a12455ffed04ac6f89e65d SELECT ? FROM t2 1 0 0 0
+statements_digest d274a288509eae2cd7febf2f7fe36274 SELECT ?, ... FROM t2 2 0 0 0
+statements_digest ec913f89e0d8be99014bf78e73228c48 INSERT INTO t1 VALUES (?) 1 1 0 0
+statements_digest b919ecf2d5544bcdf95e76eb22231c42 INSERT INTO t2 VALUES (?) 1 1 0 0
+statements_digest d9030eddb8dca8ee5fcaf79e6f254b41 INSERT INTO t3 VALUES (...) 4 4 0 0
+statements_digest 2ad6d8279781b0fb40bdc8647dc94216 INSERT INTO t4 VALUES (...) 1 1 0 0
+statements_digest 3248c16dc70111225fcffa99641e312b INSERT INTO t5 VALUES (...) 1 1 0 0
+statements_digest 152b6c84a0cbfadcbecde01050eddd66 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
+statements_digest c4cbce33b636e448c29e041b1d5c0eb1 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
+statements_digest 0bfac9fb577995b116e52ff4aaeaa5b8 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
+statements_digest f8d6ea06dfb87f5c40fd427f3f0ff4e7 INSERT INTO t1 VALUES ( NULL ) 1 1 0 0
+statements_digest 819acce11785e12f2f73964115632db6 INSERT INTO t6 VALUES (...) 5 5 0 0
+statements_digest aeb185ab9b6e9d5a49e47c8741b8acdf SELECT ? + ? 3 0 0 0
+statements_digest d3804664eeee11407f3fcbd5c29a1f73 SELECT ? 1 0 0 0
statements_digest 3b085ab0d2063dfca1a39212e3ea1831 CREATE SCHEMA statements_digest_temp 2 2 0 0
statements_digest 09f9fabef2feb9a54ba01455e5ae83b9 DROP SCHEMA statements_digest_temp 2 0 0 0
-statements_digest 7910a63ffd31cbcb742e15270c8958c8 SELECT ? FROM no_such_table 1 0 0 1
-statements_digest fa34540a438bc672478b1162505ee28c CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1
-statements_digest 2c720f176bb7c8510ff8aca8921b9945 DROP TABLE dup_table 1 0 0 0
-statements_digest 0c7d9fd8c27ab067511da41ca3bcdff3 INSERT INTO t11 VALUES (?) 1 1 1 0
-statements_digest 81681ff345065ed72bcd1e9407ab85e4 SHOW WARNINGS 1 0 0 0
-statements_digest d766f5823ae5d8e4cf4602b8e7a3fb80 PREPARE stmt FROM ? 1 0 0 0
+statements_digest ff0bb1dfc399aa3bef6a0f3fccd3ef94 SELECT ? FROM no_such_table 1 0 0 1
+statements_digest 590a245c84e63eb100e1ef463f477f1a CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1
+statements_digest 74078b0776d8333e356b271551587d53 DROP TABLE dup_table 1 0 0 0
+statements_digest f23641c5ab7e1dd6e0146f66b3fff5c4 INSERT INTO t11 VALUES (?) 1 1 1 0
+statements_digest d3eda26b379bd56340ce84fe395dfff7 SHOW WARNINGS 1 0 0 0
+statements_digest 6bb42dec3094486d5a9e8b0bf460e382 PREPARE stmt FROM ? 1 0 0 0
statements_digest 3ab1e87eabd9688edf919754cce6348b EXECUTE stmt 2 0 0 0
-statements_digest 470094469d250b9f45cab45bf610efe8 DEALLOCATE PREPARE stmt 1 0 0 0
-statements_digest 1b4d25358e08b35ad54e49dfe5eaf3e4 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0
+statements_digest f9438ab7b8eec604338c28a04e5d650f DEALLOCATE PREPARE stmt 1 0 0 0
+statements_digest 072d6c57d3fe4f0c6a7dabba96f0ccf8 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0
statements_digest 84554971243e91106214dcb8f4eaa89b CALL p1 ( ) 2 0 0 0
-statements_digest 77206e4bf30979c56752a7ed9150213a DROP PROCEDURE p1 1 0 0 0
-statements_digest 03b91dcdba6b0e29f7fb240ae4bcd97f CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0
-statements_digest 72bc532f308f2dca62f5291df8c50e6f SELECT func (...) 2 0 0 0
+statements_digest 2bd1e1e6eb445f32e1d4b290c1961e6b DROP PROCEDURE p1 1 0 0 0
+statements_digest 5799522044ce9a4fa48dce5f4a3b047a CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0
+statements_digest 59cbdd7ffc78a23bc2f650f8158067c6 SELECT func (...) 2 0 0 0
statements_digest 0b5a5297689c5036def6af8e8a8ce113 DROP FUNCTION func 1 0 0 0
-statements_digest d08331e42c67555ece50e46eef0f2b47 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0
-statements_digest 754a49a4de995c5a729e9ab52f135f59 INSERT INTO t12 VALUES (?) 2 2 0 0
-statements_digest 68df17752bca7c2c8ee2a6a19a0674e7 DROP TRIGGER trg 1 0 0 0
+statements_digest 10c7a2262748aa15496375d99f876fb2 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0
+statements_digest bb0154f3d32233f696b95d4127d29a3b INSERT INTO t12 VALUES (?) 2 2 0 0
+statements_digest a975545baf024e8a173be77032d8fd01 DROP TRIGGER trg 1 0 0 0
####################################
# CLEANUP
####################################
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
index 21e62e13b19..b47c8127897 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -125,43 +125,43 @@ DROP TRIGGER trg;
####################################
SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
schema_name digest digest_text count_star
-statements_digest 0e98ee6a98e296530ec59c12dbc08dfe TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
-statements_digest 954f43425c3234acc8e194afd97e8a0a SELECT ? FROM t1 1
-statements_digest fc365a54bc19d746bd24c27aba46b990 SELECT ? FROM `t1` 1
-statements_digest 27ba28f6252e4ae0e9b14b36da536fbe SELECT ?, ... FROM t1 2
-statements_digest 81d03922612900032ec4b81934ab4841 SELECT ? FROM t2 1
-statements_digest adce8aec12b6b5046cd4bf55951014c7 SELECT ?, ... FROM t2 2
-statements_digest 59a1bd93c424b10802fe66bb6dcd94d2 INSERT INTO t1 VALUES (?) 1
-statements_digest 91b2da58b0eb49c35a38fbc49f5e491d INSERT INTO t2 VALUES (?) 1
-statements_digest 967114adbf91d8a4a99ec5e49e909ff4 INSERT INTO t3 VALUES (...) 4
-statements_digest 8f25e7a48487e0aa7377e816816bb658 INSERT INTO t4 VALUES (...) 1
-statements_digest 4e51253af793867fba66166de1f314f7 INSERT INTO t5 VALUES (...) 1
-statements_digest fa47b3109e117216cd10209690d28596 INSERT INTO t1 VALUES (?) /* , ... */ 2
-statements_digest 72409f84bc236e6fe9f2f7b4d727f2d3 INSERT INTO t3 VALUES (...) /* , ... */ 1
-statements_digest d40aaddb41ed794d65dd8273f0c75700 INSERT INTO t5 VALUES (...) /* , ... */ 1
-statements_digest 57a82b28388e52e99fc64339dd30edde INSERT INTO t1 VALUES ( NULL ) 1
-statements_digest 6a56b694106442474cb0e5fb7575c8b9 INSERT INTO t6 VALUES (...) 5
-statements_digest c9abf55e296c4317dbaf2d14ef907ad7 SELECT ? + ? 3
-statements_digest 156304a0851a3e3626b39fb3da841a82 SELECT ? 1
+statements_digest 8de787d0e3e3a062aea121ff528fcfce TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
+statements_digest a871edd1a65606b404c0b6e65c1f142c SELECT ? FROM t1 1
+statements_digest d60830f376a7724280dfc422224bb475 SELECT ? FROM `t1` 1
+statements_digest 09309c60c199a727b7ebed40975e8764 SELECT ?, ... FROM t1 2
+statements_digest dc0dcaefa9a12455ffed04ac6f89e65d SELECT ? FROM t2 1
+statements_digest d274a288509eae2cd7febf2f7fe36274 SELECT ?, ... FROM t2 2
+statements_digest ec913f89e0d8be99014bf78e73228c48 INSERT INTO t1 VALUES (?) 1
+statements_digest b919ecf2d5544bcdf95e76eb22231c42 INSERT INTO t2 VALUES (?) 1
+statements_digest d9030eddb8dca8ee5fcaf79e6f254b41 INSERT INTO t3 VALUES (...) 4
+statements_digest 2ad6d8279781b0fb40bdc8647dc94216 INSERT INTO t4 VALUES (...) 1
+statements_digest 3248c16dc70111225fcffa99641e312b INSERT INTO t5 VALUES (...) 1
+statements_digest 152b6c84a0cbfadcbecde01050eddd66 INSERT INTO t1 VALUES (?) /* , ... */ 2
+statements_digest c4cbce33b636e448c29e041b1d5c0eb1 INSERT INTO t3 VALUES (...) /* , ... */ 1
+statements_digest 0bfac9fb577995b116e52ff4aaeaa5b8 INSERT INTO t5 VALUES (...) /* , ... */ 1
+statements_digest f8d6ea06dfb87f5c40fd427f3f0ff4e7 INSERT INTO t1 VALUES ( NULL ) 1
+statements_digest 819acce11785e12f2f73964115632db6 INSERT INTO t6 VALUES (...) 5
+statements_digest aeb185ab9b6e9d5a49e47c8741b8acdf SELECT ? + ? 3
+statements_digest d3804664eeee11407f3fcbd5c29a1f73 SELECT ? 1
statements_digest 3b085ab0d2063dfca1a39212e3ea1831 CREATE SCHEMA statements_digest_temp 2
statements_digest 09f9fabef2feb9a54ba01455e5ae83b9 DROP SCHEMA statements_digest_temp 2
-statements_digest 7910a63ffd31cbcb742e15270c8958c8 SELECT ? FROM no_such_table 1
-statements_digest fa34540a438bc672478b1162505ee28c CREATE TABLE dup_table ( c CHARACTER (?) ) 2
-statements_digest 2c720f176bb7c8510ff8aca8921b9945 DROP TABLE dup_table 1
-statements_digest 0c7d9fd8c27ab067511da41ca3bcdff3 INSERT INTO t11 VALUES (?) 1
-statements_digest 81681ff345065ed72bcd1e9407ab85e4 SHOW WARNINGS 1
-statements_digest d766f5823ae5d8e4cf4602b8e7a3fb80 PREPARE stmt FROM ? 1
+statements_digest ff0bb1dfc399aa3bef6a0f3fccd3ef94 SELECT ? FROM no_such_table 1
+statements_digest 590a245c84e63eb100e1ef463f477f1a CREATE TABLE dup_table ( c CHARACTER (?) ) 2
+statements_digest 74078b0776d8333e356b271551587d53 DROP TABLE dup_table 1
+statements_digest f23641c5ab7e1dd6e0146f66b3fff5c4 INSERT INTO t11 VALUES (?) 1
+statements_digest d3eda26b379bd56340ce84fe395dfff7 SHOW WARNINGS 1
+statements_digest 6bb42dec3094486d5a9e8b0bf460e382 PREPARE stmt FROM ? 1
statements_digest 3ab1e87eabd9688edf919754cce6348b EXECUTE stmt 2
-statements_digest 470094469d250b9f45cab45bf610efe8 DEALLOCATE PREPARE stmt 1
-statements_digest 1b4d25358e08b35ad54e49dfe5eaf3e4 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1
+statements_digest f9438ab7b8eec604338c28a04e5d650f DEALLOCATE PREPARE stmt 1
+statements_digest 072d6c57d3fe4f0c6a7dabba96f0ccf8 CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1
statements_digest 84554971243e91106214dcb8f4eaa89b CALL p1 ( ) 2
-statements_digest 77206e4bf30979c56752a7ed9150213a DROP PROCEDURE p1 1
-statements_digest 03b91dcdba6b0e29f7fb240ae4bcd97f CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1
-statements_digest 72bc532f308f2dca62f5291df8c50e6f SELECT func (...) 2
+statements_digest 2bd1e1e6eb445f32e1d4b290c1961e6b DROP PROCEDURE p1 1
+statements_digest 5799522044ce9a4fa48dce5f4a3b047a CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1
+statements_digest 59cbdd7ffc78a23bc2f650f8158067c6 SELECT func (...) 2
statements_digest 0b5a5297689c5036def6af8e8a8ce113 DROP FUNCTION func 1
-statements_digest d08331e42c67555ece50e46eef0f2b47 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1
-statements_digest 754a49a4de995c5a729e9ab52f135f59 INSERT INTO t12 VALUES (?) 2
-statements_digest 68df17752bca7c2c8ee2a6a19a0674e7 DROP TRIGGER trg 1
+statements_digest 10c7a2262748aa15496375d99f876fb2 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1
+statements_digest bb0154f3d32233f696b95d4127d29a3b INSERT INTO t12 VALUES (?) 2
+statements_digest a975545baf024e8a173be77032d8fd01 DROP TRIGGER trg 1
SELECT digest, digest_text FROM performance_schema.events_statements_current;
digest digest_text
####################################
diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
index bb355304537..6b00e13576f 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
####################################
SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest;
schema_name digest digest_text count_star
-performance_schema 9d35ff74210c6b30efa4559d627ed0f7 TRUNCATE TABLE events_statements_summary_by_digest 1
-performance_schema d78a04c1c42765b8552e0483c50ae9ff SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
+performance_schema 7536ab4a65b991a0b1a8b9851e8457c3 TRUNCATE TABLE events_statements_summary_by_digest 1
+performance_schema 63f9aaeed7859671c6a42c75fcd43785 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index e9f4eb82fbe..09dcc06c848 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -11,10 +11,13 @@ server_audit_incl_users
server_audit_logging OFF
server_audit_mode 0
server_audit_output_type file
+server_audit_query_log_limit 1024
server_audit_syslog_facility LOG_USER
server_audit_syslog_ident mysql-server_auditing
server_audit_syslog_info
server_audit_syslog_priority LOG_INFO
+set global server_audit_file_path=null;
+set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_logging=on;
@@ -66,6 +69,7 @@ server_audit_incl_users odin, root, dva, tri
server_audit_logging ON
server_audit_mode 0
server_audit_output_type file
+server_audit_query_log_limit 1024
server_audit_syslog_facility LOG_USER
server_audit_syslog_ident mysql-server_auditing
server_audit_syslog_info
@@ -143,7 +147,40 @@ select 2;
2
2
drop table t1;
+set global server_audit_events='query_dcl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD FOR u1 = PASSWORD('pwd 098');
+CREATE USER u3 IDENTIFIED BY '';
+drop user u1, u2, u3;
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
set global server_audit_events='';
+set global server_audit_query_log_limit= 15;
+select (1), (2), (3), (4);
+1 2 3 4
+1 2 3 4
+select 'A', 'B', 'C', 'D';
+A B C D
+A B C D
+set global server_audit_query_log_limit= 1024;
drop database sa_db;
set global server_audit_file_path='.';
show status like 'server_audit_current_log';
@@ -175,6 +212,7 @@ server_audit_incl_users odin, root, dva, tri
server_audit_logging ON
server_audit_mode 1
server_audit_output_type file
+server_audit_query_log_limit 1024
server_audit_syslog_facility LOG_USER
server_audit_syslog_ident mysql-server_auditing
server_audit_syslog_info
@@ -288,7 +326,16 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'(select 2)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_query_log_limit= 1024',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test
index eb1727fefc2..787861d3327 100644
--- a/mysql-test/suite/plugins/t/server_audit.test
+++ b/mysql-test/suite/plugins/t/server_audit.test
@@ -8,6 +8,8 @@ if (!$SERVER_AUDIT_SO) {
install plugin server_audit soname 'server_audit';
show variables like 'server_audit%';
+set global server_audit_file_path=null;
+set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_logging=on;
@@ -94,7 +96,26 @@ select 2;
/*! select 2*/;
/*comment*/ select 2;
drop table t1;
+set global server_audit_events='query_dcl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD FOR u1 = PASSWORD('pwd 098');
+CREATE USER u3 IDENTIFIED BY '';
+drop user u1, u2, u3;
+select 2;
+(select 2);
+/*! select 2*/;
+/*comment*/ select 2;
+drop table t1;
set global server_audit_events='';
+
+set global server_audit_query_log_limit= 15;
+select (1), (2), (3), (4);
+select 'A', 'B', 'C', 'D';
+set global server_audit_query_log_limit= 1024;
drop database sa_db;
set global server_audit_file_path='.';
diff --git a/mysql-test/suite/rpl/r/rpl_special_charset.result b/mysql-test/suite/rpl/r/rpl_special_charset.result
new file mode 100644
index 00000000000..99b8d3a21d1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_special_charset.result
@@ -0,0 +1,8 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Cannot use utf16 as character_set_client");
+CREATE TABLE t1(i VARCHAR(20));
+INSERT INTO t1 VALUES (0xFFFF);
+include/diff_tables.inc [master:t1, slave:t1]
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
new file mode 100644
index 00000000000..e71bb2e29c9
--- /dev/null
+++ b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
@@ -0,0 +1,2 @@
+include/master-slave.inc
+[connection master]
diff --git a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
index 77e6cb957f7..f4482064d7b 100644
--- a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
+++ b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
@@ -18,7 +18,9 @@ use db1;
CREATE TABLE a(id INT);
CREATE VIEW v AS SELECT * FROM a;
CREATE TABLE table_father(id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20)) ENGINE=INNODB;
+--sync_slave_with_master
+connection master;
use db2;
CREATE TABLE table_child(id INT PRIMARY KEY, info VARCHAR(20), father_id INT) ENGINE=INNODB;
ALTER TABLE table_child ADD CONSTRAINT aaa FOREIGN KEY (father_id) REFERENCES db1.table_father(id);
diff --git a/mysql-test/suite/rpl/t/rpl_special_charset.opt b/mysql-test/suite/rpl/t/rpl_special_charset.opt
new file mode 100644
index 00000000000..b071fb20845
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_special_charset.opt
@@ -0,0 +1 @@
+--character-set-server=utf16
diff --git a/mysql-test/suite/rpl/t/rpl_special_charset.test b/mysql-test/suite/rpl/t/rpl_special_charset.test
new file mode 100644
index 00000000000..8ccb1b4183f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_special_charset.test
@@ -0,0 +1,26 @@
+################################################################################
+# Bug#19855907 IO THREAD AUTHENTICATION ISSUE WITH SOME CHARACTER SETS
+# Problem: IO thread fails to connect to master if servers are configured with
+# special character sets like utf16, utf32, ucs2.
+#
+# Analysis: MySQL server does not support few special character sets like
+# utf16,utf32 and ucs2 as "client's character set"(eg: utf16,utf32, ucs2).
+# When IO thread is trying to connect to Master, it sets server's character
+# set as client's character set. When Slave server is started with these
+# special character sets, IO thread (a connection to Master) fails because
+# of the above said reason.
+#
+# Fix: If server's character set is not supported as client's character set,
+# then set default's client character set(latin1) as client's character set.
+###############################################################################
+--source include/master-slave.inc
+call mtr.add_suppression("Cannot use utf16 as character_set_client");
+CREATE TABLE t1(i VARCHAR(20));
+INSERT INTO t1 VALUES (0xFFFF);
+--sync_slave_with_master
+--let diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+# Cleanup
+--connection master
+DROP TABLE t1;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
new file mode 100644
index 00000000000..a79a1885a6c
--- /dev/null
+++ b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
@@ -0,0 +1,12 @@
+#
+# MDEV-7126 replication slave - deadlock in terminate_slave_thread with stop slave and show variables of replication filters and show global status
+#
+--source include/master-slave.inc
+
+--connection slave
+
+# If everything is okay, the test will end in several seconds; maybe a minute.
+# If the problem shows up, it will hang until testcase timeout is exceeded.
+--exec $MYSQL_SLAP --silent --socket=$SLAVE_MYSOCK -q "START SLAVE; STOP SLAVE; SHOW GLOBAL STATUS" -c 2 --number-of-queries=100 --create-schema=test
+
+# All done.
diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
index a7afc334ba1..719adb67573 100644
--- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
@@ -41,23 +41,11 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
59392
-SET @@global.transaction_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
-SELECT @@global.transaction_alloc_block_size;
-@@global.transaction_alloc_block_size
-4294966272
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
-SET @@session.transaction_alloc_block_size =4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
-SELECT @@session.transaction_alloc_block_size;
-@@session.transaction_alloc_block_size
-4294966272
SET @@session.transaction_alloc_block_size = 65535;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535'
@@ -77,12 +65,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
-SET @@global.transaction_alloc_block_size = 123456789201;
+SET @@global.transaction_alloc_block_size = 135217728;
Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201'
+Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
-4294966272
+134217728
SET @@global.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size = OFF;
@@ -109,12 +97,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
-SET @@session.transaction_alloc_block_size = 12345678901;
+SET @@session.transaction_alloc_block_size = 135217728;
Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901'
+Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
-4294966272
+134217728
SET @@session.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@session.transaction_alloc_block_size = OFF;
@@ -149,9 +137,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size';
1
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@transaction_alloc_block_size = 1024;
-SET @@global.transaction_alloc_block_size = 4294967295;
-Warnings:
-Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
+SET @@global.transaction_alloc_block_size = 134217728;
SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
@@transaction_alloc_block_size = @@global.transaction_alloc_block_size
0
diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
index cbd25426408..be54302689d 100644
--- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
@@ -109,6 +109,12 @@ SELECT @@session.transaction_prealloc_size;
1024
SET @@session.transaction_prealloc_size = "Test";
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
+SET @@session.transaction_prealloc_size = 135217728;
+Warnings:
+Warning 1292 Truncated incorrect transaction_prealloc_size value: '135217728'
+SELECT @@session.transaction_prealloc_size;
+@@session.transaction_prealloc_size
+134217728
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -128,7 +134,7 @@ Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '10'
SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size;
@@transaction_prealloc_size = @@global.transaction_prealloc_size
-1
+0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@transaction_prealloc_size = 100;
Warnings:
diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
index 4a69bbcdb01..0faa95c8fe6 100644
--- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
@@ -5,7 +5,7 @@
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 8192 #
-# Range: 1024-4294967295 #
+# Range: 1024-134217728 #
# #
# #
# Creation Date: 2008-02-14 #
@@ -80,9 +80,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 60020;
SELECT @@global.transaction_alloc_block_size;
-SET @@global.transaction_alloc_block_size = 4294967295;
-SELECT @@global.transaction_alloc_block_size;
-
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
###################################################################
# Change the value of variable to a valid value for SESSION Scope #
@@ -91,9 +88,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
-SET @@session.transaction_alloc_block_size =4294967295;
-SELECT @@session.transaction_alloc_block_size;
-
SET @@session.transaction_alloc_block_size = 65535;
SELECT @@session.transaction_alloc_block_size;
@@ -110,7 +104,7 @@ SET @@global.transaction_alloc_block_size = -1024;
SELECT @@global.transaction_alloc_block_size;
-SET @@global.transaction_alloc_block_size = 123456789201;
+SET @@global.transaction_alloc_block_size = 135217728;
SELECT @@global.transaction_alloc_block_size;
-- Error ER_WRONG_TYPE_FOR_VAR
@@ -136,7 +130,7 @@ SET @@global.transaction_alloc_block_size ="Test";
SET @@global.transaction_alloc_block_size = 1000;
SELECT @@global.transaction_alloc_block_size;
-SET @@session.transaction_alloc_block_size = 12345678901;
+SET @@session.transaction_alloc_block_size = 135217728;
SELECT @@session.transaction_alloc_block_size;
-- Error ER_WRONG_TYPE_FOR_VAR
@@ -185,7 +179,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size';
###########################################################################
SET @@transaction_alloc_block_size = 1024;
-SET @@global.transaction_alloc_block_size = 4294967295;
+SET @@global.transaction_alloc_block_size = 134217728;
SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
index 5eabf457a0c..9d0c20a37b4 100644
--- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
@@ -5,7 +5,7 @@
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 4096 #
-# Range: #
+# Range: 1024-134217728 #
# #
# #
# Creation Date: 2008-02-14 #
@@ -137,6 +137,10 @@ SELECT @@session.transaction_prealloc_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.transaction_prealloc_size = "Test";
+SET @@session.transaction_prealloc_size = 135217728;
+SELECT @@session.transaction_prealloc_size;
+
+
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test
index 32d7d70200a..7f394e0f846 100644
--- a/mysql-test/t/blackhole.test
+++ b/mysql-test/t/blackhole.test
@@ -17,6 +17,16 @@ SELECT 1 FROM t1 WHERE a = ANY (SELECT a FROM t2);
DROP TABLE t1, t2;
+#
+# Bug#19786309 - CRASH IN UNLOCK TABLES AFTER LOCKING AND TRUNCATING TEMPORARY TABLE.
+#
+create temporary table t1 (a int) engine=blackhole;
+lock table t1 write;
+truncate table t1;
+select * from t1;
+unlock tables;
+drop temporary table t1;
+
--echo End of 5.5 tests
--echo #
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index 95008d83a38..5e8195e4718 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -507,6 +507,17 @@ select * from t1 where c1 = '=> dž';
select * from t1 where concat(c1) = '=> dž';
drop table t1;
+
+--echo #
+--echo # MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+--echo #
+
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+--let ENGINE=MyISAM
+--source include/ctype_utf8_ilseq.inc
+--let ENGINE=HEAP
+--source include/ctype_utf8_ilseq.inc
+
--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/ctype_uca_innodb.test b/mysql-test/t/ctype_uca_innodb.test
new file mode 100644
index 00000000000..cb6caff4a03
--- /dev/null
+++ b/mysql-test/t/ctype_uca_innodb.test
@@ -0,0 +1,25 @@
+#
+# Tests for UCA collations with InnoDB
+#
+
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+--source include/have_innodb.inc
+
+
+--echo #
+--echo # Start of 5.5 tests
+--echo #
+
+
+--echo #
+--echo # MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+--echo #
+
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+--let ENGINE=InnoDB
+--source include/ctype_utf8_ilseq.inc
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index af5f4b8ccf8..28e5852b4c1 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1616,6 +1616,26 @@ UNION ALL
SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1;
--echo #
+--echo # MDEV-7814 Assertion `args[0]->fixed' fails in Item_func_conv_charset::Item_func_conv_charset
+--echo #
+CREATE TABLE t1(a CHAR(1) CHARACTER SET latin1, b INT NOT NULL);
+CREATE TABLE t2(a CHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci, b INT NOT NULL);
+SELECT (SELECT t2.a FROM t2 WHERE t2.a=t1.a) AS aa, b, COUNT(b) FROM t1 GROUP BY aa;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-7649 wrong result when comparing utf8 column with an invalid literal
+--echo #
+
+SET NAMES utf8 COLLATE utf8_general_ci;
+--let ENGINE=InnoDB
+--source include/ctype_utf8_ilseq.inc
+--let ENGINE=MyISAM
+--source include/ctype_utf8_ilseq.inc
+--let ENGINE=HEAP
+--source include/ctype_utf8_ilseq.inc
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 61ae3695a1f..ddce7f55292 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -492,5 +492,17 @@ update t1 set balance=(select sum(balance) from (SELECT balance FROM t1 where ac
set optimizer_switch=@save_derived_optimizer_switch_bug;
drop table t1;
-
set optimizer_switch=@save_derived_optimizer_switch;
+
+--echo #
+--echo # MDEV-6892: WHERE does not apply
+--echo #
+create table t1 (id int);
+create table t2 (id int);
+insert into t1 values(1),(2),(3);
+insert into t2 values(4),(5),(6);
+#explain extended
+select x.id, message from (select id from t1) x left join
+(select id, 1 as message from t2) y on x.id=y.id
+where coalesce(message,0) <> 0;
+drop table t1,t2;
diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test
index e3de5e64940..186394df4e3 100644
--- a/mysql-test/t/file_contents.test
+++ b/mysql-test/t/file_contents.test
@@ -17,7 +17,7 @@ if ($dir_bin eq '/usr/') {
$dir_docs =~ s|/lib|/share/doc|;
if(-d "$dir_docs/packages") {
# SuSE: "packages/" in the documentation path
- $dir_docs = glob "$dir_docs/packages/MySQL-server*";
+ $dir_docs = glob "$dir_docs/packages/*-server*";
} else {
# RedHat: version number in directory name
$dir_docs = glob "$dir_docs/MySQL-server*";
@@ -27,7 +27,7 @@ if ($dir_bin eq '/usr/') {
$dir_docs = "$dir_bin/share/doc";
if(-d "$dir_docs/packages") {
# SuSE: "packages/" in the documentation path
- $dir_docs = glob "$dir_docs/packages/MySQL-server*";
+ $dir_docs = glob "$dir_docs/packages/*-server*";
} else {
# RedHat/Debian: version number in directory name
$dir_docs = glob "$dir_docs/mariadb-server-*";
diff --git a/mysql-test/t/filesort_bad_i_s-7585.test b/mysql-test/t/filesort_bad_i_s-7585.test
new file mode 100644
index 00000000000..daf70acdd52
--- /dev/null
+++ b/mysql-test/t/filesort_bad_i_s-7585.test
@@ -0,0 +1,14 @@
+#
+# MDEV-7585 Assertion `thd->is_error() || kill_errno || thd->killed == ABORT_QUERY' failed in ha_rows filesort
+#
+SET sql_mode=STRICT_TRANS_TABLES;
+
+CREATE TABLE t0 (i INT) ENGINE=MyISAM;
+CREATE VIEW v1 AS SELECT * FROM t0;
+CREATE VIEW v2 AS SELECT * FROM v1;
+DROP VIEW IF EXISTS v1;
+
+CREATE TABLE t1 (i INT) ENGINE=MyISAM;
+INSERT INTO t1 SELECT TABLE_ROWS FROM information_schema.tables ORDER BY TABLE_ROWS;
+DROP VIEW v2;
+DROP TABLE t1, t0;
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 7643676ea61..42a30760a86 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -803,3 +803,21 @@ create table t1 (a char(1) character set utf8);
insert into t1 values ('a'),('b');
select 1 from t1 where a in (select group_concat(a) from t1);
drop table t1;
+
+#
+# MDEV-7820 Server crashes in in my_strcasecmp_utf8 on subquery in ORDER BY clause of GROUP_CONCAT
+#
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('b');
+
+CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('c');
+
+CREATE TABLE t3 (f3 VARCHAR(10)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES ('d'),('e');
+
+SELECT GROUP_CONCAT( f2 ORDER BY ( f2 IN ( SELECT f1 FROM t1 WHERE f1 <= f2 ) ) ) AS field
+FROM ( SELECT * FROM t2 ) AS sq2, t3
+ORDER BY field;
+
+drop table t3, t2, t1;
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 8350c3185c7..9378ea55377 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -7,6 +7,7 @@
--disable_warnings
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
+DROP VIEW IF EXISTS v1;
--enable_warnings
CREATE TABLE gis_point (fid INTEGER NOT NULL PRIMARY KEY, g POINT);
@@ -1482,4 +1483,12 @@ drop table t1;
#
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
---echo End of 5.5 tests
+#
+# MDEV-7779 View definition changes upon creation
+#
+CREATE VIEW v1 AS SELECT POINT(1,1) AS p;
+SHOW CREATE VIEW v1;
+SELECT ASTEXT(p) FROM v1;
+DROP VIEW v1;
+
+# --echo End of 5.5 tests
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 4b1cb82d0f9..dfb7f28ab28 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1515,6 +1515,17 @@ let $query= SELECT MIN(a), b FROM t1 WHERE t1.b = 'a' GROUP BY b;
--echo
DROP TABLE t1;
+
+#
+# Bug#19880368 : GROUP_CONCAT CRASHES AFTER DUMP_LEAF_KEY
+#
+create table t1 (a int, b int);
+insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
+create table t2 (c int, d int);
+insert into t2 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
+select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
+drop table t1, t2;
+
--echo #
--echo # LP bug#993726 Wrong result from a query with ALL subquery predicate in WHERE
--echo #
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test
index cd6a4c9d328..0f6be0b0ec6 100644
--- a/mysql-test/t/having.test
+++ b/mysql-test/t/having.test
@@ -694,6 +694,41 @@ DROP TABLE t1;
--echo End of 5.3 tests
--echo #
+--echo # Bug MDEV-7301: Unknown column quoted with backticks in HAVING clause when using function.
+--echo # Bug#16221433 MYSQL REJECTS QUERY DUE TO BAD RESOLUTION OF NAMES IN HAVING; VIEW UNREADABLE
+--echo #
+
+CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `title` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO `t1` VALUES ('1', 'Just for fun');
+INSERT INTO `t1` VALUES ('2', 'Wait until a sunhine');
+INSERT INTO `t1` VALUES ('3', 'Take a new turn');
+
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING `column_1` LIKE '8%';
+
+--echo expected 1 row(s) returned
+
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING UPPER(column_1) LIKE '8%';
+
+--echo expected -- 1 row(s) returned
+
+SELECT `id`, SHA1(`title`) AS `column_1`
+FROM `t1`
+HAVING UPPER(`column_1`) LIKE '8%';
+
+--echo expected -- 1 row(s) returned not ER_BAD_FIELD_ERROR
+
+drop table t1;
+
+--echo #
--echo # Bug mdev-5160: two-way join with HAVING over the second table
--echo #
@@ -708,4 +743,3 @@ SELECT * FROM t1 JOIN t2 ON c1 = c2 HAVING c2 > 'a' ORDER BY c2 LIMIT 1;
DROP TABLE t1,t2;
--echo End of 10.0 tests
-
diff --git a/mysql-test/t/log_errchk.test b/mysql-test/t/log_errchk.test
index e4bc6a841dd..2808458e9f1 100644
--- a/mysql-test/t/log_errchk.test
+++ b/mysql-test/t/log_errchk.test
@@ -6,7 +6,8 @@
# Bug#14757009 : WHEN THE GENERAL_LOG IS A SOCKET AND THE READER GOES AWAY,
# MYSQL QUITS WORKING.
#
-call mtr.add_suppression("Could not use");
+# MDEV-6870 Not possible to use FIFO file as a general_log file
+#
--let $gen_log_file= $MYSQLTEST_VARDIR/tmp/general_log.fifo
--let $slow_query_log_file= $MYSQLTEST_VARDIR/tmp/slow_log.fifo
@@ -15,10 +16,9 @@ call mtr.add_suppression("Could not use");
--exec mkfifo $gen_log_file
--exec mkfifo $slow_query_log_file
---echo # Case 1: Setting fife file to general_log_file and slow_query_log_file
+--echo # Case 1: Setting fifo file to general_log_file and slow_query_log_file
--echo # system variable.
-# Only regular files can be set to general log. Setting fifo file to general log
-# reports an error.
+# Setting fifo file to general log reports an error because the other end is closed
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_WRONG_VALUE_FOR_VAR
--eval SET GLOBAL general_log_file="$gen_log_file";
@@ -38,11 +38,12 @@ call mtr.add_suppression("Could not use");
--exec echo "restart: --general-log-file=$gen_log_file --slow-query-log-file=$slow_query_log_file" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
-# With fix error should be reported in the error log file if file is not a
-# regular file.
+# Error 6 is reported, because the other end is closed
+call mtr.add_suppression("Could not use .* for logging \\(error 6\\)");
+call mtr.add_suppression("File '.*' not found \\(Errcode: 6 ");
--perl
my $file= $ENV{'GREP_FILE'};
- my $pattern= "Turning logging off for the whole duration";
+ my $pattern= "for logging \\(error 6\\)\\. Turning logging off for the whole duration";
open(FILE, "$file") or die("Unable to open $file: $!\n");
my $count = 0;
while (<FILE>) {
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 4f8736f0c2d..c013938416e 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -849,6 +849,212 @@ update t1 join v3 using (id) set t1.a=0;
drop view v1, v2, v3;
drop table t2, t3, t1;
+--echo #
+--echo # MDEV-7613: MariaDB 5.5.40 server crash on update table left join
+--echo # with a view
+--echo #
+
+CREATE TABLE `t1` (
+ `f1` varchar(6) COLLATE latin1_general_ci DEFAULT NULL,
+ `f2` varchar(6) COLLATE latin1_general_ci DEFAULT NULL,
+ `f3` varchar(7) COLLATE latin1_general_ci DEFAULT NULL,
+ `f4` varchar(15) COLLATE latin1_general_ci DEFAULT NULL,
+ `f5` datetime DEFAULT NULL,
+ `f6` varchar(2) COLLATE latin1_general_ci DEFAULT NULL,
+ `f7` varchar(2) COLLATE latin1_general_ci DEFAULT NULL,
+ `ff1` int(1) DEFAULT NULL,
+ `ff2` int(1) DEFAULT NULL,
+ `ff3` int(1) DEFAULT NULL,
+ `ff4` int(1) DEFAULT NULL,
+ `ff5` int(1) DEFAULT NULL,
+ `ff6` int(1) DEFAULT NULL,
+ `ff7` int(1) DEFAULT NULL,
+ `ff8` int(2) DEFAULT NULL,
+ `ff9` int(1) DEFAULT NULL,
+ `ff10` int(1) DEFAULT NULL,
+ `ff11` int(1) DEFAULT NULL,
+ `ff12` int(1) DEFAULT NULL,
+ `ff13` int(1) DEFAULT NULL,
+ `ff14` int(1) DEFAULT NULL,
+ `ff15` int(1) DEFAULT NULL,
+ `f8` varchar(70) COLLATE latin1_general_ci DEFAULT NULL,
+ `f9` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+ `f10` varchar(50) COLLATE latin1_general_ci NOT NULL,
+ `f11` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f12` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `f13` text COLLATE latin1_general_ci,
+ `f14` time DEFAULT NULL,
+ `f15` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
+ `fg1` int(11) DEFAULT NULL,
+ `fg2` int(11) DEFAULT NULL,
+ `fg3` int(11) DEFAULT NULL,
+ `fg4` int(11) DEFAULT NULL,
+ `fg5` int(11) DEFAULT NULL,
+ `fg6` int(11) DEFAULT NULL,
+ `fg7` int(11) DEFAULT NULL,
+ `fg9` int(11) DEFAULT NULL,
+ `fg10` int(11) DEFAULT NULL,
+ `fg11` int(11) DEFAULT NULL,
+ `fg12` int(11) DEFAULT NULL,
+ `fg13` int(11) DEFAULT NULL,
+ `fg14` int(11) DEFAULT NULL,
+ `fg15` int(11) DEFAULT NULL,
+ `f16` double DEFAULT NULL,
+ `f17` double DEFAULT NULL,
+ `f18` int(11) DEFAULT NULL,
+ `f19` int(11) DEFAULT NULL,
+ `f20` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `f21` int(11) DEFAULT NULL,
+ `f22` int(11) DEFAULT NULL,
+ `f23` int(11) DEFAULT NULL,
+ `f24` double DEFAULT NULL,
+ `f25` int(11) DEFAULT NULL,
+ `f26` double DEFAULT NULL,
+ `f27` int(11) DEFAULT NULL,
+ `f28` int(11) DEFAULT NULL,
+ `f29` double DEFAULT NULL,
+ `f30` int(11) DEFAULT NULL,
+ `f31` double DEFAULT NULL,
+ `PZ` double DEFAULT NULL,
+ `f32` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f33` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f34` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f35` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
+ `f36` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+ `f37` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f20_2` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
+ `f38` varchar(30) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'Email = E-Mail / Whitemail = Brief',
+ `insert_ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`f10`),
+ KEY `f5_f12` (`f5`,`f12`),
+ KEY `f5_f20` (`f5`,`f20`),
+ KEY `f5_f33` (`f5`,`f33`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=COMPACT;
+
+INSERT INTO `t1` VALUES ('2011/2','201105','2011/19','gstfbnfr','2011-05-06
+00:00:00','gg','Ag',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'','','','','','','21:56:28','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,0,0,'Dffgult',1,0,0,NULL,0,NULL,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ggggil',NULL),('2008/4','200812','2008/50','hgckbgfx','2008-12-08
+00:00:00','gg','Ag',2,NULL,2,1,1,1,1,24,1,NULL,1,1,1,2,0,'gusschlifßlich
+zugg
+gflffonifrfn','88.77.79.214','10001614','fg-gtgggggdgtfn','fg-gtgggggdgtfn','birgit.tfrpfllf@gggx.df','11:55:21',NULL,1,0,1,1,1,1,1,1,0,1,1,1,0,0,NULL,NULL,0,4,'ffrtrgg',1,6,10,1.66666666666667,4,1,10,14,1.4,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.',NULL,'ggggil',NULL),('2008/4','200812','2008/51','hgckbgfx','2008-12-15
+00:00:00','gg','Ag',4,5,5,4,5,5,5,NULL,4,5,1,1,1,4,0,'gusschlifßlich zugg
+gflffonifrfn','79.197.185.64','10001686','fg-gtgggggdgtfn','fg-gtgggggdgtfn','kgtjg@swfftys.df','09:28:42',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,11,4.71428571428571,16,1.2,12,49,4.08111111111111,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.',NULL,'ggggil',NULL),('2008/4','200812','2008/50','nufchti','2008-12-08
+00:00:00','gg','Ag',4,1,1,5,5,5,5,12,4,5,1,1,2,1,0,'gusschlifßlich zugg
+gflffonifrfn','89.54.151.216','10001700','fg-gtgggggdgtfn','fg-gtgggggdgtfn','H_K2006@frffnft.df','16:41:45',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,10,4.28571428571429,11,2.6,12,41,1.58111111111111,1,NULL,NULL,'ffrtrgg
+Bgckofficf 5','vb5','Nufchtfr,
+Iris','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','junghdro','2008-12-11
+00:00:00','Do','Ag',2,2,5,5,4,4,2,72,2,5,2,2,1,1,0,'gusschlifßlich zugg
+gflffonifrfn','84.61.20.216','10001849','fg-ggriff','fg-ggriff','schofnf-glftfr@grcor.df','20:18:05',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,24,1.42857142857141,12,2.4,12,16,1,1,NULL,NULL,'ffrtrgg
+Bgckofficf 5','vb5','Junghfinrich,
+Dorothfg','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','fbflktj','2008-12-08
+00:00:00','gg','Ag',4,2,2,5,1,1,1,24,NULL,NULL,NULL,NULL,NULL,0,0,'Kgggfrg
+bzw. DigiCggg
+Funktion','217.84.62.6','10001888','fg-Kündigungfn','fg-Kündigungfn','f.frofschkf@gggx.df','21:05:59',NULL,1,1,1,1,1,1,1,0,0,0,0,0,0,0,NULL,NULL,0,0,'ffrtrgg',1,7,16,2.28571428571429,0,NULL,7,16,2.28571428571429,0,NULL,NULL,'out',NULL,'gbfl,
+Kgtjg','49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL),('2008/4','200812','2008/50','gltggggri','2008-12-09
+00:00:00','Di','Ag',4,1,1,4,2,1,2,16,1,2,2,2,2,2,0,'gusschlifßlich zugg
+gflffonifrfn','81.171.157.211','10001988','fg-gtgggggdgtfn','fg-gtgggggdgtfn','bistfr@nftcolognf.df','11:07:54',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,21,1,11,2.2,12,12,2.66666666666667,1,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL),('2008/4','200812','2008/50','ggufllfsg','2008-12-09
+00:00:00','Di','Ag',2,2,2,2,1,1,2,12,2,2,2,1,1,2,0,'ggobilfs
+Intfrnft','62.154.142.186','10002097','fg-gtgggggdgtfn','fg-gtgggggdgtfn','norbfrtwfdlich@fgggil.df','09:42:11',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,12,1.71428571428571,8,1.6,12,20,1.66666666666667,1,NULL,NULL,'ffrtrgg
+Bgckofficf 1','vb1','Mufllfr,
+ggbinf','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','wggnfg','2008-12-09
+00:00:00','Di','Ag',5,5,5,5,5,5,5,12,5,5,5,5,5,5,0,'gls grsgtz für
+Ffstnftz','85.180.141.246','10002127','fg-Kündigungfn','fg-Kündigungfn','rfinhgrt.gdolph@yghoo.df','17:44:11',NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,NULL,NULL,0,5,'ffrtrgg',1,7,15,5,25,5,12,60,5,1,NULL,NULL,'ffrtrgg
+Bgckofficf 1','vb1','Wggnfr,
+Annftt','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2008/50','schubrbf','2008-12-10
+00:00:00','Mi','Ag',1,2,NULL,2,1,2,1,24,NULL,NULL,NULL,NULL,NULL,0,0,'Kgggfrg
+bzw. DigiCggg
+Funktion','91.40.98.242','10002160','fg-gtgggggdgtfn','fg-gtgggggdgtfn','olgf.lifb@gggx.nft','18:18:25',NULL,1,1,0,1,1,1,1,0,0,0,0,0,0,0,NULL,NULL,0,0,'ffrtrgg',1,6,11,1.81111111111111,0,NULL,6,11,1.81111111111111,0,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL);
+
+CREATE TABLE `t2` (
+ `ft1` datetime DEFAULT NULL,
+ `ft2` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `ft3` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `ft4` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '',
+ `ft5` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '',
+ `ft6` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft6_2` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft7` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft8` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft9` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft10` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
+ PRIMARY KEY (`ft4`,`ft5`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+
+INSERT INTO `t2` VALUES ('2013-03-13 00:00:00','2013-03-13 00:00:00','9999-12-31 00:00:00','#','extern FP f32 2','Default','Intern','DEFAULT',NULL,NULL,NULL),('2013-03-13 00:00:00','2013-03-13 00:00:00','9999-12-31 00:00:00','#','extern FP f32 3','Default','Intern','DEFAULT',NULL,NULL,NULL);
+
+CREATE TABLE `t3` (
+ `fe1` int(10) NOT NULL DEFAULT '0',
+ `fe2` char(50) COLLATE latin1_general_ci DEFAULT 'nn',
+ `f34` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe3` double DEFAULT NULL,
+ `fe4` double DEFAULT NULL,
+ `fe5` char(4) COLLATE latin1_general_ci DEFAULT NULL,
+ `f32` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe6` int(3) DEFAULT '0',
+ `fe7` char(1) COLLATE latin1_general_ci DEFAULT NULL,
+ `ft6` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `f33` char(4) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'virtuelle f33s',
+ `fe8` char(4) COLLATE latin1_general_ci DEFAULT NULL COMMENT 'aus dem ADS',
+ `f37` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe9` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe10` int(5) DEFAULT '0',
+ `fe11` int(10) DEFAULT '0',
+ `fe12` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe13` double DEFAULT NULL,
+ `fe14` char(50) COLLATE latin1_general_ci DEFAULT NULL,
+ `fe15` date DEFAULT NULL,
+ `fe16` date DEFAULT NULL,
+ `fe17` int(10) DEFAULT '0',
+ `fe18` date NOT NULL DEFAULT '0000-00-00',
+ `ft3` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`fe1`),
+ KEY `fe2` (`fe2`,`fe18`,`ft3`),
+ KEY `f33` (`f33`),
+ KEY `fe8` (`fe8`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=COMPACT COMMENT='CustomerService und Outsourcer Userinformationen';
+
+INSERT INTO `t3` VALUES (1,'aabggn','gab, glgna',0,NULL,NULL,'gxtgrn D gnd g
+gggsbgrg',0,NULL,'gxtgrn','dsa','dsa','gggsbgrg','0',91611,0,'0',0,'agsggschigdgn','2014-08-11','2014-09-05',0,'2011-01-01','2014-08-11'),(4,'aabigr','gab,
+Iggr',0,NULL,NULL,'gxtgrn D gnd g
+gggsbgrg',0,NULL,'gxtgrn','dsa','dsa','gggsbgrg','0',0,0,'0',0,'agsggschigdgn','2014-08-11','2014-09-05',0,'2012-10-01','2014-08-11'),(7,'abgcrist','gbg,
+ghristggna',15182,1,'ja','ggshilfg gxtgrn 1',1,NULL,'gg
+galgs','ag1','ag1','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'1900-01-01','2010-06-10'),(8,'abgcrist','gbg,
+ghristggna',15182,1,'ja','Zgntralg gftgr galgs Bgtrgggng 1',1,NULL,'gg
+galgs','sb1','sb1','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'2010-07-01','2012-08-11'),(9,'abgcrist','gbg,
+ghristggna',15182,1,'ja','galgs Inbggnd 2',1,NULL,'gg
+galgs','si2','si2','grfgrt','0',11941,0,'0',0,'agsggschigdgn','2014-01-11',NULL,11802051,'2012-09-01','2014-01-11'),(10,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 1',1,NULL,'gg
+galgs','sg1','sg1','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'1900-01-01','2010-11-10'),(11,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 1',1,NULL,'gg
+galgs','sg1','sg1','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'2010-12-01','2011-08-11'),(12,'abgcgr','gbg,
+ggrnglgg',14962,1,NULL,'galgs Ogtbggnd 2',1,NULL,'gg
+galgs','sg2','sg2','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,NULL,11800647,'2011-09-01','2012-01-11'),(13,'abgcgr','gbg,
+ggrnglgg',14962,0.75,NULL,'galgs Ogtbggnd 2',1,NULL,'gg
+galgs','sg2','sg2','grfgrt','0',12401,0,'abgcrn',1,NULL,NULL,'2011-09-11',11800647,'2012-02-01','2011-08-11'),(14,'rgghrsgr','gbg,
+gigrid',14781,1,'ja','Fgrdgrgngsmanaggmgnt 1',1,NULL,'gg
+Zahlgng','fm1','fm1','grfgrt','0',12141,0,'0',1,NULL,NULL,NULL,11010781,'1900-01-01','2012-08-11');
+
+CREATE ALGORITHM=MERGE
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v1` AS select `t1a`.`ft1` AS `ft1`,`t1a`.`ft2` AS `ft2`,`t1a`.`ft3` AS `ft3`,`t1a`.`ft4` AS `ft4`,`t1a`.`ft5` AS `ft5`,`t1a`.`ft6` AS `ft6`,`t1a`.`ft6_2` AS `ft6_2`,`t1a`.`ft7` AS `ft7`,`t1a`.`ft8` AS `ft8`,`t1a`.`ft9` AS `ft9`,`t1a`.`ft10` AS `ft10` from `t2` `t1a` where (if((`t1a`.`ft10` = 'virtuell'),0,1) = 1);
+
+CREATE ALGORITHM=UNDEFINED
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v2` AS select distinct `t1b`.`fe2` AS `fe2`,min(`t1b`.`fe18`) AS `fe18`,max(`t1b`.`ft3`) AS `ft3` from `t3` `t1b` where ((`t1b`.`fe2` <> '') and (curdate() >= `t1b`.`fe18`)) group by `t1b`.`fe2`;
+
+CREATE ALGORITHM=UNDEFINED
+DEFINER=`root`@`localhost` SQL SECURITY DEFINER
+VIEW `v3` AS select `t1c`.`fe2` AS `fe2`,`t1c`.`f34` AS `f34`,`t1c`.`f33` AS `f33`,`t1c`.`f32` AS `f32`,`t1c`.`f37` AS `f37`,`t1c`.`fe10` AS `fe10`,if((`tov`.`ft6` in ('klarmobil','callmobile')),`tov`.`ft9`,`tov`.`ft6`) AS `ft6_1`,`tov`.`ft6_2` AS `ft6_2`,`ua`.`fe18` AS `fe18`,`ua`.`ft3` AS `ft3` from ((`t3` `t1c` left join `v2` `ua` on((`t1c`.`fe2` = `ua`.`fe2`))) left join `v1` `tov` on((`t1c`.`fe8` = `tov`.`ft4`))) where (`t1c`.`ft3` = `ua`.`ft3`) group by `t1c`.`fe2`,`t1c`.`f34`,`t1c`.`f33`,`t1c`.`f32` order by `t1c`.`f34`;
+
+UPDATE t1 t1 left join v3 t2 on t1.f4 = t2.fe2 SET t1.f20 = t2.ft6_1, t1.f32 = t2.f32, t1.f33 = t2.f33, t1.f37 = t2.f37 WHERE f5 >= '2015-02-01';
+
+--echo #MDEV-8018: main.multi_update fails with --ps-protocol
+prepare stmt1 from "UPDATE t1 t1 left join v3 t2 on t1.f4 = t2.fe2 SET t1.f20 = t2.ft6_1, t1.f32 = t2.f32, t1.f33 = t2.f33, t1.f37 = t2.f37 WHERE f5 >= '2015-02-01'";
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+
+drop view v3,v2,v1;
+drop table t1,t2,t3;
--echo end of 5.5 tests
diff --git a/mysql-test/t/mysql_upgrade_view.test b/mysql-test/t/mysql_upgrade_view.test
new file mode 100644
index 00000000000..3ecf66d70a5
--- /dev/null
+++ b/mysql-test/t/mysql_upgrade_view.test
@@ -0,0 +1,132 @@
+-- source include/have_log_bin.inc
+
+set sql_log_bin=0;
+--disable_warnings
+drop table if exists t1,v1,v2,v3,v4,v1badcheck;
+drop view if exists t1,v1,v2,v3,v4,v1badcheck;
+--enable_warnings
+
+create table t1(a int);
+create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1badcheck.frm $MYSQLD_DATADIR/test/v1badcheck.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v2.frm $MYSQLD_DATADIR/test/v2.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v3.frm $MYSQLD_DATADIR/test/v3.frm
+
+flush tables;
+
+check view v1;
+check view v1badcheck;
+check view v2;
+check view v3;
+
+check view v1 for upgrade;
+check view v1badcheck for upgrade;
+check view v2 for upgrade;
+check view v3 for upgrade;
+
+--replace_result $MYSQLTEST_VARDIR var
+--exec $MYSQL_UPGRADE --force 2>&1
+
+# "Phase 1/4: Fixing views" expected (without from_mysql)
+
+show create view v1;
+show create view v2;
+show create view v3;
+
+# Now force a mariadb version to be added
+
+set sql_log_bin=1;
+REPAIR VIEW v1,v2;
+REPAIR VIEW v1badcheck;
+REPAIR NO_WRITE_TO_BINLOG VIEW v3;
+set sql_log_bin=0;
+
+--source include/show_binlog_events.inc
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA INFILE '$MYSQLD_DATADIR/test/v1.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+SELECT k from kv where k ='mariadb-version';
+truncate table kv;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA INFILE '$MYSQLD_DATADIR/test/v2.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+SELECT k from kv where k ='mariadb-version';
+truncate table kv;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA INFILE '$MYSQLD_DATADIR/test/v3.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+SELECT k from kv where k ='mariadb-version';
+truncate table kv;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA INFILE '$MYSQLD_DATADIR/test/v1badcheck.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+SELECT k from kv where k ='mariadb-version';
+truncate table kv;
+
+--disable_warnings
+drop view if exists v1,v2,v3,v1badcheck;
+--enable_warnings
+
+# Make it look like a MySQL directory now
+
+rename table mysql.event to mysql.ev_bk;
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.MYI $MYSQLD_DATADIR/mysql/event.MYI
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.MYD $MYSQLD_DATADIR/mysql/event.MYD
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/event.frm $MYSQLD_DATADIR/mysql/event.frm
+
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v2.frm $MYSQLD_DATADIR/test/v2.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v3.frm $MYSQLD_DATADIR/test/v3.frm
+
+flush tables;
+
+create algorithm=temptable view v4 as select a from t1;
+show create view v1;
+show create view v2;
+show create view v3;
+show create view v4;
+
+# here we test the fixing views from mysql to occur
+--replace_result $MYSQLTEST_VARDIR var
+--exec $MYSQL_UPGRADE --force 2>&1
+
+show create view v1;
+show create view v2;
+show create view v3;
+show create view v4;
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+eval LOAD DATA INFILE '$MYSQLD_DATADIR/test/v1.frm' REPLACE INTO TABLE kv FIELDS TERMINATED BY '=';
+SELECT k,v from kv where k in ('md5','algorithm');
+SELECT k from kv where k ='mariadb-version';
+truncate table kv;
+
+--disable_warnings
+drop view if exists v1,v2,v3;
+--enable_warnings
+
+# back to mariadb default
+drop table mysql.event;
+rename table mysql.ev_bk to mysql.event;
+
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v2.frm $MYSQLD_DATADIR/test/v2.frm
+--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v3.frm $MYSQLD_DATADIR/test/v3.frm
+
+# check of binlog and mixing tables (with table specific options) and views
+--exec $MYSQL_CHECK --repair --write-binlog --process-tables --use-frm --process-views=UPGRADE_FROM_MYSQL test 2>&1
+
+--source include/show_binlog_events.inc
+
+drop table if exists kv;
+drop view v1,v2,v3,v4;
+drop table t1;
+
diff --git a/mysql-test/t/mysqladmin.test b/mysql-test/t/mysqladmin.test
index c04c8d50f3c..2580db88456 100644
--- a/mysql-test/t/mysqladmin.test
+++ b/mysql-test/t/mysqladmin.test
@@ -45,3 +45,9 @@ EOF
--exec $MYSQLADMIN --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/cnf_file -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT ping 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/cnf_file
+
+#
+# MDEV-7883 Segmentation failure when running mysqladmin -u root -p
+#
+--error 1
+--exec $MYSQLADMIN -u root -p 2>&1 > /dev/null
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index 917a4d509e0..e36f106a5be 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -15,8 +15,8 @@ insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA";
+grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
+grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges;
diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test
index e109f88e3f9..880bbce3d9d 100644
--- a/mysql-test/t/sp-destruct.test
+++ b/mysql-test/t/sp-destruct.test
@@ -278,3 +278,11 @@ DROP DATABASE db1;
--echo # Restore mysql.proc
DROP TABLE mysql.proc;
RENAME TABLE proc_backup TO mysql.proc;
+
+#
+# BUG#19875331 - HANDLE_FATAL_SIGNAL 11 IN STRMAKE
+#
+create database mysqltest1;
+create procedure mysqltest1.foo() select "foo";
+update mysql.proc set name='' where db='mysqltest1';
+drop database mysqltest1;
diff --git a/mysql-test/t/sp-innodb.test b/mysql-test/t/sp-innodb.test
index 228ab42544d..23715166a02 100644
--- a/mysql-test/t/sp-innodb.test
+++ b/mysql-test/t/sp-innodb.test
@@ -43,3 +43,120 @@ CALL p1();
drop procedure p1;
drop table t1,t2;
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo
+--echo #
+--echo # BUG 16041903: CONTINUE HANDLER NOT INVOKED
+--echo # IN A STORED FUNCTION AFTER A LOCK WAIT TIMEOUT
+--echo #
+
+--echo
+--echo # Save and set lock wait timeout
+SET @lock_wait_timeout_saved= @@lock_wait_timeout;
+SET @innodb_lock_wait_timeout_saved= @@innodb_lock_wait_timeout;
+SET @@lock_wait_timeout= 1;
+SET @@innodb_lock_wait_timeout= 1;
+
+--echo
+--echo # Create a function with exit handler:
+DELIMITER //;
+CREATE FUNCTION f1() RETURNS VARCHAR(20)
+BEGIN
+ DECLARE EXIT HANDLER FOR SQLSTATE '42S02' RETURN 'No such table';
+ INSERT INTO no_such_table VALUES (1);
+END//
+
+--echo
+--echo # Create a function calling f1():
+CREATE FUNCTION f2() RETURNS VARCHAR(20)
+BEGIN
+ RETURN f1();
+END//
+
+--echo
+--echo # Create a function provoking deadlock:
+CREATE FUNCTION f3() RETURNS VARCHAR(20)
+BEGIN
+ UPDATE t1 SET i= 1 WHERE i= 1;
+ RETURN 'Will never get here';
+END//
+
+--echo
+--echo # Create a function calling f3, to create
+--echo # a deadlock indirectly:
+CREATE FUNCTION f4() RETURNS VARCHAR(20)
+BEGIN
+ RETURN f3();
+END//
+DELIMITER ;//
+
+--echo
+--echo # Open another connection, create and initialize a table
+--echo # to be used for provoking deadlock, put a lock on the table:
+connect (con1,localhost,root,,);
+CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET AUTOCOMMIT= 0;
+UPDATE t1 SET i=1 WHERE i=1;
+
+--echo
+--echo # On the default connection, do an update to provoke a
+--echo # deadlock, then call the function with handler. This case
+--echo # fails without the patch (with error ER_NO_SUCH_TABLE):
+--connection default
+SET AUTOCOMMIT= 0;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET i=1 WHERE i=1;
+SELECT f1() AS 'f1():';
+
+--echo
+--echo # Provoke another deadlock, then call the function with
+--echo # handler indirectly. This case fails without the patch
+--echo # (with error ER_NO_SUCH_TABLE):
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET i= 1 WHERE i= 1;
+SELECT f2() AS 'f2():';
+
+--echo
+--echo # Provoke yet another deadlock, but now from within a function,
+--echo # then call the function with handler. This succeeds even
+--echo # without the patch because is_fatal_sub_stmt_error is reset
+--echo # in restore_sub_stmt after the failing function has been
+--echo # executed. The test case is included anyway for better coverage:
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT f3() AS 'f3():';
+SELECT f1() AS 'f1():';
+
+--echo # Provoke yet another deadlock, but now from within a function,
+--echo # calling another function, then call the function with handler.
+--echo # This succeeds even without the patch because
+--echo # is_fatal_sub_stmt_error is reset in restore_sub_stmt after
+--echo # the failing function has been executed. The test case is
+--echo # included anyway for better coverage:
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT f4() AS 'f4():';
+SELECT f1() AS 'f1():';
+
+--echo
+--echo # Disconnect, drop functions and table:
+--disconnect con1
+DROP FUNCTION f4;
+DROP FUNCTION f3;
+DROP FUNCTION f2;
+DROP FUNCTION f1;
+DROP TABLE t1;
+
+--echo
+--echo # Reset lock wait timeouts
+SET @@lock_wait_timeout= @lock_wait_timeout_saved;
+SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved;
+
+--echo #
+--echo # BUG 16041903: End of test case
+--echo #
+
+# Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 2c60e5645c3..c989cb22558 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2693,5 +2693,16 @@ SET join_cache_level=@tmp_mdev5059;
set optimizer_switch=@tmp_os_mdev5059;
DROP TABLE t1,t2,t3,t4;
+--echo #
+--echo # MDEV-7911: crash in Item_cond::eval_not_null_tables
+--echo #
+
+create table t1(a int);
+insert into t1 values(1),(2),(3),(null);
+--error ER_CANT_AGGREGATE_2COLLATIONS
+explain
+select 1 from t1 where _cp932 "1" in (select '1' from t1);
+drop table t1;
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test
index a82baf095c1..0bf9c6d9d10 100644
--- a/mysql-test/t/subselect_sj2.test
+++ b/mysql-test/t/subselect_sj2.test
@@ -1320,5 +1320,76 @@ SELECT * FROM t1 WHERE id in (select distinct id_agente from t2);
DROP TABLE t1, t2;
+--echo #
+--echo # MDEV-7474: Semi-Join's DuplicateWeedout strategy skipped for some values of optimizer_search_depth
+--echo #
+
+CREATE TABLE t1 (
+ t1id BIGINT(20) NOT NULL,
+ code VARCHAR(20),
+ PRIMARY KEY (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+ t2id BIGINT(20) NOT NULL,
+ t1idref BIGINT(20) NOT NULL,
+ code VARCHAR(20),
+ PRIMARY KEY (t2id),
+ INDEX FK_T2_T1Id (t1idref),
+ CONSTRAINT FK_T2_T1Id FOREIGN KEY (t1idref) REFERENCES t1 (t1id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+
+CREATE TABLE t3 (
+ t3idref BIGINT(20) NOT NULL,
+ t2idref BIGINT(20) NOT NULL,
+ sequencenumber INT(10) NOT NULL,
+ PRIMARY KEY (t3idref, t2idref),
+ INDEX FK_T3_T2Id (t2idref),
+ CONSTRAINT FK_T3_T2Id FOREIGN KEY (t2idref) REFERENCES t2 (t2id)
+) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
+
+# Load up dummy data (needed to reproduce issue)
+INSERT INTO t1 (t1id) VALUES (100001),(100017),(100018),(100026),(100027),(100028),(100029),(100030),
+(100031),(100032),(100033),(100034),(100035),(100036),(100037),(100038),(100040),(100041),(100042),
+(100043),(100044),(100045),(100046),(100047);
+
+INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
+
+# Now the test Data
+INSERT IGNORE INTO t1 VALUES (200001, 'a');
+INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
+INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+
+set @tmp7474= @@optimizer_search_depth;
+SET SESSION optimizer_search_depth = 1;
+
+let $query=
+SELECT SQL_NO_CACHE
+T2_0_.t1idref,
+T2_0_.t2id
+FROM
+ t2 T2_0_
+WHERE
+ T2_0_.t1idref IN (
+ SELECT
+ T1_1_.t1id
+ FROM
+ t3 T3_0_
+ INNER JOIN
+ t2 T2_1_
+ ON T3_0_.t2idref=T2_1_.t2id
+ INNER JOIN
+ t1 T1_1_
+ ON T2_1_.t1idref=T1_1_.t1id
+ WHERE
+ T3_0_.t3idref= 1
+);
+
+eval $query;
+eval explain $query;
+
+drop table t3,t2,t1;
+set optimizer_search_depth=@tmp7474;
+
--echo # This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
diff --git a/mysql-test/t/table_elim.test b/mysql-test/t/table_elim.test
index 0d42dca57b7..24f48206013 100644
--- a/mysql-test/t/table_elim.test
+++ b/mysql-test/t/table_elim.test
@@ -610,3 +610,34 @@ SELECT t1.alpha3 FROM t1 LEFT JOIN ( t2 LEFT JOIN t3 ON t2.t3_code = t3.code )
DROP TABLE t1, t2, t3;
SET optimizer_switch=@save_optimizer_switch;
+
+--echo #
+--echo # MDEV-7893: table_elimination works wrong with on computed expression and compound unique key
+--echo # (just a testcase)
+CREATE TABLE t1 (
+ PostID int(10) unsigned NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO t1 (PostID) VALUES (1), (2);
+
+CREATE TABLE t2 (
+ VoteID int(10) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ EntityID int(10) unsigned NOT NULL,
+ UserID int(10) unsigned NOT NULL,
+ UNIQUE KEY EntityID (EntityID,UserID)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO t2 (EntityID, UserID) VALUES (1, 30), (2, 30);
+
+SELECT t1.*, T.Voted as Voted
+FROM
+t1 LEFT JOIN (
+ SELECT 1 AS Voted, EntityID
+ FROM t2
+ WHERE t2.UserID = '20' ) AS T
+ ON T.EntityID = t1.PostID
+WHERE t1.PostID='1'
+LIMIT 1;
+
+DROP TABLE t1,t2;
+
diff --git a/mysql-test/t/trigger-trans.test b/mysql-test/t/trigger-trans.test
index 82bee7aa224..c17202055e1 100644
--- a/mysql-test/t/trigger-trans.test
+++ b/mysql-test/t/trigger-trans.test
@@ -2,6 +2,9 @@
# (or just InnoDB storage engine)
--source include/have_innodb.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -182,3 +185,54 @@ insert into t1 values ( 654, 'a'), ( 654, 'b'), ( 654, 'c'),
select * from t2 order by b;
drop trigger t1_after_insert;
drop table t1,t2;
+
+--echo #
+--echo #Bug#19683834 SOME INNODB ERRORS CAUSES STORED FUNCTION
+--echo # AND TRIGGER HANDLERS TO BE IGNORED
+
+--echo #Code fixed in Bug#16041903
+--enable_connect_log
+
+CREATE TABLE t1 (id int unsigned PRIMARY KEY, val int DEFAULT 0)
+ENGINE=InnoDB;
+INSERT INTO t1 (id) VALUES (1), (2);
+
+CREATE TABLE t2 (id int PRIMARY KEY);
+CREATE TABLE t3 LIKE t2;
+
+# Trigger with continue handler for ER_DUP_ENTRY(1062)
+DELIMITER //;
+CREATE TRIGGER bef_insert BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+ DECLARE CONTINUE HANDLER FOR 1062 BEGIN END;
+ INSERT INTO t3 (id) VALUES (NEW.id);
+ INSERT INTO t3 (id) VALUES (NEW.id);
+END//
+DELIMITER ;//
+
+# Transaction 1: Grab locks on t1
+START TRANSACTION;
+UPDATE t1 SET val = val + 1;
+
+# Transaction 2:
+--connect (con2,localhost,root,,test,,)
+SET SESSION innodb_lock_wait_timeout = 2;
+# Trigger lock timeout (1205)
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET val = val + 1;
+
+# This insert should go through, as the continue handler should
+# handle ER_DUP_ENTRY, even after ER_LOCK_WAIT_TIMEOUT (Bug#16041903)
+INSERT INTO t2 (id) VALUES (1);
+
+# Cleanup
+disconnect con2;
+--source include/wait_until_disconnected.inc
+connection default;
+
+DROP TABLE t3, t2, t1;
+
+--disable_connect_log
+
+# Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/uniques_crash-7912.test b/mysql-test/t/uniques_crash-7912.test
new file mode 100644
index 00000000000..8dc82f8f540
--- /dev/null
+++ b/mysql-test/t/uniques_crash-7912.test
@@ -0,0 +1,26 @@
+#
+# MDEV-7912
+#
+# multitable delete with wrongly set sort_buffer_size crashes in merge_buffers
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/windows.inc
+
+call mtr.add_suppression("Out of memory");
+
+set sql_mode="";
+--disable_warnings
+drop table if exists t1,t2;
+create table `t1` (`a` datetime not null) engine=InnoDB;
+create table `t2` (`a` int not null) engine=innodb;
+replace into t1 values (),();
+insert into t2 values(0);
+set session sort_buffer_size = 1024*1024*1024*1024;
+#Either fail with EE_OUTOFMEMORY, or succeed
+--error 0 , 5
+delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a;
+--enable_warnings
+
+drop table t2;
+drop table t1;