summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
commitd3e2e1243bb0dae95ce35b0380dd4f8f476b254d (patch)
tree8779ad6b2059f181770cc07e2437925d7d5d5d04 /mysql-test
parent229dad1f9b12f8e9f64b6a605bdf8e31c339d018 (diff)
parent124428a9e28e59f98b25d8ee07b57d264f63cbe4 (diff)
downloadmariadb-git-d3e2e1243bb0dae95ce35b0380dd4f8f476b254d.tar.gz
5.5 merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/ctype_common.inc8
-rw-r--r--mysql-test/include/ctype_numconv.inc11
-rw-r--r--mysql-test/include/default_my.cnf1
-rw-r--r--mysql-test/include/have_perfschema.inc1
-rw-r--r--mysql-test/lib/mtr_match.pm1
-rwxr-xr-xmysql-test/mysql-test-run.pl38
-rw-r--r--mysql-test/purify.supp1
-rw-r--r--mysql-test/r/alter_table_trans.result8
-rw-r--r--mysql-test/r/ctype_big5.result9
-rw-r--r--mysql-test/r/ctype_binary.result17
-rw-r--r--mysql-test/r/ctype_cp1250_ch.result18
-rw-r--r--mysql-test/r/ctype_cp1251.result27
-rw-r--r--mysql-test/r/ctype_euckr.result9
-rw-r--r--mysql-test/r/ctype_gb2312.result9
-rw-r--r--mysql-test/r/ctype_gbk.result9
-rw-r--r--mysql-test/r/ctype_latin1.result119
-rw-r--r--mysql-test/r/ctype_uca.result9
-rw-r--r--mysql-test/r/ctype_ucs.result26
-rw-r--r--mysql-test/r/ctype_ucs2_query_cache.result6
-rw-r--r--mysql-test/r/ctype_utf16_uca.result9
-rw-r--r--mysql-test/r/ctype_utf32_uca.result9
-rw-r--r--mysql-test/r/ctype_utf8.result17
-rw-r--r--mysql-test/r/fulltext.result45
-rw-r--r--mysql-test/r/func_str.result31
-rw-r--r--mysql-test/r/group_by.result9
-rw-r--r--mysql-test/r/having.result29
-rw-r--r--mysql-test/r/multi_update.result29
-rw-r--r--mysql-test/r/mysqldump.result4
-rw-r--r--mysql-test/r/parser.result25
-rw-r--r--mysql-test/r/plugin.result7
-rw-r--r--mysql-test/r/subselect.result8
-rw-r--r--mysql-test/r/subselect_exists_to_in.result8
-rw-r--r--mysql-test/r/subselect_no_mat.result8
-rw-r--r--mysql-test/r/subselect_no_opts.result8
-rw-r--r--mysql-test/r/subselect_no_scache.result8
-rw-r--r--mysql-test/r/subselect_no_semijoin.result8
-rw-r--r--mysql-test/r/type_date.result44
-rw-r--r--mysql-test/r/type_datetime.result38
-rw-r--r--mysql-test/r/view.result36
-rw-r--r--mysql-test/r/xml.result20
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result9
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result9
-rw-r--r--mysql-test/suite/funcs_1/datadict/processlist_val.inc4
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result30
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_ps.result30
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_no_prot.result12
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_ps.result12
-rw-r--r--mysql-test/suite/heap/heap.result8
-rw-r--r--mysql-test/suite/heap/heap.test17
-rw-r--r--mysql-test/suite/innodb/r/blob-update-debug.result15
-rw-r--r--mysql-test/suite/innodb/r/create-index.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb-changed-pages.result72
-rw-r--r--mysql-test/suite/innodb/r/innodb-update-insert.result43
-rw-r--r--mysql-test/suite/innodb/t/blob-update-debug.test17
-rw-r--r--mysql-test/suite/innodb/t/create-index.test11
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test18
-rw-r--r--mysql-test/suite/innodb/t/innodb-changed-pages-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-changed-pages.test63
-rw-r--r--mysql-test/suite/innodb/t/innodb-update-insert.test38
-rw-r--r--mysql-test/suite/parts/r/partition_mdev6067.result38
-rw-r--r--mysql-test/suite/parts/t/partition_mdev6067.test32
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result251
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_function.result4
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_procedure.result4
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result1
-rw-r--r--mysql-test/suite/perfschema_stress/README1
-rw-r--r--mysql-test/suite/plugins/r/sql_error_log.result2
-rw-r--r--mysql-test/suite/plugins/t/sql_error_log.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_file_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result30
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/t/general_log_file_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test2
-rw-r--r--mysql-test/t/alter_table_trans.test12
-rw-r--r--mysql-test/t/ctype_cp1251.test8
-rw-r--r--mysql-test/t/ctype_latin1.test4
-rw-r--r--mysql-test/t/ctype_ucs2_query_cache.test1
-rw-r--r--mysql-test/t/fulltext.test43
-rw-r--r--mysql-test/t/func_str.test28
-rw-r--r--mysql-test/t/group_by.test13
-rw-r--r--mysql-test/t/having.test36
-rw-r--r--mysql-test/t/multi_update.test41
-rw-r--r--mysql-test/t/mysql_upgrade.test1
-rw-r--r--mysql-test/t/mysqldump.test15
-rw-r--r--mysql-test/t/parser.test25
-rw-r--r--mysql-test/t/plugin.test3
-rw-r--r--mysql-test/t/subselect.test6
-rw-r--r--mysql-test/t/type_date.test29
-rw-r--r--mysql-test/t/type_datetime.test30
-rw-r--r--mysql-test/t/view.test34
-rw-r--r--mysql-test/t/xml.test14
94 files changed, 1706 insertions, 205 deletions
diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index 7d92c3c7b8f..4cb04599679 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -64,6 +64,14 @@ select a sounds like a from t1;
select 1 from t1 order by cast(a as char(1));
drop table t1;
+--echo #
+--echo # MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+--echo #
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+
#
# Bug#27580 SPACE() function collation bug?
#
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index a6b5c820783..9e59f54a8b3 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -1818,6 +1818,17 @@ SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY
DROP FUNCTION f1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-5702 Incorrect results are returned with NULLIF()
+--echo #
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+
+
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
diff --git a/mysql-test/include/default_my.cnf b/mysql-test/include/default_my.cnf
index ef7e9f60dd7..6b0493cdb08 100644
--- a/mysql-test/include/default_my.cnf
+++ b/mysql-test/include/default_my.cnf
@@ -1,4 +1,5 @@
# Copyright (c) 2007 MySQL AB, 2009, 2010 Sun Microsystems, Inc.
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/include/have_perfschema.inc b/mysql-test/include/have_perfschema.inc
index 6b558e07c20..d932ce0f9bd 100644
--- a/mysql-test/include/have_perfschema.inc
+++ b/mysql-test/include/have_perfschema.inc
@@ -1,4 +1,5 @@
# Copyright (C) 2010 Sun Microsystems, Inc.
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/mtr_match.pm b/mysql-test/lib/mtr_match.pm
index 6fc9832ac43..140885b6273 100644
--- a/mysql-test/lib/mtr_match.pm
+++ b/mysql-test/lib/mtr_match.pm
@@ -1,5 +1,6 @@
# -*- cperl -*-
# Copyright (C) 2004-2008 MySQL AB
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 8a51846317f..75cb0154153 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1,8 +1,8 @@
#!/usr/bin/perl
# -*- cperl -*-
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates.
-# Copyright (c) 2009, 2013, Monty Program Ab
+# Copyright (c) 2004, 2014, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2014, Monty Program Ab
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -481,7 +481,6 @@ sub main {
);
mtr_error("Could not create testcase server port: $!") unless $server;
my $server_port = $server->sockport();
- mtr_report("Using server port $server_port");
if ($opt_resfile) {
resfile_init("$opt_vardir/mtr-results.txt");
@@ -525,15 +524,17 @@ sub main {
# Send Ctrl-C to any children still running
kill("INT", keys(%children));
- # Wait for childs to exit
- foreach my $pid (keys %children)
- {
- my $ret_pid= waitpid($pid, 0);
- if ($ret_pid != $pid){
- mtr_report("Unknown process $ret_pid exited");
- }
- else {
- delete $children{$ret_pid};
+ if (!IS_WINDOWS) {
+ # Wait for children to exit
+ foreach my $pid (keys %children)
+ {
+ my $ret_pid= waitpid($pid, 0);
+ if ($ret_pid != $pid){
+ mtr_report("Unknown process $ret_pid exited");
+ }
+ else {
+ delete $children{$ret_pid};
+ }
}
}
@@ -1871,22 +1872,9 @@ sub collect_mysqld_features {
mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
mtr_add_arg($args, "--skip-grant-tables");
mtr_add_arg($args, "--log-warnings=0");
- for (@opt_extra_mysqld_opt) {
- mtr_add_arg($args, $_) unless /^--binlog-format\b/;
- }
- my $euid= $>;
- if (!IS_WINDOWS and $euid == 0) {
- mtr_add_arg($args, "--user=root");
- }
mtr_add_arg($args, "--verbose");
mtr_add_arg($args, "--help");
- # Need --user=root if running as *nix root user
- if (!IS_WINDOWS and $> == 0)
- {
- mtr_add_arg($args, "--user=root");
- }
-
my $exe_mysqld= find_mysqld($bindir);
my $cmd= join(" ", $exe_mysqld, @$args);
diff --git a/mysql-test/purify.supp b/mysql-test/purify.supp
index 230dae20140..0bb31d00277 100644
--- a/mysql-test/purify.supp
+++ b/mysql-test/purify.supp
@@ -1,4 +1,5 @@
# Copyright (C) 2005, 2007 MySQL AB
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
diff --git a/mysql-test/r/alter_table_trans.result b/mysql-test/r/alter_table_trans.result
index a2547708ada..eaae2039d4c 100644
--- a/mysql-test/r/alter_table_trans.result
+++ b/mysql-test/r/alter_table_trans.result
@@ -16,3 +16,11 @@ insert t1 values (repeat('3', 8193),3,1,1);
ALTER TABLE t1 ADD PRIMARY KEY (col4(10)) , ADD UNIQUE KEY uidx (col3);
ERROR 23000: Duplicate entry '1' for key 'uidx'
DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE = InnoDB;
+INSERT INTO t1 VALUES (2);
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+ALTER TABLE t1 DROP PRIMARY KEY;
+INSERT INTO t1 VALUES (2);
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+DROP TABLE t1;
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index bff5b5a250e..48bc1dab3a7 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -71,6 +71,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+big5_chinese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index 3dfcaf18120..550c47ccdaa 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -2886,6 +2886,23 @@ f1()
00:00:01
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-5702 Incorrect results are returned with NULLIF()
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+d CAST(d AS CHAR) bad good
+1999-11-11 1999-11-11 1999-11-11 1999-11-11
+2014-02-04 2014-02-04 2014-02-04 2014-02-04
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` date DEFAULT NULL,
+ `bad` varbinary(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result
index cb2122020b2..063cec289ab 100644
--- a/mysql-test/r/ctype_cp1250_ch.result
+++ b/mysql-test/r/ctype_cp1250_ch.result
@@ -75,6 +75,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+cp1250_general_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
@@ -168,6 +177,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+cp1250_czech_cs .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 7030a77b6b2..f7952a18f58 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -3278,6 +3278,23 @@ f1()
00:00:01
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-5702 Incorrect results are returned with NULLIF()
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+d CAST(d AS CHAR) bad good
+1999-11-11 1999-11-11 1999-11-11 1999-11-11
+2014-02-04 2014-02-04 2014-02-04 2014-02-04
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` date DEFAULT NULL,
+ `bad` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
@@ -3303,5 +3320,15 @@ SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
COALESCE(IF(test1=1, NULL, 1), test2)
DROP TABLE t1;
#
+# MDEV-5459 Illegal mix of collations for datetime
+#
+SET NAMES cp1251;
+CREATE TABLE t1 (dt DATETIME);
+INSERT INTO t1 VALUES ('2014-01-02 10:20:30');
+SELECT date(dt) FROM t1 WHERE (CASE WHEN 1 THEN date(dt) ELSE null END >= '2013-12-01 00:00:00');
+date(dt)
+2014-01-02
+DROP TABLE t1;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 92553aa4de6..dcb68cfe60b 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -71,6 +71,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+euckr_korean_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index af220466b9b..1ab177e72c7 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -71,6 +71,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+gb2312_chinese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
index f4d0136a34f..fd4941f9146 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -71,6 +71,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+gbk_chinese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index d21570fb05f..8beb60c368b 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -308,6 +308,108 @@ select 'a' regexp 'A' collate latin1_general_cs;
select 'a' regexp 'A' collate latin1_bin;
'a' regexp 'A' collate latin1_bin
0
+SET @test_character_set= 'latin1';
+SET @test_collation= 'latin1_swedish_ci';
+SET @safe_character_set_server= @@character_set_server;
+SET @safe_collation_server= @@collation_server;
+SET @safe_character_set_client= @@character_set_client;
+SET @safe_character_set_results= @@character_set_results;
+SET character_set_server= @test_character_set;
+SET collation_server= @test_collation;
+CREATE DATABASE d1;
+USE d1;
+CREATE TABLE t1 (c CHAR(10), KEY(c));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c char(10) latin1_swedish_ci YES MUL NULL
+INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
+SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
+want3results
+aaa
+aaaa
+aaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c1 varchar(15) latin1_swedish_ci YES MUL NULL
+INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
+SELECT c1 as want3results from t1 where c1 like 'l%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want3results from t1 where c1 like 'lo%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want1result from t1 where c1 like 'loc%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'loca%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locat%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locati%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locatio%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'location%';
+want1result
+location
+DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+latin1_swedish_ci .wwwmysqlcom
+set names utf8;
+create table t1 (
+name varchar(10),
+level smallint unsigned);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `name` varchar(10) DEFAULT NULL,
+ `level` smallint(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('string',1);
+select concat(name,space(level)), concat(name, repeat(' ',level)) from t1;
+concat(name,space(level)) concat(name, repeat(' ',level))
+string string
+drop table t1;
+DROP DATABASE d1;
+USE test;
+SET character_set_server= @safe_character_set_server;
+SET collation_server= @safe_collation_server;
+SET character_set_client= @safe_character_set_client;
+SET character_set_results= @safe_character_set_results;
SET collation_connection='latin1_swedish_ci';
create table t1 select repeat('a',4000) a;
delete from t1;
@@ -3460,6 +3562,23 @@ f1()
00:00:01
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-5702 Incorrect results are returned with NULLIF()
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+d CAST(d AS CHAR) bad good
+1999-11-11 1999-11-11 1999-11-11 1999-11-11
+2014-02-04 2014-02-04 2014-02-04 2014-02-04
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` date DEFAULT NULL,
+ `bad` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index c14ad3e0db3..c947689ef81 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -5841,6 +5841,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+utf8_swedish_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index e36f783196e..492c9877917 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -71,6 +71,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+ucs2_general_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
@@ -4460,6 +4469,23 @@ f1()
00:00:01
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-5702 Incorrect results are returned with NULLIF()
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+d CAST(d AS CHAR) bad good
+1999-11-11 1999-11-11 1999-11-11 1999-11-11
+2014-02-04 2014-02-04 2014-02-04 2014-02-04
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` date DEFAULT NULL,
+ `bad` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
diff --git a/mysql-test/r/ctype_ucs2_query_cache.result b/mysql-test/r/ctype_ucs2_query_cache.result
index c5f1ef5918d..6f26bed02da 100644
--- a/mysql-test/r/ctype_ucs2_query_cache.result
+++ b/mysql-test/r/ctype_ucs2_query_cache.result
@@ -13,6 +13,12 @@ a
2
3
4
+SELECT * FROM t1;
+a
+1
+2
+3
+4
DROP TABLE t1;
#
# End of 5.5 tests
diff --git a/mysql-test/r/ctype_utf16_uca.result b/mysql-test/r/ctype_utf16_uca.result
index a59d3dc07ff..e3ba73a9047 100644
--- a/mysql-test/r/ctype_utf16_uca.result
+++ b/mysql-test/r/ctype_utf16_uca.result
@@ -2826,6 +2826,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+utf16_swedish_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result
index b77283f1ddb..d2032d401df 100644
--- a/mysql-test/r/ctype_utf32_uca.result
+++ b/mysql-test/r/ctype_utf32_uca.result
@@ -2826,6 +2826,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+utf32_swedish_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index b16d98a7a19..a8aa4595ab4 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -5337,6 +5337,23 @@ f1()
00:00:01
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-5702 Incorrect results are returned with NULLIF()
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1999-11-11'),('2014-02-04');
+SELECT DISTINCT d, CAST(d AS CHAR), NULLIF(d,"2000-01-01") AS bad, NULLIF(CAST(d AS CHAR),"2000-01-01") AS good FROM t1;
+d CAST(d AS CHAR) bad good
+1999-11-11 1999-11-11 1999-11-11 1999-11-11
+2014-02-04 2014-02-04 2014-02-04 2014-02-04
+CREATE TABLE t2 AS SELECT DISTINCT d, NULLIF(d,'2000-01-01') AS bad FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` date DEFAULT NULL,
+ `bad` varchar(10) CHARACTER SET utf8 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
SET NAMES latin1;
SET sql_mode='';
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index e6abd44c267..43f77629014 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -699,6 +699,51 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.1 tests
+#
+# Start of 5.5 tests
+#
+#
+# MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
+#
+SET NAMES utf8;
+CREATE TABLE t1
+(
+txt text COLLATE utf8_unicode_ci NOT NULL,
+uid int(11) NOT NULL,
+id2 int(11) NOT NULL,
+KEY uid (uid),
+KEY id2 (id2)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+INSERT INTO t1 VALUES ('txt1',1234,5678);
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('txt1' IN BOOLEAN MODE);
+txt uid id2
+txt1 1234 5678
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('1234' IN BOOLEAN MODE);
+txt uid id2
+txt1 1234 5678
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('5678' IN BOOLEAN MODE);
+txt uid id2
+txt1 1234 5678
+DROP TABLE t1;
+CREATE TABLE t1 (
+txt1 text COLLATE utf8_unicode_ci NOT NULL,
+txt2 text COLLATE latin1_swedish_ci NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+INSERT INTO t1 VALUES ('nnn1 x1 y1 ööö1','mmm1 ùùù1');
+INSERT INTO t1 VALUES ('nnn2 x2 y2 ööö2','mmm2 ùùù2');
+INSERT INTO t1 VALUES ('nnn3 x3 y3 ööö3','mmm3 ùùù3');
+INSERT INTO t1 VALUES ('nnn4 x4 y4 ööö4','mmm4 ùùù4');
+INSERT INTO t1 VALUES ('nnn5 x5 y5 ööö5','mmm5 ');
+SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ööö1' IN BOOLEAN MODE);
+txt1 txt2
+nnn1 x1 y1 ööö1 mmm1 ùùù1
+SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ùùù2' IN BOOLEAN MODE);
+txt1 txt2
+nnn2 x2 y2 ööö2 mmm2 ùùù2
+DROP TABLE t1;
+#
+# End of 5.5 tests
+#
CREATE TABLE t1 (
id int(11) auto_increment,
title varchar(100) default '',
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index c9d7b6636c4..2f820dfc0a9 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -119,7 +119,7 @@ substring_index('aaaaaaaaa1','aaa',-3)
aaaaaa1
select substring_index('aaaaaaaaa1','aaa',-4);
substring_index('aaaaaaaaa1','aaa',-4)
-
+aaaaaaaaa1
select substring_index('the king of thethe hill','the',-2);
substring_index('the king of thethe hill','the',-2)
the hill
@@ -2659,6 +2659,35 @@ NULL NULL
8
drop table t1;
End of 5.1 tests
+#
+# Start of 5.3 tests
+#
+#
+# Bug#11829861: SUBSTRING_INDEX() RESULTS IN MISSING CHARACTERS WHEN USED
+# INSIDE LOWER()
+#
+SET @user_at_host = 'root@mytinyhost-PC.local';
+SELECT LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1));
+LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1))
+mytinyhost-pc.local
+# End of test BUG#11829861
+#
+# Bug#42404: SUBSTRING_INDEX() RESULTS ARE INCONSISTENT
+#
+CREATE TABLE t (i INT NOT NULL, c CHAR(255) NOT NULL);
+INSERT INTO t VALUES (0,'.www.mysql.com'),(1,'.wwwmysqlcom');
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t WHERE i = 1;
+i SUBSTRING_INDEX(c, '.', -2)
+1 .wwwmysqlcom
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t;
+i SUBSTRING_INDEX(c, '.', -2)
+0 mysql.com
+1 .wwwmysqlcom
+DROP TABLE t;
+# End of test BUG#42404
+#
+# End of 5.3 tests
+#
Start of 5.4 tests
SELECT format(12345678901234567890.123, 3);
format(12345678901234567890.123, 3)
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 9b86ccd264e..643849f36ed 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2474,6 +2474,15 @@ v 2v,2v
NULL 1c,2v,2v
DROP TABLE t1,t2;
#
+# MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
+#
+SET sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 AS test UNION SELECT 2 AS test ORDER BY test IS NULL ASC;
+test
+1
+2
+SET sql_mode='';
+#
# Bug #58782
# Missing rows with SELECT .. WHERE .. IN subquery
# with full GROUP BY and no aggr
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 1f09ba6cef5..99cc5d484bd 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -638,6 +638,35 @@ set optimizer_switch=@save_optimizer_switch;
drop table t1,t2,t3;
End of 5.2 tests
#
+# Bug mdev-6116: an equality in the conjunction of HAVING
+# and IN subquery in WHERE
+# (The bug is caused by the same problem as bug mdev-5927)
+#
+CREATE TABLE t1 (f_key varchar(1), f_nokey varchar(1), INDEX(f_key));
+INSERT INTO t1 VALUES ('v','v'),('s','s');
+CREATE TABLE t2 (f_int int, f_key varchar(1), INDEX(f_key));
+INSERT INTO t2 VALUES
+(4,'j'),(6,'v'),(3,'c'),(5,'m'),(3,'d'),(2,'d'),(2,'y'),
+(9,'t'),(3,'d'),(8,'s'),(1,'r'),(8,'m'),(8,'b'),(5,'x');
+SELECT t2.f_int FROM t1 INNER JOIN t2 ON (t2.f_key = t1.f_nokey)
+WHERE t1.f_nokey IN (
+SELECT t1.f_key FROM t1, t2 WHERE t1.f_key = t2.f_key
+) HAVING t2.f_int >= 0 AND t2.f_int != 0;
+f_int
+6
+8
+DROP TABLE t1,t2;
+#
+# Bug mdev-5927: an equality in the conjunction of HAVING
+# and an equality in WHERE
+#
+CREATE TABLE t1 (pk int PRIMARY KEY, f int NOT NULL, INDEX(f));
+INSERT INTO t1 VALUES (1,0), (2,8);
+SELECT * FROM t1 WHERE f = 2 HAVING ( pk IN ( SELECT 9 ) AND f != 0 );
+pk f
+DROP TABLE t1;
+End of 5.3 tests
+#
# 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/multi_update.result b/mysql-test/r/multi_update.result
index 7fa9620f0e6..f701e7fa085 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -794,6 +794,35 @@ SELECT * FROM t2;
col_int_key pk_1 pk_2 col_int
1 7 11 4
DROP TABLE t1,t2;
+#
+# MDEV-6139: UPDATE w/ join against MRG_MyISAM table with read-only
+# sub-table fails
+# MDEV-6193: Problems with multi-table updates that JOIN against
+# read-only table
+#
+CREATE TABLE t1 (
+id int(10) unsigned,
+a int(11)
+) ENGINE=MyISAM;
+CREATE TABLE t3 (
+id int(10) unsigned,
+b int(11)
+) ENGINE=MyISAM;
+CREATE TABLE t2 (
+id int(10) unsigned,
+b int(11)
+) ENGINE=MRG_MyISAM UNION=(t3);
+FLUSH TABLES;
+update t1 join t2 using (id) set t1.a=t2.b;
+create view v2 as select * from t2;
+update t1 join v2 using (id) set t1.a=0;
+create view v1 as select * from t3;
+update t1 join v1 using (id) set t1.a=0;
+update t1 join INFORMATION_SCHEMA.CHARACTER_SETS on (id=MAXLEN) set t1.a=0;
+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;
end of 5.5 tests
# Bug mdev-5970
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 9dedbd1d133..4b0b3faf629 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -5286,3 +5286,7 @@ drop table t1, t2;
#
# End of 5.1 tests
#
+Usage: mysqldump [OPTIONS] database [tables]
+OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
+OR mysqldump [OPTIONS] --all-databases [OPTIONS]
+For more options, use mysqldump --help
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index e81eea6e887..5b0fbbcbe87 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -618,3 +618,28 @@ DROP TABLE t1, t2, t3;
#
# End of 5.1 tests
#
+#
+# Bug#17075846 : unquoted file names for variable values are
+# accepted but parsed incorrectly
+#
+SET default_storage_engine=a.myisam;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET default_storage_engine = .a.MyISAM;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET default_storage_engine = a.b.MyISAM;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET default_storage_engine = `a`.MyISAM;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+SET default_storage_engine = `a`.`MyISAM`;
+ERROR 42000: Incorrect argument type to variable 'default_storage_engine'
+set default_storage_engine = "a.MYISAM";
+ERROR 42000: Unknown storage engine 'a.MYISAM'
+set default_storage_engine = 'a.MYISAM';
+ERROR 42000: Unknown storage engine 'a.MYISAM'
+set default_storage_engine = `a.MYISAM`;
+ERROR 42000: Unknown storage engine 'a.MYISAM'
+CREATE TABLE t1 (s VARCHAR(100));
+CREATE TRIGGER trigger1 BEFORE INSERT ON t1 FOR EACH ROW
+SET default_storage_engine = NEW.INNODB;
+ERROR 42S22: Unknown column 'INNODB' in 'NEW'
+DROP TABLE t1;
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 54693eaee56..630f0141d18 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -42,16 +42,21 @@ SELECT * FROM t1;
a
set global example_ulong_var=500;
set global example_enum_var= e1;
+set session example_int_var= -1;
show status like 'example%';
Variable_name Value
-Example_func_example enum_var is 0, ulong_var is 500, double_var is 8.500000, really
+Example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really
show variables like 'example%';
Variable_name Value
example_double_thdvar 8.500000
example_double_var 8.500000
example_enum_var e1
+example_int_var -1
example_ulong_var 500
example_varopt_default 5
+select @@session.example_int_var;
+@@session.example_int_var
+-1
UNINSTALL SONAME 'ha_example';
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 4cc3cd4a85f..c1c35e0e3ec 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -7007,3 +7007,11 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
diff --git a/mysql-test/r/subselect_exists_to_in.result b/mysql-test/r/subselect_exists_to_in.result
index e4577cf9b52..641cfc29e84 100644
--- a/mysql-test/r/subselect_exists_to_in.result
+++ b/mysql-test/r/subselect_exists_to_in.result
@@ -7015,6 +7015,14 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
set optimizer_switch=default;
select @@optimizer_switch like '%exists_to_in=on%';
@@optimizer_switch like '%exists_to_in=on%'
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index a1ad1558f31..d59f6f3524d 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -7004,6 +7004,14 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 28a72a52daa..df18343c6d6 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -7002,4 +7002,12 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index ea11c39ab65..e36994e0534 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -7013,6 +7013,14 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
set optimizer_switch=default;
select @@optimizer_switch like '%subquery_cache=on%';
@@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index 8cf6e6f7d9f..69922a5fe5f 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -7002,5 +7002,13 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t1 index a a 5 NULL 2 Using where; Using index
2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index
DROP TABLE t1,t2;
+#
+# MDEV-5991: crash in Item_field::used_tables
+#
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+exists(select 1 from t1 group by `c` in (select `c` from t1))
+0
+drop table t1;
set @optimizer_switch_for_subselect_test=null;
set @join_cache_level_for_subselect_test=NULL;
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index e23c8640dfc..398f7b83bc9 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -347,6 +347,50 @@ Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
+#
+# MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
+#
+SELECT CAST(TIME('-800:20:30') AS DATE);
+CAST(TIME('-800:20:30') AS DATE)
+2013-07-16
+SELECT CAST(TIME('800:20:30') AS DATE);
+CAST(TIME('800:20:30') AS DATE)
+2013-09-21
+SELECT CAST(TIME('33 08:20:30') AS DATE);
+CAST(TIME('33 08:20:30') AS DATE)
+2013-09-21
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (TIME('800:20:30'));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t1 VALUES (TIME('33 08:20:30'));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SET SQL_MODE=NO_ZERO_IN_DATE;
+INSERT INTO t1 VALUES (TIME('48:20:30'));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SET SQL_MODE=DEFAULT;
+SELECT * FROM t1;
+a
+2013-09-21
+2013-09-21
+2013-08-21
+DROP TABLE t1;
+CREATE PROCEDURE test5041()
+BEGIN
+DECLARE t TIME;
+DECLARE d DATE;
+SET t= TIME('800:00:00');
+SET d= t;
+SELECT d;
+END;|
+call test5041();
+d
+2013-09-21
+Warnings:
+Note 1265 Data truncated for column 'd' at row 1
+drop procedure test5041;
SET @@timestamp=DEFAULT;
#
# End of 5.3 tests
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index c508bc310e1..5e5b37f480a 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -684,6 +684,44 @@ CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00'
+#
+# MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
+#
+SET @@timestamp=UNIX_TIMESTAMP('2013-08-19 20:30:00');
+SELECT CAST(TIME('-800:20:30') AS DATETIME);
+CAST(TIME('-800:20:30') AS DATETIME)
+2013-07-16 15:39:30
+SELECT CAST(TIME('800:20:30') AS DATETIME);
+CAST(TIME('800:20:30') AS DATETIME)
+2013-09-21 08:20:30
+SELECT CAST(TIME('33 08:20:30') AS DATETIME);
+CAST(TIME('33 08:20:30') AS DATETIME)
+2013-09-21 08:20:30
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES (TIME('800:20:30'));
+INSERT INTO t1 VALUES (TIME('33 08:20:30'));
+SET SQL_MODE=NO_ZERO_IN_DATE;
+INSERT INTO t1 VALUES (TIME('48:20:30'));
+SET SQL_MODE=DEFAULT;
+SELECT * FROM t1;
+a
+2013-09-21 08:20:30
+2013-09-21 08:20:30
+2013-08-21 00:20:30
+DROP TABLE t1;
+CREATE PROCEDURE test5041()
+BEGIN
+DECLARE t TIME;
+DECLARE dt DATETIME;
+SET t= TIME('800:20:30');
+SET dt= t;
+SELECT dt;
+END;|
+call test5041();
+dt
+2013-09-21 08:20:30
+drop procedure test5041;
+SET @@timestamp=DEFAULT;
End of 5.3 tests
#
# Start of 5.5 tests
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index a382cb86869..1ea30658561 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -846,6 +846,24 @@ Warnings:
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
drop view v1;
drop table t1;
+create table t1 (a varchar(20));
+create view v1 as select a from t1;
+alter table t1 change a aa int;
+select * from v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+show table status;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
+v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+Warnings:
+Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+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 `test`.`t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
+Warnings:
+Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+drop view v1;
+drop table t1;
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
show create view v1;
View Create View character_set_client collation_connection
@@ -5016,6 +5034,24 @@ id test
1 0
drop view v1;
drop table t1;
+#
+# MDEV-5981: name resolution issues with views and multi-update
+# in ps-protocol
+#
+create table t1 (id1 int primary key, val1 varchar(20));
+insert into t1 values (1, 'test1');
+create table t2 (id2 int primary key, val2 varchar(20));
+insert into t2 values (1, 'test2');
+create algorithm=merge view v1 as select id1 as id1v1, val1 as val1v1 from t1;
+create algorithm=merge view v2 as
+select t2.id2 as id2v2, t2.val2 as val2v2
+from t2, v1
+where t2.id2 = v1.id1v1;
+prepare stmt1 from "update v2 set val2v2 = 'test19' where 1 = id2v2";
+execute stmt1;
+deallocate prepare stmt1;
+drop view v1,v2;
+drop table t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result
index 05c0db6e3cf..24b95f0e204 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -132,7 +132,7 @@ xb1 xc1
SELECT extractValue(@xml,'/a//@x[2]');
extractValue(@xml,'/a//@x[2]')
xb2 xc2
-SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</c></b></a>';
+SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</b></c></a>';
SELECT extractValue(@xml,'//b[1]');
extractValue(@xml,'//b[1]')
b1 c1b1 c2b1
@@ -1134,6 +1134,24 @@ Warnings:
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 11: STRING unexpected (ident or '/' wanted)'
End of 5.1 tests
#
+# Start of 5.3 tests
+#
+#
+# MDEV-5338 XML parser accepts malformed data
+#
+SELECT ExtractValue('<a>xxx</c>','/a/b');
+ExtractValue('<a>xxx</c>','/a/b')
+NULL
+Warnings:
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 10: '</c>' unexpected ('</a>' wanted)'
+SELECT ExtractValue('<a><b>xxx</c></a>','/a/b');
+ExtractValue('<a><b>xxx</c></a>','/a/b')
+NULL
+Warnings:
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 13: '</c>' unexpected ('</b>' wanted)'
+#
+# End of 5.3 tests
+#
# Start of 5.5 tests
#
#
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
index a6d997f653a..c34ccdf5601 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
@@ -74,6 +74,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+cp932_japanese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
index a6d997f653a..c34ccdf5601 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
@@ -74,6 +74,15 @@ select 1 from t1 order by cast(a as char(1));
1
1
drop table t1;
+#
+# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
+#
+SET character_set_client=latin1;
+SET character_set_connection= @test_character_set;
+SET collation_connection= @test_collation;
+SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
+COLLATION('.') c1
+cp932_japanese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_val.inc b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
index 109ecdfa901..f5d736a8402 100644
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
@@ -89,7 +89,7 @@ echo
# - TIME (printed value will be unified), the exact values are like
# "normal" load: 0 (seconds)
# "heavy" load: 1 or more (seconds)
-# - State 'executing'
+# - State 'Filling schema table'
# - INFO must contain the corresponding SHOW/SELECT PROCESSLIST
#
# 1. Just dump what we get
@@ -109,7 +109,7 @@ FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
SELECT COUNT(*) = 1 AS "Expect 1"
FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
- AND State = 'executing';
+ AND State = 'Filling schema table';
#
# 4. Change the DB
USE information_schema;
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
index f803780f57e..50599fd42b0 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
@@ -44,11 +44,11 @@ ID root HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID root HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID root HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID root HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
@@ -119,10 +119,10 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
@@ -182,7 +182,7 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads.
@@ -197,7 +197,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
@@ -221,7 +221,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -245,7 +245,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
@@ -263,7 +263,7 @@ Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
@@ -285,7 +285,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -311,7 +311,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -365,7 +365,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -394,7 +394,7 @@ ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
@@ -423,7 +423,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -459,7 +459,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
index 70d88904e60..63d2aa4d03e 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
@@ -44,11 +44,11 @@ ID root HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID root HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID root HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
@@ -119,10 +119,10 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
@@ -182,7 +182,7 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads.
@@ -197,7 +197,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
@@ -221,7 +221,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -245,7 +245,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
@@ -263,7 +263,7 @@ Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
@@ -285,7 +285,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -311,7 +311,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -365,7 +365,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -394,7 +394,7 @@ ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
@@ -423,7 +423,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
@@ -459,7 +459,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
+ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
index c68e504f05a..37618673bbf 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
@@ -33,7 +33,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> root <HOST_NAME> test Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> test Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> root <HOST_NAME> test Query <TIME> init SHOW FULL PROCESSLIST <TIME_MS>
@@ -45,7 +45,7 @@ Expect exact one connection with this id
SELECT COUNT(*) = 1 AS "Expect 1"
FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
-AND State = 'executing';
+AND State = 'Filling schema table';
Expect 1
1
USE information_schema;
@@ -114,7 +114,7 @@ Expect 1
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> test_user <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> test_user <HOST_NAME> information_schema Query <TIME> init SHOW FULL PROCESSLIST 0.000
@@ -131,7 +131,7 @@ Id User Host db Command Time State Info Progress
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> test_user <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
@@ -159,7 +159,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
-<ID> root <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> root <HOST_NAME> information_schema Query <TIME> init SHOW FULL PROCESSLIST 0.000
@@ -206,7 +206,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
<ID> test_user <HOST_NAME> information_schema Query <TIME> Waiting for table metadata lock SELECT COUNT(*) FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
-<ID> root <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
UNLOCK TABLES;
# ----- switch to connection con2 (user = test_user) -----
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_ps.result b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
index 5efab44335a..98fef45cd37 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
@@ -33,7 +33,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> root <HOST_NAME> test Execute <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> test Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> root <HOST_NAME> test Query <TIME> init SHOW FULL PROCESSLIST <TIME_MS>
@@ -45,7 +45,7 @@ Expect exact one connection with this id
SELECT COUNT(*) = 1 AS "Expect 1"
FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
-AND State = 'executing';
+AND State = 'Filling schema table';
Expect 1
1
USE information_schema;
@@ -114,7 +114,7 @@ Expect 1
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> test_user <HOST_NAME> information_schema Execute <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> test_user <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> test_user <HOST_NAME> information_schema Query <TIME> init SHOW FULL PROCESSLIST 0.000
@@ -131,7 +131,7 @@ Id User Host db Command Time State Info Progress
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
-<ID> test_user <HOST_NAME> information_schema Execute <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> test_user <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
@@ -159,7 +159,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
-<ID> root <HOST_NAME> information_schema Execute <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> root <HOST_NAME> information_schema Query <TIME> init SHOW FULL PROCESSLIST 0.000
@@ -206,7 +206,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID
<ID> test_user <HOST_NAME> information_schema Query <TIME> Waiting for table metadata lock SELECT COUNT(*) FROM test.t1 <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
-<ID> root <HOST_NAME> information_schema Execute <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
+<ID> root <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <ROWS> <QUERY_ID>
UNLOCK TABLES;
# ----- switch to connection con2 (user = test_user) -----
diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result
index d2c9977e4bd..4b88eed4bfc 100644
--- a/mysql-test/suite/heap/heap.result
+++ b/mysql-test/suite/heap/heap.result
@@ -852,6 +852,14 @@ select data_length,index_length from information_schema.tables where table_schem
data_length index_length
81024 121024
drop table t1;
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+SET @@max_heap_table_size = 1024*1024*1024*20;
+CREATE TEMPORARY TABLE tmp ENGINE=MEMORY
+SELECT id FROM t1;
+DROP TEMPORARY TABLE tmp;
+drop table t1;
CREATE TABLE t1 (
id int(11) NOT NULL AUTO_INCREMENT,
color enum('GREEN', 'WHITE') DEFAULT NULL,
diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test
index 1d934bec0fd..c839cc48884 100644
--- a/mysql-test/suite/heap/heap.test
+++ b/mysql-test/suite/heap/heap.test
@@ -618,6 +618,23 @@ select data_length,index_length from information_schema.tables where table_schem
drop table t1;
#
+# MDEV-5905 Creating tmp. memory table kills the server
+#
+
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+
+--disable_warnings
+SET @@max_heap_table_size = 1024*1024*1024*20;
+--enable_warnings
+
+CREATE TEMPORARY TABLE tmp ENGINE=MEMORY
+ SELECT id FROM t1;
+DROP TEMPORARY TABLE tmp;
+drop table t1;
+
+#
# BUG#51763 Can't delete rows from MEMORY table with HASH key
#
diff --git a/mysql-test/suite/innodb/r/blob-update-debug.result b/mysql-test/suite/innodb/r/blob-update-debug.result
new file mode 100644
index 00000000000..1360745b7e6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/blob-update-debug.result
@@ -0,0 +1,15 @@
+#
+# Bug#18185930 UPD_NODE_INSERT_BLOB CAUSES BTR_EXTERN_OWNER_FLAG
+# ASSERTION
+#
+create table t1 (f1 int primary key, f2 blob) engine = innodb;
+insert into t1 values (1, repeat('*', 50000));
+select f1, substring(f2, 1, 40) from t1;
+f1 substring(f2, 1, 40)
+1 ****************************************
+set debug_dbug = 'd,row_ins_index_entry_timeout';
+update t1 set f1 = 3;
+select f1, substring(f2, 1, 40) from t1;
+f1 substring(f2, 1, 40)
+3 ****************************************
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/create-index.result b/mysql-test/suite/innodb/r/create-index.result
new file mode 100644
index 00000000000..ad358a86329
--- /dev/null
+++ b/mysql-test/suite/innodb/r/create-index.result
@@ -0,0 +1,9 @@
+#
+# Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
+# ASSERTION: FLEN == LEN
+#
+create table t1 (f1 binary(5)) engine=innodb;
+insert into t1 values ('w'), ('w');
+create unique index index_t1 on t1(f1(4));
+ERROR 23000: Duplicate entry 'w' for key 'index_t1'
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 2ae51b62062..d5ad06e861f 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -1309,3 +1309,30 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT
+# AFTER CHANGING AUTO_INCREMENT_INCREMEMENT
+#
+CREATE TABLE t ( i INT AUTO_INCREMENT, KEY(i) ) ENGINE=InnoDB;
+SET auto_increment_increment = 300;
+INSERT INTO t VALUES (NULL), (NULL);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ KEY `i` (`i`)
+) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=latin1
+SET auto_increment_increment = 50;
+INSERT INTO t VALUES (NULL);
+SELECT * FROM t;
+i
+1
+301
+351
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `i` int(11) NOT NULL AUTO_INCREMENT,
+ KEY `i` (`i`)
+) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-changed-pages.result b/mysql-test/suite/innodb/r/innodb-changed-pages.result
new file mode 100644
index 00000000000..392b5e64e2e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-changed-pages.result
@@ -0,0 +1,72 @@
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 10 AND end_lsn > 20 ;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA . `INNODB_CHANGED_PAGES` AS table1 WHERE ( ( (NOT ( ( ( ( (NOT ( table1 . `page_id` <> table1 . `start_lsn` AND table1 . `space_id` <> 8) AND table1 . `page_id` >= table1 . `end_lsn`) OR table1 . `end_lsn` = table1 . `space_id`) AND table1 . `end_lsn` <> table1 . `page_id`) OR table1 . `end_lsn` < 8) AND table1 . `space_id` >= '2000-06-10 11:33:07.046821') AND table1 . `end_lsn` >= 5) AND table1 . `start_lsn` < 'mm') OR table1 . `end_lsn` != table1 . `end_lsn`) HAVING ( table1 . `start_lsn` < '2005-09-09 01:34:19.012946' OR table1 . `page_id` < 6) ORDER BY table1 . `start_lsn`
+LIMIT 3;
+space_id page_id start_lsn end_lsn
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'mm'
+Warning 1292 Truncated incorrect DOUBLE value: '2005-09-09 01:34:19.012946'
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn = 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn = 2000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn < 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn <= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn > 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn >= 3000000;
+space_id page_id start_lsn end_lsn
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE (start_lsn > 2000000 and end_lsn < 3000000) or (start_lsn > 4000000 and end_lsn < 5000000);
+space_id page_id start_lsn end_lsn
diff --git a/mysql-test/suite/innodb/r/innodb-update-insert.result b/mysql-test/suite/innodb/r/innodb-update-insert.result
new file mode 100644
index 00000000000..cd0fed101ab
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-update-insert.result
@@ -0,0 +1,43 @@
+#
+# Bug#14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
+#
+create table t1(f1 char(1) primary key, f2 int not null, f3 blob)
+engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` char(1) NOT NULL,
+ `f2` int(11) NOT NULL,
+ `f3` blob,
+ PRIMARY KEY (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into t1 values ('a', 0, repeat('b',8102));
+select f1 from t1;
+f1
+a
+update t1 set f1='A';
+select f1 from t1;
+f1
+A
+drop table t1;
+#
+# Another test case
+#
+create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
+charset=utf8 engine=innodb;
+replace into t1 set f1=0xa3;
+Warnings:
+Warning 1366 Incorrect string value: '\xA3' for column 'f1' at row 1
+select f1 from t1;
+f1
+
+update t1 set f1=0x6a;
+update t1 set f3=repeat(0xb1,8103);
+update t1 set f1=0x4a;
+update t1 set f1=0x82;
+Warnings:
+Warning 1366 Incorrect string value: '\x82' for column 'f1' at row 1
+select f1 from t1;
+f1
+
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/blob-update-debug.test b/mysql-test/suite/innodb/t/blob-update-debug.test
new file mode 100644
index 00000000000..948cd749148
--- /dev/null
+++ b/mysql-test/suite/innodb/t/blob-update-debug.test
@@ -0,0 +1,17 @@
+# This file contains tests involving update operations on blob data type.
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+--echo #
+--echo # Bug#18185930 UPD_NODE_INSERT_BLOB CAUSES BTR_EXTERN_OWNER_FLAG
+--echo # ASSERTION
+--echo #
+
+create table t1 (f1 int primary key, f2 blob) engine = innodb;
+insert into t1 values (1, repeat('*', 50000));
+select f1, substring(f2, 1, 40) from t1;
+set debug_dbug = 'd,row_ins_index_entry_timeout';
+update t1 set f1 = 3;
+select f1, substring(f2, 1, 40) from t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/create-index.test b/mysql-test/suite/innodb/t/create-index.test
new file mode 100644
index 00000000000..e1e5b856aca
--- /dev/null
+++ b/mysql-test/suite/innodb/t/create-index.test
@@ -0,0 +1,11 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
+--echo # ASSERTION: FLEN == LEN
+--echo #
+create table t1 (f1 binary(5)) engine=innodb;
+insert into t1 values ('w'), ('w');
+--error ER_DUP_ENTRY
+create unique index index_t1 on t1(f1(4));
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 17df8877ad4..fd40b50ebbc 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -1,3 +1,8 @@
+if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier
+}
+
--source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
@@ -666,3 +671,16 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # Bug #14049391 INNODB MISCALCULATES AUTO-INCREMENT
+--echo # AFTER CHANGING AUTO_INCREMENT_INCREMEMENT
+--echo #
+CREATE TABLE t ( i INT AUTO_INCREMENT, KEY(i) ) ENGINE=InnoDB;
+SET auto_increment_increment = 300;
+INSERT INTO t VALUES (NULL), (NULL);
+SHOW CREATE TABLE t;
+SET auto_increment_increment = 50;
+INSERT INTO t VALUES (NULL);
+SELECT * FROM t;
+SHOW CREATE TABLE t;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt b/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt
new file mode 100644
index 00000000000..bdee9614faa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-changed-pages-master.opt
@@ -0,0 +1 @@
+--innodb-track-changed-pages=0 --innodb-changed-pages=1 \ No newline at end of file
diff --git a/mysql-test/suite/innodb/t/innodb-changed-pages.test b/mysql-test/suite/innodb/t/innodb-changed-pages.test
new file mode 100644
index 00000000000..14668af25cb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-changed-pages.test
@@ -0,0 +1,63 @@
+-- source include/have_xtradb.inc
+
+#
+# This test requires innodb-changed-pages=1 so that necessary information schema table exists
+# and innodb-track-changed-pages=0 to disable actual changed pages tracking, because
+# page number are not consistent from run to run
+#
+
+#
+# MDEV-4791: ssertion range_end >= range_start fails in log0online.c
+# on select from I_S.INNODB_CHANGED_PAGES
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 10 AND end_lsn > 20 ;
+
+SELECT * FROM INFORMATION_SCHEMA . `INNODB_CHANGED_PAGES` AS table1 WHERE ( ( (NOT ( ( ( ( (NOT ( table1 . `page_id` <> table1 . `start_lsn` AND table1 . `space_id` <> 8) AND table1 . `page_id` >= table1 . `end_lsn`) OR table1 . `end_lsn` = table1 . `space_id`) AND table1 . `end_lsn` <> table1 . `page_id`) OR table1 . `end_lsn` < 8) AND table1 . `space_id` >= '2000-06-10 11:33:07.046821') AND table1 . `end_lsn` >= 5) AND table1 . `start_lsn` < 'mm') OR table1 . `end_lsn` != table1 . `end_lsn`) HAVING ( table1 . `start_lsn` < '2005-09-09 01:34:19.012946' OR table1 . `page_id` < 6) ORDER BY table1 . `start_lsn`
+LIMIT 3;
+
+#
+# Basic tests
+#
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn > 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn >= 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 and end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 and end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn = 2000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE end_lsn = 2000000;
+
+#
+# OR
+#
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn < 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn <= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn < 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn <= 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn > 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn > 2000000 or end_lsn >= 3000000;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE start_lsn >= 2000000 or end_lsn >= 3000000;
+
+#
+# Range
+#
+SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES WHERE (start_lsn > 2000000 and end_lsn < 3000000) or (start_lsn > 4000000 and end_lsn < 5000000);
+
diff --git a/mysql-test/suite/innodb/t/innodb-update-insert.test b/mysql-test/suite/innodb/t/innodb-update-insert.test
new file mode 100644
index 00000000000..95387e0564e
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-update-insert.test
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+#
+
+# This file contains test cases for checking the functionality "update by
+# delete + insert".
+
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug#14668683 ASSERT REC_GET_DELETED_FLAG(REC, PAGE_IS_COMP(PAGE))
+--echo #
+
+create table t1(f1 char(1) primary key, f2 int not null, f3 blob)
+engine=innodb;
+show create table t1;
+
+insert into t1 values ('a', 0, repeat('b',8102));
+select f1 from t1;
+update t1 set f1='A';
+select f1 from t1;
+drop table t1;
+
+--echo #
+--echo # Another test case
+--echo #
+create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
+charset=utf8 engine=innodb;
+
+replace into t1 set f1=0xa3;
+select f1 from t1;
+update t1 set f1=0x6a;
+update t1 set f3=repeat(0xb1,8103);
+update t1 set f1=0x4a;
+update t1 set f1=0x82;
+select f1 from t1;
+
+drop table t1;
diff --git a/mysql-test/suite/parts/r/partition_mdev6067.result b/mysql-test/suite/parts/r/partition_mdev6067.result
new file mode 100644
index 00000000000..4737d3679f3
--- /dev/null
+++ b/mysql-test/suite/parts/r/partition_mdev6067.result
@@ -0,0 +1,38 @@
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+PARTITION BY KEY (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2), (3,8);
+INSERT INTO t1 VALUES (4,16);
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2,2), (3,8)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,16)
+master-bin.000001 # Xid # # COMMIT /* XID */
+DROP TABLE t1;
+SET binlog_format='row';
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+PARTITION BY KEY (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2), (3,8);
+INSERT INTO t1 VALUES (4,16);
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/t/partition_mdev6067.test b/mysql-test/suite/parts/t/partition_mdev6067.test
new file mode 100644
index 00000000000..7d64de2e8a7
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_mdev6067.test
@@ -0,0 +1,32 @@
+--source include/have_innodb.inc
+--source include/have_partition.inc
+--source include/have_binlog_format_statement.inc
+
+# Test binlogging of some transactions on a partitioned InnoDB table.
+# The bug was seen as one of the inserts being logged with a COMMIT query
+# event instead of the correct XID event.
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+ PARTITION BY KEY (a) PARTITIONS 2;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1)
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2), (3,8);
+INSERT INTO t1 VALUES (4,16);
+
+--source include/show_binlog_events.inc
+
+# Same thing in row mode.
+DROP TABLE t1;
+SET binlog_format='row';
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+ PARTITION BY KEY (a) PARTITIONS 2;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1)
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2), (3,8);
+INSERT INTO t1 VALUES (4,16);
+
+--source include/show_binlog_events.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 06bf039b36f..f1f872f95f9 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -107,135 +107,142 @@ and (end_event_id <= @marker_end)
) all_events
order by relative_event_id asc;
relative_event_id relative_end_event_id event_name comment nesting_event_type relative_nesting_event_id
-0 18 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
+0 19 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
1 4 stage/sql/init (stage) STATEMENT 0
2 2 wait/io/socket/sql/client_connection recv STAGE 1
3 3 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
4 4 wait/io/file/sql/query_log write STAGE 1
5 5 stage/sql/checking permissions (stage) STATEMENT 0
6 6 stage/sql/Opening tables (stage) STATEMENT 0
-7 7 stage/sql/init (stage) STATEMENT 0
-8 8 stage/sql/optimizing (stage) STATEMENT 0
-9 9 stage/sql/executing (stage) STATEMENT 0
-10 10 stage/sql/end (stage) STATEMENT 0
-11 11 stage/sql/query end (stage) STATEMENT 0
-12 12 stage/sql/closing tables (stage) STATEMENT 0
-13 13 stage/sql/freeing items (stage) STATEMENT 0
-14 14 wait/io/socket/sql/client_connection send STATEMENT 0
-15 15 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
+7 7 stage/sql/After opening tables (stage) STATEMENT 0
+8 8 stage/sql/init (stage) STATEMENT 0
+9 9 stage/sql/optimizing (stage) STATEMENT 0
+10 10 stage/sql/executing (stage) STATEMENT 0
+11 11 stage/sql/end (stage) STATEMENT 0
+12 12 stage/sql/query end (stage) STATEMENT 0
+13 13 stage/sql/closing tables (stage) STATEMENT 0
+14 14 stage/sql/freeing items (stage) STATEMENT 0
+15 15 wait/io/socket/sql/client_connection send STATEMENT 0
16 16 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
-17 18 stage/sql/cleaning up (stage) STATEMENT 0
-18 18 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 17
-19 19 idle idle NULL NULL
-20 38 statement/sql/select select "This is simple statement one" as payload NULL NULL
-21 24 stage/sql/init (stage) STATEMENT 20
-22 22 wait/io/socket/sql/client_connection recv STAGE 21
-23 23 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 21
-24 24 wait/io/file/sql/query_log write STAGE 21
-25 25 stage/sql/checking permissions (stage) STATEMENT 20
-26 26 stage/sql/Opening tables (stage) STATEMENT 20
-27 27 stage/sql/init (stage) STATEMENT 20
-28 28 stage/sql/optimizing (stage) STATEMENT 20
-29 29 stage/sql/executing (stage) STATEMENT 20
-30 30 stage/sql/end (stage) STATEMENT 20
-31 31 stage/sql/query end (stage) STATEMENT 20
-32 32 stage/sql/closing tables (stage) STATEMENT 20
-33 33 stage/sql/freeing items (stage) STATEMENT 20
-34 34 wait/io/socket/sql/client_connection send STATEMENT 20
-35 35 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 20
-36 36 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 20
-37 38 stage/sql/cleaning up (stage) STATEMENT 20
-38 38 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 37
-39 39 idle idle NULL NULL
-40 58 statement/sql/select select "This is simple statement two" as payload NULL NULL
-41 44 stage/sql/init (stage) STATEMENT 40
-42 42 wait/io/socket/sql/client_connection recv STAGE 41
-43 43 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 41
-44 44 wait/io/file/sql/query_log write STAGE 41
-45 45 stage/sql/checking permissions (stage) STATEMENT 40
-46 46 stage/sql/Opening tables (stage) STATEMENT 40
-47 47 stage/sql/init (stage) STATEMENT 40
-48 48 stage/sql/optimizing (stage) STATEMENT 40
-49 49 stage/sql/executing (stage) STATEMENT 40
-50 50 stage/sql/end (stage) STATEMENT 40
-51 51 stage/sql/query end (stage) STATEMENT 40
-52 52 stage/sql/closing tables (stage) STATEMENT 40
-53 53 stage/sql/freeing items (stage) STATEMENT 40
-54 54 wait/io/socket/sql/client_connection send STATEMENT 40
-55 55 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 40
-56 56 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 40
-57 58 stage/sql/cleaning up (stage) STATEMENT 40
-58 58 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 57
-59 59 idle idle NULL NULL
-60 76 statement/sql/select select "This is the first part of a multi query" as payload;
+17 17 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
+18 19 stage/sql/cleaning up (stage) STATEMENT 0
+19 19 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 18
+20 20 idle idle NULL NULL
+21 40 statement/sql/select select "This is simple statement one" as payload NULL NULL
+22 25 stage/sql/init (stage) STATEMENT 21
+23 23 wait/io/socket/sql/client_connection recv STAGE 22
+24 24 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 22
+25 25 wait/io/file/sql/query_log write STAGE 22
+26 26 stage/sql/checking permissions (stage) STATEMENT 21
+27 27 stage/sql/Opening tables (stage) STATEMENT 21
+28 28 stage/sql/After opening tables (stage) STATEMENT 21
+29 29 stage/sql/init (stage) STATEMENT 21
+30 30 stage/sql/optimizing (stage) STATEMENT 21
+31 31 stage/sql/executing (stage) STATEMENT 21
+32 32 stage/sql/end (stage) STATEMENT 21
+33 33 stage/sql/query end (stage) STATEMENT 21
+34 34 stage/sql/closing tables (stage) STATEMENT 21
+35 35 stage/sql/freeing items (stage) STATEMENT 21
+36 36 wait/io/socket/sql/client_connection send STATEMENT 21
+37 37 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 21
+38 38 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 21
+39 40 stage/sql/cleaning up (stage) STATEMENT 21
+40 40 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 39
+41 41 idle idle NULL NULL
+42 61 statement/sql/select select "This is simple statement two" as payload NULL NULL
+43 46 stage/sql/init (stage) STATEMENT 42
+44 44 wait/io/socket/sql/client_connection recv STAGE 43
+45 45 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 43
+46 46 wait/io/file/sql/query_log write STAGE 43
+47 47 stage/sql/checking permissions (stage) STATEMENT 42
+48 48 stage/sql/Opening tables (stage) STATEMENT 42
+49 49 stage/sql/After opening tables (stage) STATEMENT 42
+50 50 stage/sql/init (stage) STATEMENT 42
+51 51 stage/sql/optimizing (stage) STATEMENT 42
+52 52 stage/sql/executing (stage) STATEMENT 42
+53 53 stage/sql/end (stage) STATEMENT 42
+54 54 stage/sql/query end (stage) STATEMENT 42
+55 55 stage/sql/closing tables (stage) STATEMENT 42
+56 56 stage/sql/freeing items (stage) STATEMENT 42
+57 57 wait/io/socket/sql/client_connection send STATEMENT 42
+58 58 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 42
+59 59 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 42
+60 61 stage/sql/cleaning up (stage) STATEMENT 42
+61 61 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 60
+62 62 idle idle NULL NULL
+63 80 statement/sql/select select "This is the first part of a multi query" as payload;
select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-61 64 stage/sql/init (stage) STATEMENT 60
-62 62 wait/io/socket/sql/client_connection recv STAGE 61
-63 63 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 61
-64 64 wait/io/file/sql/query_log write STAGE 61
-65 65 stage/sql/checking permissions (stage) STATEMENT 60
-66 66 stage/sql/Opening tables (stage) STATEMENT 60
-67 67 stage/sql/init (stage) STATEMENT 60
-68 68 stage/sql/optimizing (stage) STATEMENT 60
-69 69 stage/sql/executing (stage) STATEMENT 60
-70 70 stage/sql/end (stage) STATEMENT 60
-71 71 stage/sql/query end (stage) STATEMENT 60
-72 72 stage/sql/closing tables (stage) STATEMENT 60
-73 76 stage/sql/freeing items (stage) STATEMENT 60
-74 74 wait/io/socket/sql/client_connection send STAGE 73
-75 75 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
-76 76 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
-77 91 statement/sql/select select "And this is the second part of a multi query" as payload;
+64 67 stage/sql/init (stage) STATEMENT 63
+65 65 wait/io/socket/sql/client_connection recv STAGE 64
+66 66 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 64
+67 67 wait/io/file/sql/query_log write STAGE 64
+68 68 stage/sql/checking permissions (stage) STATEMENT 63
+69 69 stage/sql/Opening tables (stage) STATEMENT 63
+70 70 stage/sql/After opening tables (stage) STATEMENT 63
+71 71 stage/sql/init (stage) STATEMENT 63
+72 72 stage/sql/optimizing (stage) STATEMENT 63
+73 73 stage/sql/executing (stage) STATEMENT 63
+74 74 stage/sql/end (stage) STATEMENT 63
+75 75 stage/sql/query end (stage) STATEMENT 63
+76 76 stage/sql/closing tables (stage) STATEMENT 63
+77 80 stage/sql/freeing items (stage) STATEMENT 63
+78 78 wait/io/socket/sql/client_connection send STAGE 77
+79 79 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 77
+80 80 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 77
+81 96 statement/sql/select select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-78 79 stage/sql/init (stage) STATEMENT 77
-79 79 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 78
-80 80 stage/sql/checking permissions (stage) STATEMENT 77
-81 81 stage/sql/Opening tables (stage) STATEMENT 77
-82 82 stage/sql/init (stage) STATEMENT 77
-83 83 stage/sql/optimizing (stage) STATEMENT 77
-84 84 stage/sql/executing (stage) STATEMENT 77
-85 85 stage/sql/end (stage) STATEMENT 77
-86 86 stage/sql/query end (stage) STATEMENT 77
-87 87 stage/sql/closing tables (stage) STATEMENT 77
-88 91 stage/sql/freeing items (stage) STATEMENT 77
-89 89 wait/io/socket/sql/client_connection send STAGE 88
-90 90 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 88
-91 91 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 88
-92 108 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
-93 94 stage/sql/init (stage) STATEMENT 92
-94 94 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 93
-95 95 stage/sql/checking permissions (stage) STATEMENT 92
-96 96 stage/sql/Opening tables (stage) STATEMENT 92
-97 97 stage/sql/init (stage) STATEMENT 92
-98 98 stage/sql/optimizing (stage) STATEMENT 92
-99 99 stage/sql/executing (stage) STATEMENT 92
-100 100 stage/sql/end (stage) STATEMENT 92
-101 101 stage/sql/query end (stage) STATEMENT 92
-102 102 stage/sql/closing tables (stage) STATEMENT 92
-103 103 stage/sql/freeing items (stage) STATEMENT 92
-104 104 wait/io/socket/sql/client_connection send STATEMENT 92
-105 105 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 92
-106 106 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 92
-107 108 stage/sql/cleaning up (stage) STATEMENT 92
-108 108 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 107
-109 109 idle idle NULL NULL
-110 128 statement/sql/select select "MARKER_END" as marker NULL NULL
-111 114 stage/sql/init (stage) STATEMENT 110
-112 112 wait/io/socket/sql/client_connection recv STAGE 111
-113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 111
-114 114 wait/io/file/sql/query_log write STAGE 111
-115 115 stage/sql/checking permissions (stage) STATEMENT 110
-116 116 stage/sql/Opening tables (stage) STATEMENT 110
-117 117 stage/sql/init (stage) STATEMENT 110
-118 118 stage/sql/optimizing (stage) STATEMENT 110
-119 119 stage/sql/executing (stage) STATEMENT 110
-120 120 stage/sql/end (stage) STATEMENT 110
-121 121 stage/sql/query end (stage) STATEMENT 110
-122 122 stage/sql/closing tables (stage) STATEMENT 110
-123 123 stage/sql/freeing items (stage) STATEMENT 110
-124 124 wait/io/socket/sql/client_connection send STATEMENT 110
-125 125 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 110
-126 126 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 110
-127 128 stage/sql/cleaning up (stage) STATEMENT 110
-128 128 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 127
+82 83 stage/sql/init (stage) STATEMENT 81
+83 83 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 82
+84 84 stage/sql/checking permissions (stage) STATEMENT 81
+85 85 stage/sql/Opening tables (stage) STATEMENT 81
+86 86 stage/sql/After opening tables (stage) STATEMENT 81
+87 87 stage/sql/init (stage) STATEMENT 81
+88 88 stage/sql/optimizing (stage) STATEMENT 81
+89 89 stage/sql/executing (stage) STATEMENT 81
+90 90 stage/sql/end (stage) STATEMENT 81
+91 91 stage/sql/query end (stage) STATEMENT 81
+92 92 stage/sql/closing tables (stage) STATEMENT 81
+93 96 stage/sql/freeing items (stage) STATEMENT 81
+94 94 wait/io/socket/sql/client_connection send STAGE 93
+95 95 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 93
+96 96 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 93
+97 114 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
+98 99 stage/sql/init (stage) STATEMENT 97
+99 99 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 98
+100 100 stage/sql/checking permissions (stage) STATEMENT 97
+101 101 stage/sql/Opening tables (stage) STATEMENT 97
+102 102 stage/sql/After opening tables (stage) STATEMENT 97
+103 103 stage/sql/init (stage) STATEMENT 97
+104 104 stage/sql/optimizing (stage) STATEMENT 97
+105 105 stage/sql/executing (stage) STATEMENT 97
+106 106 stage/sql/end (stage) STATEMENT 97
+107 107 stage/sql/query end (stage) STATEMENT 97
+108 108 stage/sql/closing tables (stage) STATEMENT 97
+109 109 stage/sql/freeing items (stage) STATEMENT 97
+110 110 wait/io/socket/sql/client_connection send STATEMENT 97
+111 111 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 97
+112 112 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 97
+113 114 stage/sql/cleaning up (stage) STATEMENT 97
+114 114 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 113
+115 115 idle idle NULL NULL
+116 135 statement/sql/select select "MARKER_END" as marker NULL NULL
+117 120 stage/sql/init (stage) STATEMENT 116
+118 118 wait/io/socket/sql/client_connection recv STAGE 117
+119 119 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 117
+120 120 wait/io/file/sql/query_log write STAGE 117
+121 121 stage/sql/checking permissions (stage) STATEMENT 116
+122 122 stage/sql/Opening tables (stage) STATEMENT 116
+123 123 stage/sql/After opening tables (stage) STATEMENT 116
+124 124 stage/sql/init (stage) STATEMENT 116
+125 125 stage/sql/optimizing (stage) STATEMENT 116
+126 126 stage/sql/executing (stage) STATEMENT 116
+127 127 stage/sql/end (stage) STATEMENT 116
+128 128 stage/sql/query end (stage) STATEMENT 116
+129 129 stage/sql/closing tables (stage) STATEMENT 116
+130 130 stage/sql/freeing items (stage) STATEMENT 116
+131 131 wait/io/socket/sql/client_connection send STATEMENT 116
+132 132 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 116
+133 133 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 116
+134 135 stage/sql/cleaning up (stage) STATEMENT 116
+135 135 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 134
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_function.result b/mysql-test/suite/perfschema/r/stage_mdl_function.result
index 39cf2b08e85..d949b19586a 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_function.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_function.result
@@ -11,11 +11,11 @@ username event_name sql_text
user1 statement/sql/select select test.f1()
username event_name nesting_event_type
username event_name nesting_event_type
-user1 stage/sql/System lock STATEMENT
-user1 stage/sql/init STATEMENT
user1 stage/sql/optimizing STATEMENT
user1 stage/sql/executing STATEMENT
user1 stage/sql/Opening tables STATEMENT
+user1 stage/sql/After opening tables STATEMENT
+user1 stage/sql/closing tables STATEMENT
user1 stage/sql/end STATEMENT
user1 stage/sql/query end STATEMENT
user1 stage/sql/closing tables STATEMENT
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
index b214a8ec290..263c00c98e6 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
@@ -18,11 +18,11 @@ username event_name sql_text
user1 statement/sql/select select test.f1()
username event_name nesting_event_type
username event_name nesting_event_type
-user1 stage/sql/executing STATEMENT
-user1 stage/sql/Opening tables STATEMENT
user1 stage/sql/query end STATEMENT
user1 stage/sql/closing tables STATEMENT
user1 stage/sql/Opening tables STATEMENT
+user1 stage/sql/After opening tables STATEMENT
+user1 stage/sql/closing tables STATEMENT
user1 stage/sql/end STATEMENT
user1 stage/sql/query end STATEMENT
user1 stage/sql/closing tables STATEMENT
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
index 20bb91159da..60e83e8a179 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_table.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -34,6 +34,7 @@ user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/init STATEMENT
user2 stage/sql/Opening tables STATEMENT
+user2 stage/sql/After opening tables STATEMENT
user2 stage/sql/setup STATEMENT
user2 stage/sql/creating table STATEMENT
user2 stage/sql/After create STATEMENT
diff --git a/mysql-test/suite/perfschema_stress/README b/mysql-test/suite/perfschema_stress/README
index d28287f9735..25101f429e5 100644
--- a/mysql-test/suite/perfschema_stress/README
+++ b/mysql-test/suite/perfschema_stress/README
@@ -1,4 +1,5 @@
# Copyright (c) 2009, 2010 Sun Microsystems, Inc.
+# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result
index f3e6716302b..3086b1f2d1f 100644
--- a/mysql-test/suite/plugins/r/sql_error_log.result
+++ b/mysql-test/suite/plugins/r/sql_error_log.result
@@ -33,6 +33,8 @@ insert into t1 values ('aa');
ERROR 22007: Incorrect integer value: 'aa' for column 'id' at row 1
SET SQL_MODE = '';
drop table t1;
+SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
+TABLE_NAME
uninstall plugin SQL_ERROR_LOG;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/mysql-test/suite/plugins/t/sql_error_log.test b/mysql-test/suite/plugins/t/sql_error_log.test
index 8d04720aac3..a28e2d2e259 100644
--- a/mysql-test/suite/plugins/t/sql_error_log.test
+++ b/mysql-test/suite/plugins/t/sql_error_log.test
@@ -46,6 +46,8 @@ insert into t1 values ('aa');
SET SQL_MODE = '';
drop table t1;
+SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
+
uninstall plugin SQL_ERROR_LOG;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
index a1e52cf23da..3123a7da2a5 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
@@ -367,9 +367,8 @@ DROP EVENT e1;
---sync_slave_with_master
# Check received heartbeat events while logs flushed on slave
---connection slave
+--sync_slave_with_master
--echo *** Flush logs on slave ***
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
index 0f211c6b321..369ef7844db 100644
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
@@ -9,6 +9,7 @@ SELECT @@global.general_log_file;
mysqld.log
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log_file = mytest.log;
+ERROR 42000: Incorrect argument type to variable 'general_log_file'
SET @@global.general_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'general_log_file'
'#----------------------FN_DYNVARS_004_03------------------------#'
diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
index fb7093ec3b3..0335db8e859 100644
--- a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
@@ -41,6 +41,8 @@ set global innodb_thread_sleep_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
set global innodb_thread_sleep_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
+set global innodb_thread_sleep_delay=18446744073709551616;
+ERROR 42000: Incorrect argument type to variable 'innodb_thread_sleep_delay'
set global innodb_thread_sleep_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '-7'
@@ -50,6 +52,34 @@ select @@global.innodb_thread_sleep_delay;
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 0
+set global innodb_thread_sleep_delay=0;
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+0
+set global innodb_thread_sleep_delay=1000;
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+1000
+set global innodb_thread_sleep_delay=1000000;
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+1000000
+set global innodb_thread_sleep_delay=1000001;
+Warnings:
+Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '1000001'
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+1000000
+set global innodb_thread_sleep_delay=4294967295;
+Warnings:
+Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '4294967295'
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+1000000
+set global innodb_thread_sleep_delay=555;
+select @@global.innodb_thread_sleep_delay;
+@@global.innodb_thread_sleep_delay
+555
SET @@global.innodb_thread_sleep_delay = @start_global_value;
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
index f74c0030465..f45c568ff4a 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
@@ -6,6 +6,7 @@ SELECT @@global.slow_query_log_file;
mysqld-slow.log
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log_file = mytest.log;
+ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
SET @@global.slow_query_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
'#----------------------FN_DYNVARS_004_03------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
index 3cc1eb80822..12362fa123c 100644
--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
@@ -53,7 +53,7 @@ SELECT @@global.general_log_file;
# Change the value of general_log_file to a invalid value #
#######################################################################
-# Assumed text if no quotes or numbers.
+--error ER_WRONG_TYPE_FOR_VAR
SET @@global.general_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.general_log_file = 12;
diff --git a/mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test
index 7156f309a64..782fb475140 100644
--- a/mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test
@@ -1,3 +1,7 @@
+if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier
+}
#
# 2010-01-27 - Added
@@ -40,12 +44,30 @@ set global innodb_thread_sleep_delay=1.1;
set global innodb_thread_sleep_delay=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_thread_sleep_delay="foo";
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_thread_sleep_delay=18446744073709551616;
set global innodb_thread_sleep_delay=-7;
select @@global.innodb_thread_sleep_delay;
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
#
+# correct/overflowed values
+#
+set global innodb_thread_sleep_delay=0;
+select @@global.innodb_thread_sleep_delay;
+set global innodb_thread_sleep_delay=1000;
+select @@global.innodb_thread_sleep_delay;
+set global innodb_thread_sleep_delay=1000000;
+select @@global.innodb_thread_sleep_delay;
+set global innodb_thread_sleep_delay=1000001;
+select @@global.innodb_thread_sleep_delay;
+set global innodb_thread_sleep_delay=4294967295;
+select @@global.innodb_thread_sleep_delay;
+set global innodb_thread_sleep_delay=555;
+select @@global.innodb_thread_sleep_delay;
+
+#
# cleanup
#
SET @@global.innodb_thread_sleep_delay = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
index cea0baa3cfc..28fc17f6077 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
@@ -51,7 +51,7 @@ SELECT @@global.slow_query_log_file;
# Change the value of slow_query_log_file to a invalid value #
#######################################################################
-# Assumed text if no quotes or numbers.
+--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = 12;
diff --git a/mysql-test/t/alter_table_trans.test b/mysql-test/t/alter_table_trans.test
index 29b9b4c212f..19b40d84b22 100644
--- a/mysql-test/t/alter_table_trans.test
+++ b/mysql-test/t/alter_table_trans.test
@@ -32,4 +32,16 @@ insert t1 values (repeat('3', 8193),3,1,1);
ALTER TABLE t1 ADD PRIMARY KEY (col4(10)) , ADD UNIQUE KEY uidx (col3);
DROP TABLE t1;
+#
+# MDEV-5743 Server crashes in mysql_alter_table on an attempt to add a primary key to InnoDB table
+#
+
+CREATE TABLE t1 (a INT) ENGINE = InnoDB;
+INSERT INTO t1 VALUES (2);
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+ALTER TABLE t1 DROP PRIMARY KEY;
+INSERT INTO t1 VALUES (2);
+--error ER_DUP_ENTRY
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+DROP TABLE t1;
diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test
index ab260f0c7e8..0455f579922 100644
--- a/mysql-test/t/ctype_cp1251.test
+++ b/mysql-test/t/ctype_cp1251.test
@@ -95,6 +95,14 @@ SELECT COALESCE(IF(test1=1, 1, NULL), test2) FROM t1;
SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-5459 Illegal mix of collations for datetime
+--echo #
+SET NAMES cp1251;
+CREATE TABLE t1 (dt DATETIME);
+INSERT INTO t1 VALUES ('2014-01-02 10:20:30');
+SELECT date(dt) FROM t1 WHERE (CASE WHEN 1 THEN date(dt) ELSE null END >= '2013-12-01 00:00:00');
+DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index d893b9d9458..99ac2d19b70 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -79,6 +79,10 @@ select 'a' regexp 'A' collate latin1_general_cs;
select 'a' regexp 'A' collate latin1_bin;
+SET @test_character_set= 'latin1';
+SET @test_collation= 'latin1_swedish_ci';
+-- source include/ctype_common.inc
+
SET collation_connection='latin1_swedish_ci';
-- source include/ctype_filesort.inc
-- source include/ctype_like_escape.inc
diff --git a/mysql-test/t/ctype_ucs2_query_cache.test b/mysql-test/t/ctype_ucs2_query_cache.test
index bdc1d079d5e..0ac09b2ba4b 100644
--- a/mysql-test/t/ctype_ucs2_query_cache.test
+++ b/mysql-test/t/ctype_ucs2_query_cache.test
@@ -12,6 +12,7 @@
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3),(4);
SELECT * FROM t1;
+SELECT * FROM t1;
DROP TABLE t1;
--echo #
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 6e44b4c1578..9dfc49d3dfd 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -647,6 +647,49 @@ DROP TABLE t1;
--echo End of 5.1 tests
+--echo #
+--echo # Start of 5.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
+--echo #
+SET NAMES utf8;
+CREATE TABLE t1
+(
+ txt text COLLATE utf8_unicode_ci NOT NULL,
+ uid int(11) NOT NULL,
+ id2 int(11) NOT NULL,
+ KEY uid (uid),
+ KEY id2 (id2)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+INSERT INTO t1 VALUES ('txt1',1234,5678);
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('txt1' IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('1234' IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('5678' IN BOOLEAN MODE);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ txt1 text COLLATE utf8_unicode_ci NOT NULL,
+ txt2 text COLLATE latin1_swedish_ci NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+INSERT INTO t1 VALUES ('nnn1 x1 y1 ööö1','mmm1 ùùù1');
+INSERT INTO t1 VALUES ('nnn2 x2 y2 ööö2','mmm2 ùùù2');
+INSERT INTO t1 VALUES ('nnn3 x3 y3 ööö3','mmm3 ùùù3');
+INSERT INTO t1 VALUES ('nnn4 x4 y4 ööö4','mmm4 ùùù4');
+INSERT INTO t1 VALUES ('nnn5 x5 y5 ööö5','mmm5 ');
+SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ööö1' IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ùùù2' IN BOOLEAN MODE);
+DROP TABLE t1;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+#
+# MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252).
+#
+
CREATE TABLE t1 (
id int(11) auto_increment,
title varchar(100) default '',
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 5257c47741b..ed11333dd95 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1409,6 +1409,34 @@ drop table t1;
--echo End of 5.1 tests
+--echo #
+--echo # Start of 5.3 tests
+--echo #
+
+--echo #
+--echo # Bug#11829861: SUBSTRING_INDEX() RESULTS IN MISSING CHARACTERS WHEN USED
+--echo # INSIDE LOWER()
+--echo #
+SET @user_at_host = 'root@mytinyhost-PC.local';
+SELECT LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1));
+--echo # End of test BUG#11829861
+
+--echo #
+--echo # Bug#42404: SUBSTRING_INDEX() RESULTS ARE INCONSISTENT
+--echo #
+
+CREATE TABLE t (i INT NOT NULL, c CHAR(255) NOT NULL);
+INSERT INTO t VALUES (0,'.www.mysql.com'),(1,'.wwwmysqlcom');
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t WHERE i = 1;
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t;
+DROP TABLE t;
+--echo # End of test BUG#42404
+
+--echo #
+--echo # End of 5.3 tests
+--echo #
+
+
--echo Start of 5.4 tests
#
# WL#4584 Internationalized number format
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index e92780f0523..5d59acf9320 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1643,6 +1643,18 @@ FROM t1 JOIN t2 ON c = b GROUP BY b WITH ROLLUP;
DROP TABLE t1,t2;
--echo #
+--echo # MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
+--echo #
+
+SET sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 AS test UNION SELECT 2 AS test ORDER BY test IS NULL ASC;
+SET sql_mode='';
+
+#
+# End of MariaDB 5.5 tests
+#
+
+--echo #
--echo # Bug #58782
--echo # Missing rows with SELECT .. WHERE .. IN subquery
--echo # with full GROUP BY and no aggr
@@ -1690,3 +1702,4 @@ DROP TABLE t1;
DROP TABLE where_subselect;
--echo # End of Bug #58782
+
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test
index 78f6ff4a880..cd6a4c9d328 100644
--- a/mysql-test/t/having.test
+++ b/mysql-test/t/having.test
@@ -659,6 +659,41 @@ drop table t1,t2,t3;
--echo End of 5.2 tests
--echo #
+--echo # Bug mdev-6116: an equality in the conjunction of HAVING
+--echo # and IN subquery in WHERE
+--echo # (The bug is caused by the same problem as bug mdev-5927)
+--echo #
+
+CREATE TABLE t1 (f_key varchar(1), f_nokey varchar(1), INDEX(f_key));
+INSERT INTO t1 VALUES ('v','v'),('s','s');
+
+CREATE TABLE t2 (f_int int, f_key varchar(1), INDEX(f_key));
+INSERT INTO t2 VALUES
+(4,'j'),(6,'v'),(3,'c'),(5,'m'),(3,'d'),(2,'d'),(2,'y'),
+(9,'t'),(3,'d'),(8,'s'),(1,'r'),(8,'m'),(8,'b'),(5,'x');
+
+SELECT t2.f_int FROM t1 INNER JOIN t2 ON (t2.f_key = t1.f_nokey)
+WHERE t1.f_nokey IN (
+ SELECT t1.f_key FROM t1, t2 WHERE t1.f_key = t2.f_key
+) HAVING t2.f_int >= 0 AND t2.f_int != 0;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug mdev-5927: an equality in the conjunction of HAVING
+--echo # and an equality in WHERE
+--echo #
+
+CREATE TABLE t1 (pk int PRIMARY KEY, f int NOT NULL, INDEX(f));
+INSERT INTO t1 VALUES (1,0), (2,8);
+
+SELECT * FROM t1 WHERE f = 2 HAVING ( pk IN ( SELECT 9 ) AND f != 0 );
+
+DROP TABLE t1;
+
+--echo End of 5.3 tests
+
+--echo #
--echo # Bug mdev-5160: two-way join with HAVING over the second table
--echo #
@@ -673,3 +708,4 @@ 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/multi_update.test b/mysql-test/t/multi_update.test
index 78f0076f98c..4f8736f0c2d 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -808,6 +808,47 @@ SELECT * FROM t2;
DROP TABLE t1,t2;
+--echo #
+--echo # MDEV-6139: UPDATE w/ join against MRG_MyISAM table with read-only
+--echo # sub-table fails
+--echo # MDEV-6193: Problems with multi-table updates that JOIN against
+--echo # read-only table
+--echo #
+
+CREATE TABLE t1 (
+ id int(10) unsigned,
+ a int(11)
+) ENGINE=MyISAM;
+
+CREATE TABLE t3 (
+ id int(10) unsigned,
+ b int(11)
+) ENGINE=MyISAM;
+
+CREATE TABLE t2 (
+ id int(10) unsigned,
+ b int(11)
+) ENGINE=MRG_MyISAM UNION=(t3);
+
+FLUSH TABLES;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--disable_result_log
+--exec $MYISAMPACK -f $MYSQLD_DATADIR/test/t3
+--exec $MYISAMCHK -rq $MYSQLD_DATADIR/test/t3
+--enable_result_log
+
+update t1 join t2 using (id) set t1.a=t2.b;
+create view v2 as select * from t2;
+update t1 join v2 using (id) set t1.a=0;
+create view v1 as select * from t3;
+update t1 join v1 using (id) set t1.a=0;
+update t1 join INFORMATION_SCHEMA.CHARACTER_SETS on (id=MAXLEN) set t1.a=0;
+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;
+
--echo end of 5.5 tests
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
index 6de81879001..8c641428353 100644
--- a/mysql-test/t/mysql_upgrade.test
+++ b/mysql-test/t/mysql_upgrade.test
@@ -131,7 +131,6 @@ let $MYSQLD_DATADIR= `select @@datadir`;
# so the following command should never fail.
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
-
--echo #
--echo # MDEV-4332 Increase username length from 16 characters
--echo # MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 6e717e85122..9d6789541c0 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2458,3 +2458,18 @@ drop table t1, t2;
--echo #
--echo # End of 5.1 tests
--echo #
+
+#
+# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
+#
+--error 2
+--exec $MYSQL_DUMP -hunknownhost --dump-slave nulldb
+
+#
+# MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly requested
+#
+--replace_result mysqldump.exe mysqldump
+--error 1
+--exec $MYSQL_DUMP --user=foo 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
+--exec $MYSQL_DUMP --help > $MYSQLTEST_VARDIR/tmp/bug6056.out
+
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
index 2c8cfafb90a..f59a5d01cf5 100644
--- a/mysql-test/t/parser.test
+++ b/mysql-test/t/parser.test
@@ -733,3 +733,28 @@ DROP TABLE t1, t2, t3;
--echo # End of 5.1 tests
--echo #
+--echo #
+--echo # Bug#17075846 : unquoted file names for variable values are
+--echo # accepted but parsed incorrectly
+--echo #
+--error ER_WRONG_TYPE_FOR_VAR
+SET default_storage_engine=a.myisam;
+--error ER_WRONG_TYPE_FOR_VAR
+SET default_storage_engine = .a.MyISAM;
+--error ER_WRONG_TYPE_FOR_VAR
+SET default_storage_engine = a.b.MyISAM;
+--error ER_WRONG_TYPE_FOR_VAR
+SET default_storage_engine = `a`.MyISAM;
+--error ER_WRONG_TYPE_FOR_VAR
+SET default_storage_engine = `a`.`MyISAM`;
+--error ER_UNKNOWN_STORAGE_ENGINE
+set default_storage_engine = "a.MYISAM";
+--error ER_UNKNOWN_STORAGE_ENGINE
+set default_storage_engine = 'a.MYISAM';
+--error ER_UNKNOWN_STORAGE_ENGINE
+set default_storage_engine = `a.MYISAM`;
+CREATE TABLE t1 (s VARCHAR(100));
+--ERROR ER_BAD_FIELD_ERROR
+CREATE TRIGGER trigger1 BEFORE INSERT ON t1 FOR EACH ROW
+SET default_storage_engine = NEW.INNODB;
+DROP TABLE t1;
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index fb608ee5bf8..0655aff9fc9 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -26,9 +26,12 @@ SELECT * FROM t1;
# a couple of tests for variables
set global example_ulong_var=500;
set global example_enum_var= e1;
+set session example_int_var= -1;
show status like 'example%';
show variables like 'example%';
+select @@session.example_int_var;
+
UNINSTALL SONAME 'ha_example';
# the engine is NOT uninstalled yet,
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index e7cb505b19f..d1c3774947a 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -5884,3 +5884,9 @@ EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP B
DROP TABLE t1,t2;
+--echo #
+--echo # MDEV-5991: crash in Item_field::used_tables
+--echo #
+create table t1 (c int);
+select exists(select 1 from t1 group by `c` in (select `c` from t1));
+drop table t1;
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 6cfd9711c3e..6b8ed128f4b 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -319,9 +319,36 @@ SELECT
DATE('0'),
IFNULL(DATE('0'),CURRENT_DATE) AS d1,
DATE('20011107')>IFNULL(DATE('0'),CURRENT_DATE) AS cmp;
-SET @@timestamp=DEFAULT;
--echo #
+--echo # MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
+--echo #
+SELECT CAST(TIME('-800:20:30') AS DATE);
+SELECT CAST(TIME('800:20:30') AS DATE);
+SELECT CAST(TIME('33 08:20:30') AS DATE);
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (TIME('800:20:30'));
+INSERT INTO t1 VALUES (TIME('33 08:20:30'));
+SET SQL_MODE=NO_ZERO_IN_DATE;
+INSERT INTO t1 VALUES (TIME('48:20:30'));
+SET SQL_MODE=DEFAULT;
+SELECT * FROM t1;
+DROP TABLE t1;
+DELIMITER |;
+CREATE PROCEDURE test5041()
+BEGIN
+ DECLARE t TIME;
+ DECLARE d DATE;
+ SET t= TIME('800:00:00');
+ SET d= t;
+ SELECT d;
+END;|
+DELIMITER ;|
+call test5041();
+drop procedure test5041;
+
+SET @@timestamp=DEFAULT;
+--echo #
--echo # End of 5.3 tests
--echo #
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index a1c0509666a..b841d8b1def 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -491,6 +491,36 @@ drop table t1,t2;
--echo #
SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5');
+
+--echo #
+--echo # MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
+--echo #
+SET @@timestamp=UNIX_TIMESTAMP('2013-08-19 20:30:00');
+SELECT CAST(TIME('-800:20:30') AS DATETIME);
+SELECT CAST(TIME('800:20:30') AS DATETIME);
+SELECT CAST(TIME('33 08:20:30') AS DATETIME);
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES (TIME('800:20:30'));
+INSERT INTO t1 VALUES (TIME('33 08:20:30'));
+SET SQL_MODE=NO_ZERO_IN_DATE;
+INSERT INTO t1 VALUES (TIME('48:20:30'));
+SET SQL_MODE=DEFAULT;
+SELECT * FROM t1;
+DROP TABLE t1;
+DELIMITER |;
+CREATE PROCEDURE test5041()
+BEGIN
+ DECLARE t TIME;
+ DECLARE dt DATETIME;
+ SET t= TIME('800:20:30');
+ SET dt= t;
+ SELECT dt;
+END;|
+DELIMITER ;|
+call test5041();
+drop procedure test5041;
+
+SET @@timestamp=DEFAULT;
--echo End of 5.3 tests
--echo #
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 7402e992350..e36e22bdfac 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -750,6 +750,21 @@ drop view v1;
drop table t1;
#
+# VIEW over non-existing column
+#
+create table t1 (a varchar(20));
+create view v1 as select a from t1;
+alter table t1 change a aa int;
+--error ER_VIEW_INVALID
+select * from v1;
+--replace_column 8 # 12 # 13 #
+show table status;
+show create view v1;
+drop view v1;
+drop table t1;
+
+
+#
# VIEW with floating point (long number) as column
#
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
@@ -4937,6 +4952,25 @@ select * from v1;
drop view v1;
drop table t1;
+--echo #
+--echo # MDEV-5981: name resolution issues with views and multi-update
+--echo # in ps-protocol
+--echo #
+
+create table t1 (id1 int primary key, val1 varchar(20));
+insert into t1 values (1, 'test1');
+create table t2 (id2 int primary key, val2 varchar(20));
+insert into t2 values (1, 'test2');
+create algorithm=merge view v1 as select id1 as id1v1, val1 as val1v1 from t1;
+create algorithm=merge view v2 as
+select t2.id2 as id2v2, t2.val2 as val2v2
+from t2, v1
+where t2.id2 = v1.id1v1;
+prepare stmt1 from "update v2 set val2v2 = 'test19' where 1 = id2v2";
+execute stmt1;
+deallocate prepare stmt1;
+drop view v1,v2;
+drop table t1,t2;
--echo # -----------------------------------------------------------------
--echo # -- End of 5.3 tests.
--echo # -----------------------------------------------------------------
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index bc9a74fd8cd..371fcb72b0d 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -53,7 +53,7 @@ SELECT extractValue(@xml,'/a//@x');
SELECT extractValue(@xml,'/a//@x[1]');
SELECT extractValue(@xml,'/a//@x[2]');
-SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</c></b></a>';
+SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</b></c></a>';
SELECT extractValue(@xml,'//b[1]');
SELECT extractValue(@xml,'/descendant::b[1]');
@@ -653,6 +653,18 @@ SELECT ExtractValue(CONVERT('<\"', BINARY(10)), 1);
--echo End of 5.1 tests
+--echo #
+--echo # Start of 5.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-5338 XML parser accepts malformed data
+--echo #
+SELECT ExtractValue('<a>xxx</c>','/a/b');
+SELECT ExtractValue('<a><b>xxx</c></a>','/a/b');
+
+--echo #
+--echo # End of 5.3 tests
--echo #
--echo # Start of 5.5 tests