summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/collections/default.experimental6
-rw-r--r--mysql-test/extra/rpl_tests/rpl_loaddata.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test235
-rw-r--r--mysql-test/include/mix2.inc4
-rw-r--r--mysql-test/include/not_blackhole.inc5
-rw-r--r--mysql-test/include/percona_query_response_time_show.inc7
-rw-r--r--mysql-test/include/rpl_diff_tables.inc1
-rw-r--r--mysql-test/lib/My/Config.pm2
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm11
-rw-r--r--mysql-test/lib/My/SafeProcess.pm15
-rw-r--r--mysql-test/lib/mtr_cases.pm14
-rw-r--r--mysql-test/lib/mtr_report.pm2
-rwxr-xr-xmysql-test/mysql-test-run.pl154
-rw-r--r--mysql-test/r/csv.result43
-rw-r--r--mysql-test/r/delete.result9
-rw-r--r--mysql-test/r/func_group.result11
-rw-r--r--mysql-test/r/func_sapdb.result2
-rw-r--r--mysql-test/r/func_time.result8
-rw-r--r--mysql-test/r/gis.result67
-rw-r--r--mysql-test/r/group_min_max.result2
-rw-r--r--mysql-test/r/insert.result15
-rw-r--r--mysql-test/r/join.result36
-rw-r--r--mysql-test/r/mysqltest.result7
-rw-r--r--mysql-test/r/partition_not_blackhole.result16
-rw-r--r--mysql-test/r/partition_range.result44
-rw-r--r--mysql-test/r/plugin.result3
-rw-r--r--mysql-test/r/range.result13
-rw-r--r--mysql-test/r/subselect4.result22
-rw-r--r--mysql-test/r/timezone2.result12
-rw-r--r--mysql-test/r/trigger.result8
-rw-r--r--mysql-test/r/user_var.result17
-rw-r--r--mysql-test/std_data/parts/t1_blackhole.frmbin0 -> 8556 bytes
-rw-r--r--mysql-test/std_data/parts/t1_blackhole.parbin0 -> 24 bytes
-rw-r--r--mysql-test/suite/binlog/r/binlog_mixed_load_data.result10
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed_simulate.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_mixed_load_data.test15
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_blackhole.test2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_06.result11
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result19
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result16
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_08.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_06.result11
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result19
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result15
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_08.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_06.result11
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result19
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result15
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_08.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_storedproc_06.result11
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_03.result19
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_03e.result16
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_08.result2
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result1
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_06.inc11
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_10.inc4
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03.inc19
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc1
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc4
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc1
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_0407.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_08.inc2
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result13
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result92
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test83
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-autoinc.result13
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test2
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-autoinc.test14
-rw-r--r--mysql-test/suite/pbxt/r/func_sapdb.result2
-rw-r--r--mysql-test/suite/percona/percona_query_response_time-stored.result86
-rw-r--r--mysql-test/suite/percona/percona_query_response_time.result100
-rw-r--r--mysql-test/suite/percona/percona_server_variables.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_if_not_exists.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_create_table.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result704
-rw-r--r--mysql-test/suite/rpl/t/disabled.def1
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_if_not_exists.test27
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_fatal.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_map.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_create_table.test13
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test14
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_log.test2
-rw-r--r--mysql-test/t/csv.test15
-rw-r--r--mysql-test/t/delete.test13
-rw-r--r--mysql-test/t/func_group.test14
-rw-r--r--mysql-test/t/func_time.test11
-rw-r--r--mysql-test/t/gis.test58
-rw-r--r--mysql-test/t/insert.test25
-rw-r--r--mysql-test/t/join.test70
-rw-r--r--mysql-test/t/mysqlbinlog.test2
-rw-r--r--mysql-test/t/mysqltest.test57
-rw-r--r--mysql-test/t/partition_not_blackhole-master.opt1
-rw-r--r--mysql-test/t/partition_not_blackhole.test26
-rw-r--r--mysql-test/t/partition_range.test41
-rw-r--r--mysql-test/t/plugin.test2
-rw-r--r--mysql-test/t/range.test12
-rw-r--r--mysql-test/t/subselect4.test15
-rw-r--r--mysql-test/t/timezone2.test9
-rw-r--r--mysql-test/t/user_var.test18
116 files changed, 2139 insertions, 555 deletions
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index f84337660ea..91dada3ee05 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -12,9 +12,10 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
+innodb_plugin.* @solaris # Bug#56063 InnoDB Plugin mysql-tests fail on Solaris
+
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
main.func_str @solaris # joro: Bug#40928
-main.plugin_load @solaris # Bug#42144
main.sp @solaris # joro : Bug#54138
main.outfile_loaddata @solaris # joro : Bug #46895
@@ -44,3 +45,6 @@ parts.partition_syntax_ndb # joro : NDB tests marked as experiment
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
main.mysqlhotcopy_myisam # horst: due to bug#54129
main.mysqlhotcopy_archive # horst: due to bug#54129
+main.gis-rtree # svoj: due to BUG#38965
+main.type_float # svoj: due to BUG#38965
+main.type_newdecimal # svoj: due to BUG#38965
diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test
index 1ae17398596..a3c7d032c32 100644
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test
@@ -1,5 +1,5 @@
# Requires statement logging
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_statement.inc
# See if replication of a "LOAD DATA in an autoincrement column"
# Honours autoincrement values
diff --git a/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
new file mode 100644
index 00000000000..65d2483dc4b
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
@@ -0,0 +1,235 @@
+--echo
+--echo
+connection master;
+
+if ($is_temporary)
+{
+ --let $_temporary=TEMPORARY
+}
+
+CREATE TABLE t2(c1 INT, c2 char(10));
+INSERT INTO t2 VALUES(1, 'abc'), (2, 'abc');
+
+--echo
+--echo # The original query should be binlogged if the table does not exist.
+--echo # ------------------------------------------------------------------
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
+ SELECT 'abc' AS c3, 1 AS c4;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # The statement should be binlogged as two events. one is
+--echo # 'CREATE $_temporary TABLE IF NOT EXISTS ..', another one is
+--echo # 'INSERT ... SELECT'.
+--echo # ------------------------------------------------------------------
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ SELECT 'abc', 2;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # Verify if it can be binlogged with right database name when the table
+--echo # is not in the default database
+--echo
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+CREATE DATABASE db1;
+USE db1;
+
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS test.t1
+ SELECT 'abc', 20;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+USE test;
+DROP DATABASE db1;
+
+--echo
+--echo # It should be binlogged as 'REPLACE ... SELECT'
+--echo # if the original statement has option REPLACE
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ REPLACE SELECT '123', 2;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # It should be binlogged as 'INSERT IGNORE... SELECT'
+--echo # if the original statement has option IGNORE
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ IGNORE SELECT '123', 2;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # Nothing should be binlogged if error happens and no any row is inserted
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+--error ER_DUP_ENTRY
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ SELECT '123', 2;
+source include/show_binlog_events.inc;
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # Verify it can binlog well when there are some braces('(')
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ (SELECT '123', 3) UNION (SELECT '123', 4);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ REPLACE (SELECT 'abc', 3) UNION (SELECT 'abc', 4);
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ IGNORE (SELECT '123', 3) UNION (SELECT '123', 4);
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+if (!$is_temporary)
+{
+ --echo
+ --echo # Throw a warning that table already exists and don't insert anything
+ --echo
+ CREATE VIEW t3 AS SELECT * FROM t2;
+ let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+ CREATE TABLE IF NOT EXISTS t3
+ SELECT '123', 2;
+ source include/show_binlog_events.inc;
+ DROP VIEW t3;
+}
+
+--echo
+--echo # The statement can be binlogged correctly when it is in a SP/EVENT/TRIGGER
+--echo
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+eval CREATE PROCEDURE p1(IN a INT)
+ CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', a;
+
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+call p1(500);
+call p1(600);
+source include/show_binlog_events.inc;
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+DROP PROCEDURE p1;
+
+--echo
+--echo # The statement can be binlogged correctly when it is in a prepared statement
+--echo
+eval PREPARE stm FROM "CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', ?";
+
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+SET @a= 700;
+EXECUTE stm USING @a;
+SET @a= 800;
+EXECUTE stm USING @a;
+source include/show_binlog_events.inc;
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+--echo
+--echo # The statement can be binlogged correctly when it is in a conditional comment
+--echo
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo # The whole statement in a conditional comment
+eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
+ SELECT 'abc', 900*/;
+source include/show_binlog_events.inc;
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo
+--echo # There is an long comment before SELECT
+eval /*!CREATE $_temporary /*blabla*/ TABLE IF NOT EXISTS t1
+ SELECT 'abc', 901*/;
+source include/show_binlog_events.inc;
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo
+--echo # Conditional comment starts just from SELECT
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ /*!SELECT 'abc',*/ 902;
+source include/show_binlog_events.inc;
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo
+--echo # Only SELECT keyword is in the conditional comment
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ /*!SELECT*/ /*!'abc',*/ 904;
+source include/show_binlog_events.inc;
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo
+--echo # Conditional comment is after SELECT keyword
+eval CREATE $_temporary TABLE IF NOT EXISTS t1
+ SELECT /*!'abc',*/ 903;
+source include/show_binlog_events.inc;
+let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+--echo
+--echo # Conditional comment ends just before SELECT keyword
+eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
+ */SELECT 'abc', 905;
+source include/show_binlog_events.inc;
+
+if (!$is_temporary)
+{
+ let $diff_table= test.t1;
+ source include/rpl_diff_tables.inc;
+}
+
+DROP TABLE t2;
+eval DROP $_temporary TABLE t1;
+
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index 24e958e810f..ba11937dfb9 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -1910,7 +1910,7 @@ select hex(s1) from t4;
drop table t1,t2,t3,t4;
}
-if (test_foreign_keys)
+if ($test_foreign_keys)
{
eval create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=$engine_type;
eval create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=$engine_type;
@@ -2405,7 +2405,7 @@ drop table t1, t2, t3, t5, t6, t8, t9;
}
# End transactional tests
-if (test_foreign_keys)
+if ($test_foreign_keys)
{
# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
--error 1005
diff --git a/mysql-test/include/not_blackhole.inc b/mysql-test/include/not_blackhole.inc
new file mode 100644
index 00000000000..078927ec4ca
--- /dev/null
+++ b/mysql-test/include/not_blackhole.inc
@@ -0,0 +1,5 @@
+if (`SELECT count(*) FROM information_schema.engines WHERE
+ (support = 'YES' OR support = 'DEFAULT') AND
+ engine = 'blackhole'`){
+ skip Blackhole engine enabled;
+}
diff --git a/mysql-test/include/percona_query_response_time_show.inc b/mysql-test/include/percona_query_response_time_show.inc
index 761b2c6f0df..709abf9872e 100644
--- a/mysql-test/include/percona_query_response_time_show.inc
+++ b/mysql-test/include/percona_query_response_time_show.inc
@@ -1,7 +1,8 @@
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
diff --git a/mysql-test/include/rpl_diff_tables.inc b/mysql-test/include/rpl_diff_tables.inc
index c3a45578a79..7fc68422c40 100644
--- a/mysql-test/include/rpl_diff_tables.inc
+++ b/mysql-test/include/rpl_diff_tables.inc
@@ -33,3 +33,4 @@ while (`SELECT "XX$_servers" <> "XX"`)
--source include/diff_tables.inc
connection $_slave;
}
+connection $_master;
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm
index 0955c1bb190..bf6629754a1 100644
--- a/mysql-test/lib/My/Config.pm
+++ b/mysql-test/lib/My/Config.pm
@@ -246,6 +246,8 @@ sub new {
while ( my $line= <$F> ) {
chomp($line);
+ # Remove any trailing CR from Windows edited files
+ $line=~ s/\cM$//;
# [group]
if ( $line =~ /^\[(.*)\]/ ) {
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 7725b025dd8..9f8de3e5830 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -30,6 +30,13 @@ sub get_basedir {
return $basedir;
}
+sub get_testdir {
+ my ($self, $group)= @_;
+ my $testdir= $group->if_exist('testdir') ||
+ $self->{ARGS}->{testdir};
+ return $testdir;
+}
+
sub fix_charset_dir {
my ($self, $config, $group_name, $group)= @_;
@@ -138,7 +145,9 @@ sub fix_secure_file_priv {
sub fix_std_data {
my ($self, $config, $group_name, $group)= @_;
- return "$::opt_vardir/std_data";
+ #return "$::opt_vardir/std_data";
+ my $testdir= $self->get_testdir($group);
+ return "$testdir/std_data";
}
sub ssl_supported {
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
index 084ef408d5b..bdd6c7352ae 100644
--- a/mysql-test/lib/My/SafeProcess.pm
+++ b/mysql-test/lib/My/SafeProcess.pm
@@ -60,11 +60,12 @@ use My::Platform;
my %running;
my $_verbose= 0;
+my $start_exit= 0;
END {
# Kill any children still running
for my $proc (values %running){
- if ( $proc->is_child($$) ){
+ if ( $proc->is_child($$) and ! $start_exit){
#print "Killing: $proc\n";
if ($proc->wait_one(0)){
$proc->kill();
@@ -149,6 +150,11 @@ sub new {
push(@safe_args, "--");
push(@safe_args, $path); # The program safe_process should execute
+
+ if ($start_exit) { # Bypass safe_process instead, start program directly
+ @safe_args= ();
+ $safe_path= $path;
+ }
push(@safe_args, @$$args);
print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n"
@@ -534,6 +540,13 @@ sub wait_all {
}
}
+#
+# Set global flag to tell all safe_process to exit after starting child
+#
+
+sub start_exit {
+ $start_exit= 1;
+}
#
# Check if any process has exited, but don't wait.
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index fd4832d49a3..9f2dca5efb6 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -252,15 +252,11 @@ sub collect_one_suite
}
else
{
- $suitedir= my_find_dir($::basedir,
- ["mysql-test/suite",
- "mysql-test",
- "share/mysql-test/suite",
- "share/mysql-test",
- "share/mysql/mysql-test/suite",
- "share/mysql/mysql-test",
+ $suitedir= my_find_dir($suitedir,
+ ["suite",
+ ".",
# Look in storage engine specific suite dirs
- "storage/*/mysql-test-suites"
+ "../storage/*/mysql-test-suites"
],
[$suite]);
}
@@ -573,7 +569,7 @@ sub optimize_cases {
# Check that engine selected by
# --default-storage-engine=<engine> is supported
# =======================================================
- my %builtin_engines = ('myisam' => 1, 'memory' => 1);
+ my %builtin_engines = ('myisam' => 1, 'memory' => 1, 'csv' => 1);
foreach my $opt ( @{$tinfo->{master_opt}} ) {
my $default_engine=
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index c13e6a93319..a90c367178d 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -120,7 +120,7 @@ sub mtr_report_test ($) {
my $timest = format_time();
my $fail = "fail";
- if ( $::opt_experimental )
+ if ( @$::experimental_test_cases )
{
# Find out if this test case is an experimental one, so we can treat
# the failure as an expected failure instead of a regression.
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 291dfd0d4eb..2eb32c33954 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -191,8 +191,8 @@ our $opt_client_debugger;
my $config; # The currently running config
my $current_config_name; # The currently running config file template
-our $opt_experimental;
-our $experimental_test_cases;
+our @opt_experimentals;
+our $experimental_test_cases= [];
my $baseport;
# $opt_build_thread may later be set from $opt_port_base
@@ -222,8 +222,10 @@ sub check_timeout { return $opt_testcase_timeout * 6; };
my $opt_start;
my $opt_start_dirty;
+my $opt_start_exit;
my $start_only;
my $opt_wait_all;
+my $opt_user_args;
my $opt_repeat= 1;
my $opt_retry= 1;
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
@@ -375,6 +377,12 @@ sub main {
mtr_report("Using parallel: $opt_parallel");
}
+ if ($opt_parallel > 1 && $opt_start_exit) {
+ mtr_warning("Parallel and --start-and-exit cannot be combined\n" .
+ "Setting parallel to 1");
+ $opt_parallel= 1;
+ }
+
# Create server socket on any free port
my $server = new IO::Socket::INET
(
@@ -415,6 +423,8 @@ sub main {
my ($prefix, $fail, $completed, $extra_warnings)=
run_test_server($server, $tests, $opt_parallel);
+ exit(0) if $opt_start_exit;
+
# Send Ctrl-C to any children still running
kill("INT", keys(%children));
@@ -902,7 +912,7 @@ sub command_line_setup {
'big-test' => \$opt_big_test,
'combination=s' => \@opt_combinations,
'skip-combinations' => \&collect_option,
- 'experimental=s' => \$opt_experimental,
+ 'experimental=s' => \@opt_experimentals,
'skip-im' => \&ignore_option,
'staging-run' => \$opt_staging_run,
@@ -982,7 +992,9 @@ sub command_line_setup {
'verbose-restart' => \&report_option,
'sleep=i' => \$opt_sleep,
'start-dirty' => \$opt_start_dirty,
+ 'start-and-exit' => \$opt_start_exit,
'start' => \$opt_start,
+ 'user-args' => \$opt_user_args,
'wait-all' => \$opt_wait_all,
'print-testcases' => \&collect_option,
'repeat=i' => \$opt_repeat,
@@ -1088,43 +1100,47 @@ sub command_line_setup {
mtr_print_thick_line('#');
}
- if ( $opt_experimental )
+ if ( @opt_experimentals )
{
# $^O on Windows considered not generic enough
my $plat= (IS_WINDOWS) ? 'windows' : $^O;
- # read the list of experimental test cases from the file specified on
+ # read the list of experimental test cases from the files specified on
# the command line
- open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental");
- mtr_report("Using experimental file: $opt_experimental");
$experimental_test_cases = [];
- while(<FILE>) {
- chomp;
- # remove comments (# foo) at the beginning of the line, or after a
- # blank at the end of the line
- s/( +|^)#.*$//;
- # If @ platform specifier given, use this entry only if it contains
- # @<platform> or @!<xxx> where xxx != platform
- if (/\@.*/)
- {
- next if (/\@!$plat/);
- next unless (/\@$plat/ or /\@!/);
- # Then remove @ and everything after it
- s/\@.*$//;
- }
- # remove whitespace
- s/^ +//;
- s/ +$//;
- # if nothing left, don't need to remember this line
- if ( $_ eq "" ) {
- next;
+ foreach my $exp_file (@opt_experimentals)
+ {
+ open(FILE, "<", $exp_file)
+ or mtr_error("Can't read experimental file: $exp_file");
+ mtr_report("Using experimental file: $exp_file");
+ while(<FILE>) {
+ chomp;
+ # remove comments (# foo) at the beginning of the line, or after a
+ # blank at the end of the line
+ s/( +|^)#.*$//;
+ # If @ platform specifier given, use this entry only if it contains
+ # @<platform> or @!<xxx> where xxx != platform
+ if (/\@.*/)
+ {
+ next if (/\@!$plat/);
+ next unless (/\@$plat/ or /\@!/);
+ # Then remove @ and everything after it
+ s/\@.*$//;
+ }
+ # remove whitespace
+ s/^ +//;
+ s/ +$//;
+ # if nothing left, don't need to remember this line
+ if ( $_ eq "" ) {
+ next;
+ }
+ # remember what is left as the name of another test case that should be
+ # treated as experimental
+ print " - $_\n";
+ push @$experimental_test_cases, $_;
}
- # remember what is left as the name of another test case that should be
- # treated as experimental
- print " - $_\n";
- push @$experimental_test_cases, $_;
+ close FILE;
}
- close FILE;
}
foreach my $arg ( @ARGV )
@@ -1395,7 +1411,7 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Modified behavior with --start options
# --------------------------------------------------------------------------
- if ($opt_start or $opt_start_dirty) {
+ if ($opt_start or $opt_start_dirty or $opt_start_exit) {
collect_option ('quick-collect', 1);
$start_only= 1;
}
@@ -1408,12 +1424,23 @@ sub command_line_setup {
}
# --------------------------------------------------------------------------
+ # Check use of user-args
+ # --------------------------------------------------------------------------
+
+ if ($opt_user_args) {
+ mtr_error("--user-args only valid with --start options")
+ unless $start_only;
+ mtr_error("--user-args cannot be combined with named suites or tests")
+ if $opt_suites || @opt_cases;
+ }
+
+ # --------------------------------------------------------------------------
# Check use of wait-all
# --------------------------------------------------------------------------
if ($opt_wait_all && ! $start_only)
{
- mtr_error("--wait-all can only be used with --start or --start-dirty");
+ mtr_error("--wait-all can only be used with --start options");
}
# --------------------------------------------------------------------------
@@ -2984,6 +3011,7 @@ sub default_mysqld {
my $config= My::ConfigFactory->new_config
( {
basedir => $basedir,
+ testdir => $glob_mysql_test_dir,
template_path => "include/default_my.cnf",
vardir => $opt_vardir,
tmpdir => $opt_tmpdir,
@@ -3259,7 +3287,8 @@ sub check_testcase($$)
my %started;
foreach my $mysqld ( mysqlds() )
{
- if ( defined $mysqld->{'proc'} )
+ # Skip if server has been restarted with additional options
+ if ( defined $mysqld->{'proc'} && ! exists $mysqld->{'restart_opts'} )
{
my $proc= start_check_testcase($tinfo, $mode, $mysqld);
$started{$proc->pid()}= $proc;
@@ -3709,6 +3738,7 @@ sub run_testcase ($$) {
$config= My::ConfigFactory->new_config
( {
basedir => $basedir,
+ testdir => $glob_mysql_test_dir,
template_path => $tinfo->{template_path},
extra_template_path => $tinfo->{extra_template_path},
vardir => $opt_vardir,
@@ -3752,6 +3782,11 @@ sub run_testcase ($$) {
# Write start of testcase to log
mark_log($path_current_testlog, $tinfo);
+ # Make sure the safe_process also exits from now on
+ if ($opt_start_exit) {
+ My::SafeProcess->start_exit();
+ }
+
if (start_servers($tinfo))
{
report_failure_and_restart($tinfo);
@@ -3776,6 +3811,18 @@ sub run_testcase ($$) {
mtr_print ($mysqld->name() . " " . $mysqld->value('port') .
" " . $mysqld->value('socket'));
}
+ if ( $opt_start_exit )
+ {
+ mtr_print("Server(s) started, not waiting for them to finish");
+ if (IS_WINDOWS)
+ {
+ POSIX::_exit(0); # exit hangs here in ActiveState Perl
+ }
+ else
+ {
+ exit(0);
+ }
+ }
mtr_print("Waiting for server(s) to exit...");
if ( $opt_wait_all ) {
My::SafeProcess->wait_all();
@@ -4494,6 +4541,16 @@ sub check_expected_crash_and_restart {
next;
}
+ # If last line begins "restart:", the rest of the line is read as
+ # extra command line options to add to the restarted mysqld.
+ # Anything other than 'wait' or 'restart:' (with a colon) will
+ # result in a restart with original mysqld options.
+ if ($last_line =~ /restart:(.+)/) {
+ my @rest_opt= split(' ', $1);
+ $mysqld->{'restart_opts'}= \@rest_opt;
+ } else {
+ delete $mysqld->{'restart_opts'};
+ }
unlink($expect_file);
# Start server with same settings as last time
@@ -4732,7 +4789,7 @@ sub mysqld_arguments ($$$) {
mtr_add_arg($args, "%s--disable-sync-frm");
- if (!using_extern() and $mysql_version_id >= 50106 )
+ if (!using_extern() and $mysql_version_id >= 50106 && !$opt_user_args)
{
# Turn on logging to file and tables
mtr_add_arg($args, "%s--log-output=table,file");
@@ -4770,7 +4827,7 @@ sub mysqld_arguments ($$$) {
}
}
$opt_skip_core = $found_skip_core;
- if ( !$found_skip_core )
+ if ( !$found_skip_core && !$opt_user_args )
{
mtr_add_arg($args, "%s", "--core-file");
}
@@ -4778,7 +4835,7 @@ sub mysqld_arguments ($$$) {
# Enable the debug sync facility, set default wait timeout.
# Facility stays disabled if timeout value is zero.
mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
- $opt_debug_sync_timeout);
+ $opt_debug_sync_timeout) unless $opt_user_args;
return $args;
}
@@ -4810,7 +4867,13 @@ sub mysqld_start ($$) {
}
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
- mysqld_arguments($args,$mysqld,$extra_opts);
+
+ # Add any additional options from an in-test restart
+ my @all_opts= @$extra_opts;
+ if (exists $mysqld->{'restart_opts'}) {
+ push (@all_opts, @{$mysqld->{'restart_opts'}});
+ }
+ mysqld_arguments($args,$mysqld,\@all_opts);
if ( $opt_debug )
{
@@ -5003,7 +5066,10 @@ sub server_need_restart {
my $extra_opts= get_extra_opts($server, $tinfo);
my $started_opts= $server->{'started_opts'};
- if (!My::Options::same($started_opts, $extra_opts) )
+ # Also, always restart if server had been restarted with additional
+ # options within test.
+ if (!My::Options::same($started_opts, $extra_opts) ||
+ exists $server->{'restart_opts'})
{
my $use_dynamic_option_switch= 0;
if (!$use_dynamic_option_switch)
@@ -5072,6 +5138,9 @@ sub stopped { return grep(!defined $_, map($_->{proc}, @_)); }
sub get_extra_opts {
+ # No extra options if --user-args
+ return \@opt_extra_mysqld_opt if $opt_user_args;
+
my ($mysqld, $tinfo)= @_;
my $opts=
@@ -5762,8 +5831,13 @@ Misc options
startup settings for the first specified test case
Example:
$0 --start alias &
+ start-and-exit Same as --start, but mysql-test-run terminates and
+ leaves just the server running
start-dirty Only start the servers (without initialization) for
the first specified test case
+ user-args In combination with start* and no test name, drops
+ arguments to mysqld except those speficied with
+ --mysqld (if any)
wait-all If --start or --start-dirty option is used, wait for all
servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index e2eebdfc992..1cff420e34e 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5);
truncate table t1;
affected rows: 0
drop table t1;
-create table t1 (v varchar(32) not null);
+create table t1 (v varchar(32) not null) engine=csv;
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
v
@@ -5146,14 +5146,14 @@ def
abc
hij
3r4f
-alter table t1 change v v2 varchar(32);
+alter table t1 change v v2 varchar(32) not null;
select * from t1;
v2
def
abc
hij
3r4f
-alter table t1 change v2 v varchar(64);
+alter table t1 change v2 v varchar(64) not null;
select * from t1;
v
def
@@ -5163,35 +5163,34 @@ hij
update t1 set v = 'lmn' where v = 'hij';
select * from t1;
v
+lmn
def
abc
-lmn
3r4f
-alter table t1 add i int auto_increment not null primary key first;
+alter table t1 add i int not null first;
select * from t1;
i v
-1 def
-2 abc
-3 lmn
-4 3r4f
-update t1 set i=5 where i=3;
+0 lmn
+0 def
+0 abc
+0 3r4f
+update t1 set i=3 where v = 'abc';
select * from t1;
i v
-1 def
-2 abc
-5 lmn
-4 3r4f
-alter table t1 change i i bigint;
+3 abc
+0 lmn
+0 def
+0 3r4f
+alter table t1 change i i bigint not null;
select * from t1;
i v
-1 def
-2 abc
-5 lmn
-4 3r4f
-alter table t1 add unique key (i, v);
-select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
+3 abc
+0 lmn
+0 def
+0 3r4f
+select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
i v
-4 3r4f
+3 abc
drop table t1;
create table bug15205 (val int(11) not null) engine=csv;
create table bug15205_2 (val int(11) not null) engine=csv;
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index 36025cbfb35..7d6fc30be67 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -358,4 +358,13 @@ INDEX(a), INDEX(b), INDEX(c));
INSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9);
DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1;
DROP TABLE t1;
+#
+# Bug #53034: Multiple-table DELETE statements not accepting
+# "Access compatibility" syntax
+#
+CREATE TABLE t1 (id INT);
+CREATE TABLE t2 LIKE t1;
+CREATE TABLE t3 LIKE t1;
+DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
+DROP TABLE t1, t2, t3;
End of 5.1 tests
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index da800c04d9d..1c04ab304fa 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1713,4 +1713,15 @@ f1 f2 f3 f4 f1 = f2
NULL NULL NULL NULL NULL
drop table t1;
#
+# Bug #54465: assert: field_types == 0 || field_types[field_pos] ==
+# MYSQL_TYPE_LONGLONG
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1
+ORDER BY t1.a;
+m
+1
+DROP TABLE t1;
+#
End of 5.1 tests
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index bbc5390895b..87b88692a34 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -194,7 +194,7 @@ date("1997-12-31 23:59:59.000001") as f8,
time("1997-12-31 23:59:59.000001") as f9;
describe t1;
Field Type Null Key Default Extra
-f1 date NO 0000-00-00
+f1 date YES NULL
f2 datetime YES NULL
f3 time YES NULL
f4 time YES NULL
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 8b96a60b79c..5500eefda4c 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1335,4 +1335,12 @@ date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND)
select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND)
0168-12-31 23:59:59
+CREATE TABLE t1(a DOUBLE NOT NULL);
+INSERT INTO t1 VALUES (0),(9.216e-096);
+# should not crash
+SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
+1
+1
+1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 3e28227d542..3b18ee61336 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -707,10 +707,7 @@ numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
y(b) IS NULL
from t1;
-geometryfromtext(b) IS NULL geometryfromwkb(b) IS NULL astext(b) IS NULL aswkb(b) IS NULL geometrytype(b) IS NULL centroid(b) IS NULL envelope(b) IS NULL startpoint(b) IS NULL endpoint(b) IS NULL exteriorring(b) IS NULL pointn(b, 1) IS NULL geometryn(b, 1) IS NULL interiorringn(b, 1) IS NULL multipoint(b) IS NULL isempty(b) IS NULL issimple(b) IS NULL isclosed(b) IS NULL dimension(b) IS NULL numgeometries(b) IS NULL numinteriorrings(b) IS NULL numpoints(b) IS NULL area(b) IS NULL glength(b) IS NULL srid(b) IS NULL x(b) IS NULL y(b) IS NULL
-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
select
within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
@@ -725,10 +722,7 @@ point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS
multilinestring(b) IS NULL, multipolygon(b) IS NULL,
geometrycollection(b) IS NULL
from t1;
-point(b, b) IS NULL linestring(b) IS NULL polygon(b) IS NULL multipoint(b) IS NULL multilinestring(b) IS NULL multipolygon(b) IS NULL geometrycollection(b) IS NULL
-0 1 1 1 1 1 1
-1 1 1 1 1 1 1
-0 1 1 1 1 1 1
+ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
drop table t1;
CREATE TABLE t1(a POINT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (NULL);
@@ -1010,51 +1004,14 @@ f5 datetime YES NULL
drop view v1;
drop table t1;
SELECT MultiPoint(12345,'');
-MultiPoint(12345,'')
-NULL
-SELECT MultiPoint(123451,'');
-MultiPoint(123451,'')
-NULL
-SELECT MultiPoint(1234512,'');
-MultiPoint(1234512,'')
-NULL
-SELECT MultiPoint(12345123,'');
-MultiPoint(12345123,'')
-NULL
-SELECT MultiLineString(12345,'');
-MultiLineString(12345,'')
-NULL
-SELECT MultiLineString(123451,'');
-MultiLineString(123451,'')
-NULL
-SELECT MultiLineString(1234512,'');
-MultiLineString(1234512,'')
-NULL
-SELECT MultiLineString(12345123,'');
-MultiLineString(12345123,'')
-NULL
-SELECT LineString(12345,'');
-LineString(12345,'')
-NULL
-SELECT LineString(123451,'');
-LineString(123451,'')
-NULL
-SELECT LineString(1234512,'');
-LineString(1234512,'')
-NULL
-SELECT LineString(12345123,'');
-LineString(12345123,'')
-NULL
-SELECT Polygon(12345,'');
-Polygon(12345,'')
-NULL
-SELECT Polygon(123451,'');
-Polygon(123451,'')
-NULL
-SELECT Polygon(1234512,'');
-Polygon(1234512,'')
-NULL
-SELECT Polygon(12345123,'');
-Polygon(12345123,'')
-NULL
+ERROR 22007: Illegal non geometric '12345' value found during parsing
+SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
+ERROR 22007: Illegal non geometric ''00000'' value found during parsing
+#
+# BUG#51875: crash when loading data into geometry function polyfromwkb
+#
+SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
+SET @a=POLYFROMWKB(@a);
+SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
+SET @a=POLYFROMWKB(@a);
End of 5.1 tests
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index 471219dd1a0..85569ad9d35 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2444,7 +2444,7 @@ a b
3 13
explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range PRIMARY,index PRIMARY 4 NULL 3 100.00 Using where; Using index for group-by; Using temporary
+1 SIMPLE t1 ref PRIMARY,index PRIMARY 4 const 15 100.00 Using index; Using temporary
Warnings:
Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a`
drop table t1;
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 4ed56bf3c56..df4c579ea1c 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -639,3 +639,18 @@ CREATE TABLE t2(f1 CHAR(1));
INSERT INTO t2 SELECT f1 FROM t1;
DROP TABLE t1, t2;
End of 5.0 tests.
+#
+# Bug#54106 assert in Protocol::end_statement,
+# INSERT IGNORE ... SELECT ... UNION SELECT ...
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 (a, a) VALUES (1, 1);
+ERROR 42000: Column 'a' specified twice
+INSERT IGNORE t1 (a, a) VALUES (1, 1);
+ERROR 42000: Column 'a' specified twice
+INSERT IGNORE t1 (a, a) SELECT 1,1;
+ERROR 42000: Column 'a' specified twice
+INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2;
+ERROR 42000: Column 'a' specified twice
+DROP TABLE t1;
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index af0a9d5f98d..79eb2e3287e 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -1184,4 +1184,40 @@ NULL
NULL
1
DROP TABLE t1, t2, mm1;
+#
+# Bug #54468: crash after item's print() function when ordering/grouping
+# by subquery
+#
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (), ();
+SELECT 1 FROM t1
+GROUP BY
+GREATEST(t1.a,
+(SELECT 1 FROM
+(SELECT t1.b FROM t1,t1 t2
+ORDER BY t1.a, t1.a LIMIT 1) AS d)
+);
+1
+1
+DROP TABLE t1;
+#
+# Bug #53544: Server hangs during JOIN query in stored procedure called
+# twice in a row
+#
+CREATE TABLE t1(c INT);
+INSERT INTO t1 VALUES (1), (2);
+PREPARE stmt FROM "SELECT t2.c AS f1 FROM t1 LEFT JOIN
+ t1 t2 ON t1.c=t2.c RIGHT JOIN
+ t1 t3 ON t1.c=t3.c
+ GROUP BY f1;";
+EXECUTE stmt;
+f1
+1
+2
+EXECUTE stmt;
+f1
+1
+2
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 4c711c5a977..941ae63cf89 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -326,6 +326,7 @@ outer=2 ifval=0
outer=1 ifval=1
here is the sourced script
ERROR 42S02: Table 'test.nowhere' doesn't exist
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'else' at line 1
In loop
here is the sourced script
@@ -393,6 +394,9 @@ true-inner again
true-outer
Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0)
+Counter is true, (counter=alpha)
+Beta is true
+while with string, only once
1
Testing while with not
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
@@ -447,7 +451,6 @@ OK
mysqltest: The test didn't produce any output
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
-connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
show tables;
ERROR 3D000: No database selected
Output from mysqltest-x.inc
@@ -573,7 +576,7 @@ if things work as expected
Some data
for cat_file command
of mysqltest
-mysqltest: At line 1: Failed to open file 'non_existing_file'
+mysqltest: At line 1: command "cat_file" failed with error 1
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
diff --git a/mysql-test/r/partition_not_blackhole.result b/mysql-test/r/partition_not_blackhole.result
new file mode 100644
index 00000000000..dc0339f8c48
--- /dev/null
+++ b/mysql-test/r/partition_not_blackhole.result
@@ -0,0 +1,16 @@
+DROP TABLE IF EXISTS t1;
+#
+# Bug#46086: crash when dropping a partitioned table and
+# the original engine is disabled
+# Copy a .frm and .par file which was created with:
+# create table `t1` (`id` int primary key) engine=blackhole
+# partition by key () partitions 1;
+SHOW TABLES;
+Tables_in_test
+t1
+SHOW CREATE TABLE t1;
+ERROR HY000: Incorrect information in file: './test/t1.frm'
+DROP TABLE t1;
+ERROR 42S02: Unknown table 't1'
+t1.frm
+t1.par
diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result
index 731f2478cc9..7a3ff4861cc 100644
--- a/mysql-test/r/partition_range.result
+++ b/mysql-test/r/partition_range.result
@@ -808,3 +808,47 @@ select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 200703
sum(count)
579
drop table t1, t2;
+#
+# Bug#50939: Loose Index Scan unduly relies on engine to remember range
+# endpoints
+#
+CREATE TABLE t1 (
+a INT,
+b INT,
+KEY ( a, b )
+) PARTITION BY HASH (a) PARTITIONS 1;
+CREATE TABLE t2 (
+a INT,
+b INT,
+KEY ( a, b )
+);
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
+INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
+INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
+INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
+INSERT INTO t2 SELECT * FROM t1;
+# plans should be identical
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index for group-by
+EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index for group-by
+FLUSH status;
+SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
+a MAX(b)
+10 10
+# Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+Variable_name Value
+Handler_read_key 4
+FLUSH status;
+SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
+a MAX(b)
+10 10
+# Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+Variable_name Value
+Handler_read_key 4
+DROP TABLE t1, t2;
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 8169bd458e8..ec9d804d6da 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -111,6 +111,9 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660
+select create_options from information_schema.tables where table_schema='test' and table_name='t1';
+create_options
+`ULL`=4660
ALTER TABLE t1 ULL=DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index f6ce69f4069..3e689e97b93 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1653,4 +1653,17 @@ a b
0 0
1 1
DROP TABLE t1;
+#
+# Bug #54802: 'NOT BETWEEN' evaluation is incorrect
+#
+CREATE TABLE t1 (c_key INT, c_notkey INT, KEY(c_key));
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
+EXPLAIN SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL c_key NULL NULL NULL 3 Using where
+SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
+c_key c_notkey
+1 1
+3 3
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index ed1699c1409..90d26566cd5 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -81,7 +81,27 @@ col_int_nokey sub
0 NULL
2 11
DROP TABLE t1,t2;
-End of 5.1 tests.
+#
+# Bug#54568: create view cause Assertion failed: 0,
+# file .\item_subselect.cc, line 836
+#
+EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1249 Select 2 was reduced during optimization
+DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1249 Select 2 was reduced during optimization
+# None of the below should crash
+CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
+DROP VIEW v1, v2;
+#
+# End of 5.1 tests.
+#
#
# BUG#46743 "Azalea processing correlated, aggregate SELECT
# subqueries incorrectly"
diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result
index 2948bb8ecec..e2e337628ce 100644
--- a/mysql-test/r/timezone2.result
+++ b/mysql-test/r/timezone2.result
@@ -296,4 +296,16 @@ CONVERT_TZ(NOW(), 'UTC', 'Europe/Moscow') IS NULL
UPDATE t1 SET t = CONVERT_TZ(t, 'UTC', 'Europe/Moscow');
UNLOCK TABLES;
DROP TABLE t1;
+#
+# Bug #55424: convert_tz crashes when fed invalid data
+#
+CREATE TABLE t1 (a SET('x') NOT NULL);
+INSERT INTO t1 VALUES ('');
+SELECT CONVERT_TZ(1, a, 1) FROM t1;
+CONVERT_TZ(1, a, 1)
+NULL
+SELECT CONVERT_TZ(1, 1, a) FROM t1;
+CONVERT_TZ(1, 1, a)
+NULL
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 98208cdfbeb..089845560ed 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -1797,11 +1797,8 @@ Note 1050 Table 'v1' already exists
set @id=last_insert_id();
select * from t1;
id operation
-1 CREATE TABLE ... SELECT, inserting a new key
select * from t1_op_log;
operation
-Before INSERT, new=CREATE TABLE ... SELECT, inserting a new key
-After INSERT, new=CREATE TABLE ... SELECT, inserting a new key
truncate t1_op_log;
create table if not exists v1 replace
select @id, "CREATE TABLE ... REPLACE SELECT, deleting a duplicate key";
@@ -1809,13 +1806,8 @@ Warnings:
Note 1050 Table 'v1' already exists
select * from t1;
id operation
-1 CREATE TABLE ... REPLACE SELECT, deleting a duplicate key
select * from t1_op_log;
operation
-Before INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key
-Before DELETE, old=CREATE TABLE ... SELECT, inserting a new key
-After DELETE, old=CREATE TABLE ... SELECT, inserting a new key
-After INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key
truncate t1;
truncate t1_op_log;
insert into v1 (id, operation)
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index be10bd9954b..56266a46e20 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -430,4 +430,21 @@ CREATE TRIGGER t_after_insert AFTER INSERT ON t1 FOR EACH ROW SET @bug42188 = 10
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (0),(0);
+# BUG#55615 : should not crash
+SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a;
+(@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1)
+1
+1
+# BUG#55564 : should not crash
+SELECT IF(
+@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
+count(*), 1)
+FROM t1 GROUP BY a LIMIT 1;
+IF(
+@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
+count(*), 1)
+1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/std_data/parts/t1_blackhole.frm b/mysql-test/std_data/parts/t1_blackhole.frm
new file mode 100644
index 00000000000..be77b7a041a
--- /dev/null
+++ b/mysql-test/std_data/parts/t1_blackhole.frm
Binary files differ
diff --git a/mysql-test/std_data/parts/t1_blackhole.par b/mysql-test/std_data/parts/t1_blackhole.par
new file mode 100644
index 00000000000..6528edf190c
--- /dev/null
+++ b/mysql-test/std_data/parts/t1_blackhole.par
Binary files differ
diff --git a/mysql-test/suite/binlog/r/binlog_mixed_load_data.result b/mysql-test/suite/binlog/r/binlog_mixed_load_data.result
new file mode 100644
index 00000000000..840257f11ff
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_mixed_load_data.result
@@ -0,0 +1,10 @@
+RESET MASTER;
+CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=MYISAM;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
index ec61271ae88..b87d47559fe 100644
--- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
@@ -1,5 +1,5 @@
-- source include/have_debug.inc
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_statement.inc
#
# bug#27571 asynchronous setting mysql_$query()'s local error and
# Query_log_event::error_code
diff --git a/mysql-test/suite/binlog/t/binlog_mixed_load_data.test b/mysql-test/suite/binlog/t/binlog_mixed_load_data.test
new file mode 100644
index 00000000000..7e7cb973c1b
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mixed_load_data.test
@@ -0,0 +1,15 @@
+#
+# Bug #34283 mysqlbinlog leaves tmpfile after termination
+# if binlog contains load data infile, so in mixed mode we
+# go to row-based for avoiding the problem.
+#
+
+--source include/have_binlog_format_mixed.inc
+--source include/have_log_bin.inc
+
+RESET MASTER;
+CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=MYISAM;
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+--source include/show_binlog_events.inc
+DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/t/binlog_stm_blackhole.test b/mysql-test/suite/binlog/t/binlog_stm_blackhole.test
index 02ba2be095b..6047d8ca2fc 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_blackhole.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_blackhole.test
@@ -2,5 +2,5 @@
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_statement.inc
-- source extra/binlog_tests/blackhole.test
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
index 67d9c76ccac..ee1548fe012 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges;
DROP PROCEDURE IF EXISTS sp1;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -91,7 +90,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
--------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3;
@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer
@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp5_s_i();
@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -340,7 +332,6 @@ c1
inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -361,7 +352,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -379,7 +369,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
index 24ebd38e403..6591a138d73 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
@@ -81,7 +81,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
@@ -94,7 +93,6 @@ DECLARE res INT;
SET res = n * n;
RETURN res;
END//
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -113,7 +111,6 @@ fn31105( 9 )
81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
index b02fba0f38d..a7fce94c91d 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2:
-----------------
@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs;
Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index 476ccc6ebd8..5b760116801 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create:
--------------------------------------------
@@ -32,7 +31,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db;
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create:
-----------------------------------------------
@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -698,7 +691,6 @@ select f1 from t1 order by f1;
f1
insert-yes
insert-yes
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
trigger privilege on one db1 db level, not on db2
@@ -982,7 +972,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1010,7 +999,6 @@ select f1 from t1 order by f1;
f1
trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
-connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_useprivs@localhost
@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= innodb;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= innodb;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column:
----------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
index 33e58f50ec1..8597f252e54 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4:
---------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
index 6ced07cef73..b2b38694680 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests)
---------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
index eb617c68ae9..096cbd1261e 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges;
DROP PROCEDURE IF EXISTS sp1;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -92,7 +91,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
--------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3;
@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer
@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp5_s_i();
@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -341,7 +333,6 @@ c1
inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -362,7 +353,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -380,7 +370,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
index f5e34b0063c..4a932ee826b 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
@@ -82,7 +82,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
@@ -95,7 +94,6 @@ DECLARE res INT;
SET res = n * n;
RETURN res;
END//
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -114,7 +112,6 @@ fn31105( 9 )
81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
index 7f38fd1f182..0d622915dca 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2:
-----------------
@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs;
Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index bbee7d47e7e..95c833b90c3 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create:
--------------------------------------------
@@ -33,7 +32,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db;
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create:
-----------------------------------------------
@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -699,7 +692,6 @@ select f1 from t1 order by f1;
f1
insert-yes
insert-yes
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
trigger privilege on one db1 db level, not on db2
@@ -983,7 +973,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1;
f1
trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
-connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_useprivs@localhost
@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= memory;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column:
----------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
index 2f76f5544b9..b8d15b5403b 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4:
---------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result
index ab570072087..03505af95c5 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result
@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests)
---------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
index eb617c68ae9..096cbd1261e 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges;
DROP PROCEDURE IF EXISTS sp1;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -92,7 +91,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
--------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3;
@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer
@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp5_s_i();
@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -341,7 +333,6 @@ c1
inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -362,7 +353,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -380,7 +370,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
index f5e34b0063c..4a932ee826b 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
@@ -82,7 +82,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
@@ -95,7 +94,6 @@ DECLARE res INT;
SET res = n * n;
RETURN res;
END//
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -114,7 +112,6 @@ fn31105( 9 )
81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
index 7f38fd1f182..0d622915dca 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2:
-----------------
@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs;
Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index e4dc67098ad..9e0811d29fd 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create:
--------------------------------------------
@@ -33,7 +32,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db;
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create:
-----------------------------------------------
@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -699,7 +692,6 @@ select f1 from t1 order by f1;
f1
insert-yes
insert-yes
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
trigger privilege on one db1 db level, not on db2
@@ -983,7 +973,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1;
f1
trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
-connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_useprivs@localhost
@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= myisam;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column:
----------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
index 2f76f5544b9..b8d15b5403b 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4:
---------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
index ab570072087..03505af95c5 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests)
---------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
index 67d9c76ccac..ee1548fe012 100644
--- a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges;
DROP PROCEDURE IF EXISTS sp1;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -91,7 +90,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
--------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3;
@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer
@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp5_s_i();
@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END//
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -340,7 +332,6 @@ c1
inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -361,7 +352,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
@@ -379,7 +369,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
index 24ebd38e403..6591a138d73 100644
--- a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
@@ -81,7 +81,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
@@ -94,7 +93,6 @@ DECLARE res INT;
SET res = n * n;
RETURN res;
END//
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -113,7 +111,6 @@ fn31105( 9 )
81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
-connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result
index b02fba0f38d..a7fce94c91d 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_03.result
@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2:
-----------------
@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs;
Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_noprivs@localhost
@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
index 84260822edf..ec7cbeb2876 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result
@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create:
--------------------------------------------
@@ -32,7 +31,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db;
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create:
-----------------------------------------------
@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -698,7 +691,6 @@ select f1 from t1 order by f1;
f1
insert-yes
insert-yes
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_yesprivs@localhost
@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db;
trigger privilege on one db1 db level, not on db2
@@ -982,7 +972,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1010,7 +999,6 @@ select f1 from t1 order by f1;
f1
trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
-connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
test_useprivs@localhost
@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= ndb;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= ndb;
create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user;
current_user
root@localhost
@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
-connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column:
----------------------
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
index 33e58f50ec1..8597f252e54 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result
@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4:
---------------
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result
index 6ced07cef73..b2b38694680 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result
@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
-connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
-connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests)
---------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 3efb361dc82..8da7213bded 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -1834,7 +1834,6 @@ CREATE PROCEDURE sp11() insert into mysql.t1 values('a');
SELECT security_type from mysql.proc where specific_name='sp11';
security_type
DEFINER
-connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CALL sp11();
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
index f2df99fb5a3..4ecca63351d 100644
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
@@ -53,7 +53,6 @@ flush privileges;
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user1a, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -75,7 +74,6 @@ USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user1b, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -120,7 +118,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
# disconnect default;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -187,7 +184,6 @@ delimiter ;//
#disconnect default;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user3, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -234,7 +230,6 @@ grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user5_1, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -258,7 +253,6 @@ delimiter ;//
disconnect user5_1;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user5_2, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -365,7 +359,6 @@ GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_1, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -389,7 +382,6 @@ delimiter ;//
disconnect user6_1;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_2, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
@@ -407,7 +399,6 @@ GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
disconnect user6_2;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_3, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
CALL sp3166_s_i();
@@ -422,7 +413,6 @@ CALL sp3166_sel();
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_4, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
--error ER_TABLEACCESS_DENIED_ERROR
@@ -439,7 +429,6 @@ CALL sp3166_s_i();
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_5, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc
--error ER_PROCACCESS_DENIED_ERROR
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
index 83f5f2105c5..8382bcc1e55 100644
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
@@ -58,7 +58,6 @@ GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_1, localhost, user_1, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc
@@ -80,7 +79,6 @@ delimiter ;//
disconnect user2_1;
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_2, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc
@@ -102,7 +100,6 @@ FLUSH PRIVILEGES;
disconnect user2_2;
# new connection
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_3, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc
CALL sp31102();
@@ -121,7 +118,6 @@ FLUSH PRIVILEGES;
CALL sp31102();
SELECT fn31105( 9 );
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_4, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc
CALL sp31102();
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc
index 9ef6a9ac9af..f48d1979f77 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc
@@ -62,9 +62,7 @@ let $message= Testcase 3.5.3.2/6:;
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -155,9 +153,7 @@ let $message=Testcase 3.5.3.7a:;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection no_privs_424a;
@@ -209,9 +205,7 @@ let $message= Testcase 3.5.3.7b:;
grant UPDATE on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -263,9 +257,7 @@ let $message= Testcase 3.5.3.7c;
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -316,9 +308,7 @@ let $message= Testcase 3.5.3.7d:;
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -369,9 +359,7 @@ let $message= Testcase 3.5.3.8a:;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -426,9 +414,7 @@ let $message= Testcase: 3.5.3.8b;
grant SELECT on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -482,9 +468,7 @@ let $message= Testcase 3.5.3.8c:;
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -534,9 +518,7 @@ let $message=Testcase: 3.5.3.8d:;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -592,7 +574,6 @@ let $message=Testcase: 3.5.3.x:;
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection yes_353x;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
index 475063587d4..2f0ad2c1ccc 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
@@ -36,10 +36,8 @@ let $message= ####### Testcase for column privileges of triggers: #######;
grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
# grant TRIGGER and UPDATE on column -> succeed
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
index e5933eb84a8..9e6d8598e6f 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
@@ -37,7 +37,6 @@ let $message= Testcase for db level:;
show grants for test_noprivs@localhost;
# no trigger privilege->create trigger must fail:
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
let $message= no trigger privilege on db level for create:;
--source include/show_msg.inc
@@ -47,7 +46,6 @@ let $message= no trigger privilege on db level for create:;
set new.f1 = 'trig 1_1-no';
# user with minimum privs on t1->no trigger executed;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv_db;
insert into t1 (f1) values ('insert-yes');
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
index 82f4a28f664..2bbcc5f88f0 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
@@ -41,10 +41,8 @@ let $message= ####### Testcase for mix of db and table level: #######;
grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv1_db;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv1_db;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
index f1efff990f1..9988e1cafc2 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
@@ -27,7 +27,6 @@ let $message= ######### Testcase for definer: ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
# create trigger with not existing definer shall deliver a warning:
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
index b6f4af7e0a7..eebdff5b588 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
@@ -38,10 +38,8 @@ let $message= #### Testcase for mix of user(global) and db level: ####;
grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection yes_privs;
@@ -83,7 +81,6 @@ let $message= trigger privilege on user level for create:;
--disable_warnings
disconnect yes_privs;
--enable_warnings
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user;
use priv_db;
@@ -184,7 +181,6 @@ let $message= trigger privilege on db level for create:;
--disable_warnings
disconnect yes_privs;
--enable_warnings
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user;
use no_priv_db;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
index ea7c385768c..6258b040642 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
@@ -32,7 +32,6 @@ let $message= #### Testcase for trigger privilege on execution time ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
@@ -56,7 +55,6 @@ let $message= #### Testcase for trigger privilege on execution time ########;
select f1 from t1 order by f1;
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (use_privs,localhost,test_useprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user;
use priv_db;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
index 94f30fe13c2..ca4b9e2a0a9 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
@@ -30,10 +30,8 @@ let $message= ######### Testcase for table level: ########;
set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
################ Section 3.5.3 ############
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
index e43f4ce97a3..2f72ba64bfd 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
@@ -27,7 +27,6 @@ let $message= ######### Testcase for transactions: ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc
index d68b3d79086..2bc9dd66478 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc
@@ -22,9 +22,7 @@ let $message= Testcase: 3.5:;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con1_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con1_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc
index 087f18e8e6b..996a5aa69ae 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc
@@ -23,9 +23,7 @@ let $message= Testcase: 3.5:;
create User test_super@localhost;
set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION;
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
- --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index a36b3a1a865..350c7ebd541 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -1244,3 +1244,16 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (18446744073709551615);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 1e8bc42ecbf..e6383fb97fa 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -2518,4 +2518,96 @@ LOCK TABLES t1 READ;
ALTER TABLE t1 COMMENT 'test';
UNLOCK TABLES;
DROP TABLE t1;
+#
+# Bug#55826: create table .. select crashes with when KILL_BAD_DATA
+# is returned
+#
+CREATE TABLE t1(a INT) ENGINE=innodb;
+INSERT INTO t1 VALUES (0);
+SET SQL_MODE='STRICT_ALL_TABLES';
+CREATE TABLE t2
+SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
+ERROR 22007: Incorrect datetime value: '' for column 'NOW()' at row 1
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
+#
+# Bug#55580: segfault in read_view_sees_trx_id
+#
+CREATE TABLE t1 (a INT) ENGINE=Innodb;
+CREATE TABLE t2 (a INT) ENGINE=Innodb;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+START TRANSACTION;
+SELECT * FROM t2 LOCK IN SHARE MODE;
+a
+1
+2
+START TRANSACTION;
+SELECT * FROM t1 LOCK IN SHARE MODE;
+a
+1
+2
+SELECT * FROM t1 FOR UPDATE;
+# should not crash
+SELECT * FROM t1 GROUP BY (SELECT a FROM t2 LIMIT 1 FOR UPDATE) + t1.a;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1,t2;
+#
+# Bug#55656: mysqldump can be slower after bug #39653 fix
+#
+CREATE TABLE t1 (a INT , b INT, c INT, d INT,
+KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3);
+EXPLAIN SELECT COUNT(*) FROM t1;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 4
+ref NULL
+rows 3
+Extra Using index
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b);
+EXPLAIN SELECT COUNT(*) FROM t1;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key PRIMARY
+key_len 8
+ref NULL
+rows 3
+Extra Using index
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b,c);
+EXPLAIN SELECT COUNT(*) FROM t1;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key PRIMARY
+key_len 8
+ref NULL
+rows 3
+Extra Using index
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b,c,d);
+EXPLAIN SELECT COUNT(*) FROM t1;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key PRIMARY
+key_len 8
+ref NULL
+rows 3
+Extra Using index
+DROP TABLE t1;
+#
End of 5.1 tests
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 0a7de237a42..f4ba2feab73 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -665,6 +665,18 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+##
+# 55277: Failing assertion: auto_inc > 0
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (18446744073709551615);
+# Restart the server
+-- source include/restart_mysqld.inc
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
--disable_query_log
-EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
+eval SET GLOBAL innodb_file_format_check=$file_format_check;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 1171eaa899c..e346d91aaa4 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -504,11 +504,7 @@ INSERT INTO t2 VALUES (),();
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE b =(SELECT a FROM t1 LIMIT 1);
---disable_query_log
---disable_result_log
CONNECT (con1, localhost, root,,);
---enable_query_log
---enable_result_log
CONNECTION default;
DELIMITER |;
@@ -768,4 +764,83 @@ UNLOCK TABLES;
DROP TABLE t1;
+--echo #
+--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
+--echo # is returned
+--echo #
+CREATE TABLE t1(a INT) ENGINE=innodb;
+INSERT INTO t1 VALUES (0);
+SET SQL_MODE='STRICT_ALL_TABLES';
+--error ER_TRUNCATED_WRONG_VALUE
+CREATE TABLE t2
+ SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
+
+
+
+--echo #
+--echo # Bug#55580: segfault in read_view_sees_trx_id
+--echo #
+CREATE TABLE t1 (a INT) ENGINE=Innodb;
+CREATE TABLE t2 (a INT) ENGINE=Innodb;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
+
+connection con1;
+START TRANSACTION;
+SELECT * FROM t2 LOCK IN SHARE MODE;
+
+connection con2;
+START TRANSACTION;
+SELECT * FROM t1 LOCK IN SHARE MODE;
+
+connection con1;
+let $conn_id= `SELECT CONNECTION_ID()`;
+--send SELECT * FROM t1 FOR UPDATE
+
+connection con2;
+let $wait_timeout= 2;
+let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID=$conn_id AND STATE='Sending data';
+--source include/wait_condition.inc
+--echo # should not crash
+--error ER_LOCK_DEADLOCK
+SELECT * FROM t1 GROUP BY (SELECT a FROM t2 LIMIT 1 FOR UPDATE) + t1.a;
+
+connection default;
+disconnect con1;
+disconnect con2;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug#55656: mysqldump can be slower after bug #39653 fix
+--echo #
+
+CREATE TABLE t1 (a INT , b INT, c INT, d INT,
+ KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3);
+--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
+
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b);
+--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
+
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b,c);
+--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
+
+DROP INDEX b ON t1;
+CREATE INDEX b ON t1(a,b,c,d);
+--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
+
+DROP TABLE t1;
+
+--echo #
+
+
--echo End of 5.1 tests
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result b/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result
index a36b3a1a865..350c7ebd541 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result
@@ -1244,3 +1244,16 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (18446744073709551615);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test
index 5e4cf9dcb4c..99cdac72e2e 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test
@@ -1,8 +1,6 @@
-- source include/have_innodb_plugin.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
-# remove the next line after bug #55503 is fixed
--- source include/not_valgrind.inc
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test
index 49394a019d0..997c503d2d3 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test
@@ -1,8 +1,6 @@
-- source include/have_innodb_plugin.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
-# remove the next line after bug #55503 is fixed
--- source include/not_valgrind.inc
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
@@ -667,6 +665,18 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+##
+# 55277: Failing assertion: auto_inc > 0
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (18446744073709551615);
+# Restart the server
+-- source include/restart_mysqld.inc
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
#
# restore environment to the state it was before this test execution
#
diff --git a/mysql-test/suite/pbxt/r/func_sapdb.result b/mysql-test/suite/pbxt/r/func_sapdb.result
index 7a61f434d2f..b0c697e54ac 100644
--- a/mysql-test/suite/pbxt/r/func_sapdb.result
+++ b/mysql-test/suite/pbxt/r/func_sapdb.result
@@ -185,7 +185,7 @@ date("1997-12-31 23:59:59.000001") as f8,
time("1997-12-31 23:59:59.000001") as f9;
describe t1;
Field Type Null Key Default Extra
-f1 date NO 0000-00-00
+f1 date YES NULL
f2 datetime YES NULL
f3 time YES NULL
f4 time YES NULL
diff --git a/mysql-test/suite/percona/percona_query_response_time-stored.result b/mysql-test/suite/percona/percona_query_response_time-stored.result
index 386180c791a..df51f2bfd58 100644
--- a/mysql-test/suite/percona/percona_query_response_time-stored.result
+++ b/mysql-test/suite/percona/percona_query_response_time-stored.result
@@ -22,12 +22,13 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
FLUSH QUERY_RESPONSE_TIME;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
44
@@ -76,7 +77,7 @@ time
2097152.00000
4194304.00000
8388608.00000
-TOO LONG QUERY
+TOO LONG
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
test_f()
@@ -91,14 +92,15 @@ SELECT test_f();
test_f()
Hello, world!
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 5 2 44
-4 5 2 44
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 5 4 2 44
+4 5 4 2 44
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
44
@@ -147,7 +149,7 @@ time
2097152.00000
4194304.00000
8388608.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
@@ -161,14 +163,15 @@ SELECT test_f();
test_f()
Hello, world!
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 2 2 14
-1 2 2 14
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 2 1 2 14
+1 2 1 2 14
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
14
@@ -187,7 +190,7 @@ time
10000.000000
100000.000000
1000000.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 10
@@ -201,14 +204,15 @@ SELECT test_f();
test_f()
Hello, world!
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 2 2 17
-1 2 2 17
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 2 1 2 17
+1 2 1 2 17
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
17
@@ -230,7 +234,7 @@ time
117649.000000
823543.000000
5764801.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 7
@@ -244,14 +248,15 @@ SELECT test_f();
test_f()
Hello, world!
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 2 2 7
-1 2 2 7
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 2 1 2 7
+1 2 1 2 7
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
7
@@ -263,7 +268,7 @@ time
156.000000
24336.000000
3796416.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 156
@@ -277,14 +282,15 @@ SELECT test_f();
test_f()
Hello, world!
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 2 2 6
-1 2 2 6
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 2 1 2 6
+1 2 1 2 6
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
6
@@ -295,7 +301,7 @@ time
1.000000
1000.000000
1000000.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
diff --git a/mysql-test/suite/percona/percona_query_response_time.result b/mysql-test/suite/percona/percona_query_response_time.result
index 3c12284a525..54657b6ca06 100644
--- a/mysql-test/suite/percona/percona_query_response_time.result
+++ b/mysql-test/suite/percona/percona_query_response_time.result
@@ -9,12 +9,13 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
FLUSH QUERY_RESPONSE_TIME;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
44
@@ -63,7 +64,7 @@ time
2097152.00000
4194304.00000
8388608.00000
-TOO LONG QUERY
+TOO LONG
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
SELECT SLEEP(0.31);
SLEEP(0.31)
@@ -123,17 +124,18 @@ SELECT SLEEP(2.5);
SLEEP(2.5)
0
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 20 5 44
-10 20 5 44
-1 20 5 44
-5 20 5 44
-3 20 5 44
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 20 15 5 44
+10 20 15 5 44
+1 20 15 5 44
+5 20 15 5 44
+3 20 15 5 44
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
44
@@ -182,7 +184,7 @@ time
2097152.00000
4194304.00000
8388608.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 2
@@ -250,15 +252,16 @@ SELECT SLEEP(2.5);
SLEEP(2.5)
0
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 20 3 14
-11 20 3 14
-8 20 3 14
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 20 17 3 14
+11 20 17 3 14
+8 20 17 3 14
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
14
@@ -277,7 +280,7 @@ time
10000.000000
100000.000000
1000000.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 10
@@ -345,15 +348,16 @@ SELECT SLEEP(2.5);
SLEEP(2.5)
0
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 20 3 17
-11 20 3 17
-8 20 3 17
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 20 17 3 17
+11 20 17 3 17
+8 20 17 3 17
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
17
@@ -375,7 +379,7 @@ time
117649.000000
823543.000000
5764801.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 7
@@ -443,15 +447,16 @@ SELECT SLEEP(2.5);
SLEEP(2.5)
0
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 20 3 7
-11 20 3 7
-8 20 3 7
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 20 17 3 7
+11 20 17 3 7
+8 20 17 3 7
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
7
@@ -463,7 +468,7 @@ time
156.000000
24336.000000
3796416.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 156
@@ -531,15 +536,16 @@ SELECT SLEEP(2.5);
SLEEP(2.5)
0
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
-SELECT c.count,
+SELECT d.count,
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
+(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
+(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
-count query_count not_zero_region_count region_count
-1 20 3 6
-11 20 3 6
-8 20 3 6
+FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
+count query_count query_total not_zero_region_count region_count
+1 20 17 3 6
+11 20 17 3 6
+8 20 17 3 6
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
region_count
6
@@ -550,7 +556,7 @@ time
1.000000
1000.000000
1000000.00000
-TOO LONG QUERY
+TOO LONG
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
Variable_name Value
query_response_time_range_base 1000
diff --git a/mysql-test/suite/percona/percona_server_variables.result b/mysql-test/suite/percona/percona_server_variables.result
index 25f961b201f..cb2af0d3d0e 100644
--- a/mysql-test/suite/percona/percona_server_variables.result
+++ b/mysql-test/suite/percona/percona_server_variables.result
@@ -77,8 +77,10 @@ innodb_adaptive_checkpoint Value
innodb_adaptive_flushing Value
innodb_adaptive_hash_index Value
innodb_additional_mem_pool_size Value
+innodb_auto_lru_dump Value
innodb_autoextend_increment Value
innodb_autoinc_lock_mode Value
+innodb_buffer_pool_shm_checksum Value
innodb_buffer_pool_shm_key Value
innodb_buffer_pool_size Value
innodb_change_buffering Value
diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
index fc53aca5136..e3cddf4c606 100644
--- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
+++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
@@ -65,3 +65,12 @@ c1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+
+# Bug#55616 Killing thread or query during CREATE IF NOT EXISTS makes
+# slave SQL thread abort
+
+CREATE TABLE t1 ( i INT );
+CREATE TABLE IF NOT EXISTS t1
+AS SELECT SLEEP(3);
+KILL QUERY master1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
index 8d0b61cc6d8..de44a1e5d2a 100644
--- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
+++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
@@ -19,4 +19,9 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `tmp2` (
+ `c1` int(11) DEFAULT NULL
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`tmp2` (`c1`) SELECT * FROM tmp
+master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index 35f4cd3ecbb..7fc940f25e0 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -883,8 +883,8 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
-master-bin.000001 # Execute_load_query # # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=#
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result
index e480ff3dfe9..c6aa05f9e90 100644
--- a/mysql-test/suite/rpl/r/rpl_row_create_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result
@@ -467,4 +467,10 @@ DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
+CREATE TABLE t1 SELECT 1;
+CREATE TABLE IF NOT EXISTS t1 SELECT 1;
+Warnings:
+Note 1050 Table 't1' already exists
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
end of the tests
diff --git a/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result
new file mode 100644
index 00000000000..9ae1ef315b6
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result
@@ -0,0 +1,704 @@
+# WL#5370 Keep forward-compatibility when changing 'CREATE TABLE IF NOT
+# EXISTS ... SELECT' behaviour
+#
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+
+
+CREATE TABLE t2(c1 INT, c2 char(10));
+INSERT INTO t2 VALUES(1, 'abc'), (2, 'abc');
+
+# The original query should be binlogged if the table does not exist.
+# ------------------------------------------------------------------
+
+CREATE TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
+SELECT 'abc' AS c3, 1 AS c4;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
+SELECT 'abc' AS c3, 1 AS c4
+Comparing tables master:test.t1 and slave:test.t1
+
+# The statement should be binlogged as two events. one is
+# 'CREATE TABLE IF NOT EXISTS ..', another one is
+# 'INSERT ... SELECT'.
+# ------------------------------------------------------------------
+
+CREATE TABLE IF NOT EXISTS t1
+SELECT 'abc', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 2
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+
+# Verify if it can be binlogged with right database name when the table
+# is not in the default database
+
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE IF NOT EXISTS test.t1
+SELECT 'abc', 20;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `db1`; CREATE TABLE IF NOT EXISTS `test`.`t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `db1`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 20
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+USE test;
+DROP DATABASE db1;
+
+# It should be binlogged as 'REPLACE ... SELECT'
+# if the original statement has option REPLACE
+
+CREATE TABLE IF NOT EXISTS t1
+REPLACE SELECT '123', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+
+# It should be binlogged as 'INSERT IGNORE... SELECT'
+# if the original statement has option IGNORE
+
+CREATE TABLE IF NOT EXISTS t1
+IGNORE SELECT '123', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+
+# Nothing should be binlogged if error happens and no any row is inserted
+
+CREATE TABLE IF NOT EXISTS t1
+SELECT '123', 2;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+Comparing tables master:test.t1 and slave:test.t1
+
+# Verify it can binlog well when there are some braces('(')
+
+CREATE TABLE IF NOT EXISTS t1
+(SELECT '123', 3) UNION (SELECT '123', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+CREATE TABLE IF NOT EXISTS t1
+REPLACE (SELECT 'abc', 3) UNION (SELECT 'abc', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+CREATE TABLE IF NOT EXISTS t1
+IGNORE (SELECT '123', 3) UNION (SELECT '123', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) (SELECT 'abc', 3) UNION (SELECT 'abc', 4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4)
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+
+# Throw a warning that table already exists and don't insert anything
+
+CREATE VIEW t3 AS SELECT * FROM t2;
+CREATE TABLE IF NOT EXISTS t3
+SELECT '123', 2;
+Warnings:
+Note 1050 Table 't3' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+DROP VIEW t3;
+
+# The statement can be binlogged correctly when it is in a SP/EVENT/TRIGGER
+
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1(IN a INT)
+CREATE TABLE IF NOT EXISTS t1 SELECT '123', a;
+call p1(500);
+Warnings:
+Note 1050 Table 't1' already exists
+call p1(600);
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',500)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',600)
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+DROP PROCEDURE p1;
+
+# The statement can be binlogged correctly when it is in a prepared statement
+
+PREPARE stm FROM "CREATE TABLE IF NOT EXISTS t1 SELECT '123', ?";
+SET @a= 700;
+EXECUTE stm USING @a;
+Warnings:
+Note 1050 Table 't1' already exists
+SET @a= 800;
+EXECUTE stm USING @a;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 700
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 800
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+
+# The statement can be binlogged correctly when it is in a conditional comment
+
+# The whole statement in a conditional comment
+/*!CREATE TABLE IF NOT EXISTS t1
+SELECT 'abc', 900*/;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 900*/
+master-bin.000001 # Query # # COMMIT
+
+# There is an long comment before SELECT
+/*!CREATE /*blabla*/ TABLE IF NOT EXISTS t1
+SELECT 'abc', 901*/;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 901*/
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment starts just from SELECT
+CREATE TABLE IF NOT EXISTS t1
+/*!SELECT 'abc',*/ 902;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc',*/ 902
+master-bin.000001 # Query # # COMMIT
+
+# Only SELECT keyword is in the conditional comment
+CREATE TABLE IF NOT EXISTS t1
+/*!SELECT*/ /*!'abc',*/ 904;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT*/ /*!'abc',*/ 904
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment is after SELECT keyword
+CREATE TABLE IF NOT EXISTS t1
+SELECT /*!'abc',*/ 903;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT /*!'abc',*/ 903
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment ends just before SELECT keyword
+/*!CREATE TABLE IF NOT EXISTS t1
+*/SELECT 'abc', 905;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 905
+master-bin.000001 # Query # # COMMIT
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+CREATE TABLE t2(c1 INT, c2 char(10));
+INSERT INTO t2 VALUES(1, 'abc'), (2, 'abc');
+
+# The original query should be binlogged if the table does not exist.
+# ------------------------------------------------------------------
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
+SELECT 'abc' AS c3, 1 AS c4;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
+SELECT 'abc' AS c3, 1 AS c4
+
+# The statement should be binlogged as two events. one is
+# 'CREATE TEMPORARY TABLE IF NOT EXISTS ..', another one is
+# 'INSERT ... SELECT'.
+# ------------------------------------------------------------------
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+SELECT 'abc', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 2
+master-bin.000001 # Query # # COMMIT
+
+# Verify if it can be binlogged with right database name when the table
+# is not in the default database
+
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+CREATE TEMPORARY TABLE IF NOT EXISTS test.t1
+SELECT 'abc', 20;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `db1`; CREATE TEMPORARY TABLE IF NOT EXISTS `test`.`t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `db1`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 20
+master-bin.000001 # Query # # COMMIT
+USE test;
+DROP DATABASE db1;
+
+# It should be binlogged as 'REPLACE ... SELECT'
+# if the original statement has option REPLACE
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+REPLACE SELECT '123', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2
+master-bin.000001 # Query # # COMMIT
+
+# It should be binlogged as 'INSERT IGNORE... SELECT'
+# if the original statement has option IGNORE
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+IGNORE SELECT '123', 2;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2
+master-bin.000001 # Query # # COMMIT
+
+# Nothing should be binlogged if error happens and no any row is inserted
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+SELECT '123', 2;
+ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+
+# Verify it can binlog well when there are some braces('(')
+
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+(SELECT '123', 3) UNION (SELECT '123', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+REPLACE (SELECT 'abc', 3) UNION (SELECT 'abc', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+IGNORE (SELECT '123', 3) UNION (SELECT '123', 4);
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) (SELECT 'abc', 3) UNION (SELECT 'abc', 4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4)
+master-bin.000001 # Query # # COMMIT
+
+# The statement can be binlogged correctly when it is in a SP/EVENT/TRIGGER
+
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1(IN a INT)
+CREATE TEMPORARY TABLE IF NOT EXISTS t1 SELECT '123', a;
+call p1(500);
+Warnings:
+Note 1050 Table 't1' already exists
+call p1(600);
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',500)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',600)
+master-bin.000001 # Query # # COMMIT
+DROP PROCEDURE p1;
+
+# The statement can be binlogged correctly when it is in a prepared statement
+
+PREPARE stm FROM "CREATE TEMPORARY TABLE IF NOT EXISTS t1 SELECT '123', ?";
+SET @a= 700;
+EXECUTE stm USING @a;
+Warnings:
+Note 1050 Table 't1' already exists
+SET @a= 800;
+EXECUTE stm USING @a;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 700
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 800
+master-bin.000001 # Query # # COMMIT
+
+# The statement can be binlogged correctly when it is in a conditional comment
+
+# The whole statement in a conditional comment
+/*!CREATE TEMPORARY TABLE IF NOT EXISTS t1
+SELECT 'abc', 900*/;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 900*/
+master-bin.000001 # Query # # COMMIT
+
+# There is an long comment before SELECT
+/*!CREATE TEMPORARY /*blabla*/ TABLE IF NOT EXISTS t1
+SELECT 'abc', 901*/;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 901*/
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment starts just from SELECT
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+/*!SELECT 'abc',*/ 902;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc',*/ 902
+master-bin.000001 # Query # # COMMIT
+
+# Only SELECT keyword is in the conditional comment
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+/*!SELECT*/ /*!'abc',*/ 904;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; /*! INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT*/ /*!'abc',*/ 904
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment is after SELECT keyword
+CREATE TEMPORARY TABLE IF NOT EXISTS t1
+SELECT /*!'abc',*/ 903;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT /*!'abc',*/ 903
+master-bin.000001 # Query # # COMMIT
+
+# Conditional comment ends just before SELECT keyword
+/*!CREATE TEMPORARY TABLE IF NOT EXISTS t1
+*/SELECT 'abc', 905;
+Warnings:
+Note 1050 Table 't1' already exists
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` char(10) DEFAULT NULL,
+ `c4` int(11) NOT NULL,
+ PRIMARY KEY (`c4`)
+)
+master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 905
+master-bin.000001 # Query # # COMMIT
+DROP TABLE t2;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index ef77c54e067..5b150288935 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -11,3 +11,4 @@
##############################################################################
rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576
+rpl_log_pos : BUG#55675 Sep 10 2010 27 2010 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
index 114f71af873..cf26e58c3ec 100644
--- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
+++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
@@ -119,5 +119,32 @@ SELECT * FROM t2;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+sync_slave_with_master;
+
+--echo
+--echo # Bug#55616 Killing thread or query during CREATE IF NOT EXISTS makes
+--echo # slave SQL thread abort
+--echo
+
+--connection master1
+let $con_id = `SELECT CONNECTION_ID()`;
+
+CREATE TABLE t1 ( i INT );
+send CREATE TABLE IF NOT EXISTS t1
+ AS SELECT SLEEP(3);
+
+connection master;
+let $wait_timeout = 3;
+let $show_statement = SHOW PROCESSLIST;
+let $field = State;
+let $condition = = 'User sleep';
+source include/wait_show_condition.inc;
+
+--replace_result $con_id master1
+eval KILL QUERY $con_id;
+sync_slave_with_master;
+
+connection master;
+DROP TABLE t1;
source include/master-slave-end.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
index e80fc160d8f..b8975308a86 100644
--- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
@@ -1,4 +1,4 @@
-source include/have_binlog_format_mixed_or_statement.inc;
+source include/have_binlog_format_statement.inc;
source include/have_debug.inc;
source include/master-slave.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test
index ddee9e7e989..1db7c4a893b 100644
--- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test
@@ -16,7 +16,7 @@
# BUG#33413 show binlog events fails if binlog has event size of close
# to max_allowed_packet
-source include/have_binlog_format_mixed_or_statement.inc;
+source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test
index a72ca75e975..148032f2987 100644
--- a/mysql-test/suite/rpl/t/rpl_row_create_table.test
+++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test
@@ -299,5 +299,18 @@ DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
+sync_slave_with_master;
+
+#
+# Bug#55598 RBR: CREATE TABLE IF NOT EXISTS and INSERT written to binary log
+# twice
+#
+connection master;
+CREATE TABLE t1 SELECT 1;
+CREATE TABLE IF NOT EXISTS t1 SELECT 1;
+let $diff_table=test.t1;
+source include/rpl_diff_tables.inc;
+DROP TABLE t1;
+
source include/master-slave-end.inc;
--echo end of the tests
diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
index 22309c33724..b7342fd1c40 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
@@ -8,7 +8,7 @@
# 2 - Catches error.
##########################################################################
---source include/have_binlog_format_mixed_or_statement.inc
+--source include/have_binlog_format_statement.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/master-slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test
new file mode 100644
index 00000000000..69866cad267
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test
@@ -0,0 +1,14 @@
+#
+--echo # WL#5370 Keep forward-compatibility when changing 'CREATE TABLE IF NOT
+--echo # EXISTS ... SELECT' behaviour
+--echo #
+
+source include/master-slave.inc;
+source include/have_binlog_format_statement.inc;
+
+source extra/rpl_tests/rpl_stm_create_if_not_exists.test;
+
+let $is_temporary=1;
+source extra/rpl_tests/rpl_stm_create_if_not_exists.test;
+
+source include/master-slave-end.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test
index 2af9d7f85bc..7bc17fbaada 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_log.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_log.test
@@ -1,5 +1,5 @@
# Requires statement logging
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index b31fa83588b..4e337d54660 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1553,26 +1553,25 @@ drop table t1;
# whole alter table code is being tested all around the test suite already.
#
-create table t1 (v varchar(32) not null);
+create table t1 (v varchar(32) not null) engine=csv;
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
# Fast alter, no copy performed
-alter table t1 change v v2 varchar(32);
+alter table t1 change v v2 varchar(32) not null;
select * from t1;
# Fast alter, no copy performed
-alter table t1 change v2 v varchar(64);
+alter table t1 change v2 v varchar(64) not null;
select * from t1;
update t1 set v = 'lmn' where v = 'hij';
select * from t1;
# Regular alter table
-alter table t1 add i int auto_increment not null primary key first;
+alter table t1 add i int not null first;
select * from t1;
-update t1 set i=5 where i=3;
+update t1 set i=3 where v = 'abc';
select * from t1;
-alter table t1 change i i bigint;
+alter table t1 change i i bigint not null;
select * from t1;
-alter table t1 add unique key (i, v);
-select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
+select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
drop table t1;
#
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 5a0e86568f3..ea5c87babbb 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -387,4 +387,17 @@ DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1;
DROP TABLE t1;
+--echo #
+--echo # Bug #53034: Multiple-table DELETE statements not accepting
+--echo # "Access compatibility" syntax
+--echo #
+
+CREATE TABLE t1 (id INT);
+CREATE TABLE t2 LIKE t1;
+CREATE TABLE t3 LIKE t1;
+
+DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
+
+DROP TABLE t1, t2, t3;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index 6dbc8a05789..72a78f612a2 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -1082,6 +1082,20 @@ select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt,
from t1 a, t1 b;
select *, f1 = f2 from t1;
drop table t1;
+
+--echo #
+--echo # Bug #54465: assert: field_types == 0 || field_types[field_pos] ==
+--echo # MYSQL_TYPE_LONGLONG
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1
+ ORDER BY t1.a;
+
+DROP TABLE t1;
+
--echo #
--echo End of 5.1 tests
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 2f9a48ffd6a..57eee43d75e 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -838,4 +838,15 @@ select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND);
select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND);
+#
+# Bug #55565: debug assertion when ordering by expressions with user
+# variable assignments
+#
+
+CREATE TABLE t1(a DOUBLE NOT NULL);
+INSERT INTO t1 VALUES (0),(9.216e-096);
+--echo # should not crash
+SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index bc0695aaa93..fd0a18ab4dd 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -401,6 +401,7 @@ create table t1 (a int, b blob);
insert into t1 values (1, ''), (2, NULL), (3, '1');
select * from t1;
+--error ER_ILLEGAL_VALUE_FOR_TYPE
select
geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
@@ -419,6 +420,7 @@ select
intersects(b, b) IS NULL, crosses(b, b) IS NULL
from t1;
+--error ER_ILLEGAL_VALUE_FOR_TYPE
select
point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
multilinestring(b) IS NULL, multipolygon(b) IS NULL,
@@ -702,24 +704,44 @@ drop table t1;
# Bug#44684: valgrind reports invalid reads in
# Item_func_spatial_collection::val_str
#
+--error ER_ILLEGAL_VALUE_FOR_TYPE
SELECT MultiPoint(12345,'');
-SELECT MultiPoint(123451,'');
-SELECT MultiPoint(1234512,'');
-SELECT MultiPoint(12345123,'');
-
-SELECT MultiLineString(12345,'');
-SELECT MultiLineString(123451,'');
-SELECT MultiLineString(1234512,'');
-SELECT MultiLineString(12345123,'');
-
-SELECT LineString(12345,'');
-SELECT LineString(123451,'');
-SELECT LineString(1234512,'');
-SELECT LineString(12345123,'');
-
-SELECT Polygon(12345,'');
-SELECT Polygon(123451,'');
-SELECT Polygon(1234512,'');
-SELECT Polygon(12345123,'');
+#SELECT MultiPoint(123451,'');
+#SELECT MultiPoint(1234512,'');
+#SELECT MultiPoint(12345123,'');
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+#SELECT MultiLineString(12345,'');
+#SELECT MultiLineString(123451,'');
+#SELECT MultiLineString(1234512,'');
+#SELECT MultiLineString(12345123,'');
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+#SELECT LineString(12345,'');
+#SELECT LineString(123451,'');
+#SELECT LineString(1234512,'');
+#SELECT LineString(12345123,'');
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+#SELECT Polygon(12345,'');
+#SELECT Polygon(123451,'');
+#SELECT Polygon(1234512,'');
+#SELECT Polygon(12345123,'');
+
+#
+# Bug55531 crash with conversions of geometry types / strings
+#
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
+
+
+--echo #
+--echo # BUG#51875: crash when loading data into geometry function polyfromwkb
+--echo #
+SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
+SET @a=POLYFROMWKB(@a);
+SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
+SET @a=POLYFROMWKB(@a);
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 5ec0aefe021..045b5807391 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -504,3 +504,28 @@ DROP TABLE t1, t2;
--echo End of 5.0 tests.
+
+--echo #
+--echo # Bug#54106 assert in Protocol::end_statement,
+--echo # INSERT IGNORE ... SELECT ... UNION SELECT ...
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT);
+
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT INTO t1 (a, a) VALUES (1, 1);
+# Verify that ER_FIELD_SPECIFIED_TWICE is not ignorable
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) VALUES (1, 1);
+
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) SELECT 1,1;
+# Used to cause an assert
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 43b373c9703..05d630edfb2 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -851,4 +851,74 @@ ENGINE=MERGE UNION=(t1,t2);
SELECT t1.a FROM mm1,t1;
DROP TABLE t1, t2, mm1;
+#--echo #
+#--echo # Bug #55568: user variable assignments crash server when used within
+#--echo # query
+#--echo #
+#
+#
+# This test case is invalidated because of fix of bug 55531
+# The reason is that {1} is not a valid geometric collection.
+#
+#CREATE TABLE t1 (a INT);
+
+#INSERT INTO t1 VALUES (0), (1);
+
+#let $i=2;
+#while ($i)
+#{
+# SELECT MULTIPOINT(
+# 1,
+# (
+# SELECT MULTIPOINT(
+# MULTIPOINT(
+# 1,
+# (SELECT COUNT(*) FROM (SELECT 1 FROM t1 GROUP BY a,a) d)
+# )
+# ) FROM t1
+# )
+# ) != COUNT(*) q FROM t1 GROUP BY a;
+# dec $i;
+#}
+#
+#DROP TABLE t1;
+
+--echo #
+--echo # Bug #54468: crash after item's print() function when ordering/grouping
+--echo # by subquery
+--echo #
+
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (), ();
+
+SELECT 1 FROM t1
+GROUP BY
+GREATEST(t1.a,
+ (SELECT 1 FROM
+ (SELECT t1.b FROM t1,t1 t2
+ ORDER BY t1.a, t1.a LIMIT 1) AS d)
+ );
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug #53544: Server hangs during JOIN query in stored procedure called
+--echo # twice in a row
+--echo #
+
+CREATE TABLE t1(c INT);
+
+INSERT INTO t1 VALUES (1), (2);
+
+PREPARE stmt FROM "SELECT t2.c AS f1 FROM t1 LEFT JOIN
+ t1 t2 ON t1.c=t2.c RIGHT JOIN
+ t1 t3 ON t1.c=t3.c
+ GROUP BY f1;";
+
+EXECUTE stmt;
+EXECUTE stmt;
+
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 7c9fbf031bb..783708cc3b2 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -1,6 +1,6 @@
# We are using .opt file since we need small binlog size
# TODO: Need to look at making a row based version once the new row based client is completed. [jbm]
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_statement.inc
-- source include/have_log_bin.inc
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index edc4da4e37f..707f6db99c4 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -334,6 +334,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ;
--exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
+# Check some non-query statements that would fail
+# ----------------------------------------------------------------------------
+--exec illegal_command
+--cat_file does_not_exist
+--perl
+ exit(1);
+EOF
+
+# ----------------------------------------------------------------------------
# Switch the abort on error on and check the effect on $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR
@@ -871,7 +880,7 @@ while ($outer)
}
# Test source in an if in a while which is false on 1st iteration
-# Also test --error in same context
+# Also test --error and --disable_abort_on_error in same context
let $outer= 2; # Number of outer loops
let $ifval= 0; # false 1st time
while ($outer)
@@ -882,6 +891,10 @@ while ($outer)
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
--error ER_NO_SUCH_TABLE
SELECT * from nowhere;
+ --disable_abort_on_error
+# Statement giving a different error, to make sure we don't mask it
+ SELECT * FROM nowhere else;
+ --enable_abort_on_error
}
dec $outer;
inc $ifval;
@@ -1101,6 +1114,36 @@ if (!$counter)
}
# ----------------------------------------------------------------------------
+# Test if with some non-numerics
+# ----------------------------------------------------------------------------
+
+let $counter=alpha;
+if ($counter)
+{
+ echo Counter is true, (counter=alpha);
+}
+let $counter= ;
+if ($counter)
+{
+ echo oops, space is true;
+}
+let $counter=-0;
+if ($counter)
+{
+ echo oops, -0 is true;
+}
+if (beta)
+{
+ echo Beta is true;
+}
+let $counter=gamma;
+while ($counter)
+{
+ echo while with string, only once;
+ let $counter=000;
+}
+
+# ----------------------------------------------------------------------------
# Test while, { and }
# ----------------------------------------------------------------------------
@@ -1445,7 +1488,6 @@ EOF
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
# connect when "disable_abort_on_error" caused "connection not found"
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--disable_abort_on_error
connect (con1,localhost,root,,);
connection default;
@@ -1734,7 +1776,16 @@ select 1;
--reap
EOF
--error 1
---exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1
+# Must filter unpredictable extra warning from output
+--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in > $MYSQL_TMP_DIR/mysqltest.out 2>&1
+--perl
+ my $dir= $ENV{'MYSQL_TMP_DIR'};
+ open (FILE, "$dir/mysqltest.out");
+ while (<FILE>) {
+ print unless /Note: net_clear/; # This shows up on rare occations
+ }
+EOF
+remove_file $MYSQL_TMP_DIR/mysqltest.out;
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
drop table t1;
diff --git a/mysql-test/t/partition_not_blackhole-master.opt b/mysql-test/t/partition_not_blackhole-master.opt
new file mode 100644
index 00000000000..1e47be930bc
--- /dev/null
+++ b/mysql-test/t/partition_not_blackhole-master.opt
@@ -0,0 +1 @@
+--loose-skip-blackhole
diff --git a/mysql-test/t/partition_not_blackhole.test b/mysql-test/t/partition_not_blackhole.test
new file mode 100644
index 00000000000..7352aeaa230
--- /dev/null
+++ b/mysql-test/t/partition_not_blackhole.test
@@ -0,0 +1,26 @@
+--source include/have_partition.inc
+--source include/not_blackhole.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+--echo #
+--echo # Bug#46086: crash when dropping a partitioned table and
+--echo # the original engine is disabled
+--echo # Copy a .frm and .par file which was created with:
+--echo # create table `t1` (`id` int primary key) engine=blackhole
+--echo # partition by key () partitions 1;
+--copy_file std_data/parts/t1_blackhole.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/parts/t1_blackhole.par $MYSQLD_DATADIR/test/t1.par
+SHOW TABLES;
+--replace_result $MYSQLD_DATADIR ./
+--error ER_NOT_FORM_FILE
+SHOW CREATE TABLE t1;
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+--list_files $MYSQLD_DATADIR/test t1*
+--remove_file $MYSQLD_DATADIR/test/t1.frm
+--remove_file $MYSQLD_DATADIR/test/t1.par
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index 4d011ddc468..f386fac4998 100644
--- a/mysql-test/t/partition_range.test
+++ b/mysql-test/t/partition_range.test
@@ -846,3 +846,44 @@ insert into t2 values(52, 20070322, 456, 'filler') ;
select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid;
drop table t1, t2;
+
+--echo #
+--echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range
+--echo # endpoints
+--echo #
+CREATE TABLE t1 (
+ a INT,
+ b INT,
+ KEY ( a, b )
+) PARTITION BY HASH (a) PARTITIONS 1;
+
+CREATE TABLE t2 (
+ a INT,
+ b INT,
+ KEY ( a, b )
+);
+
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+
+INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
+INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
+INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
+INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
+
+INSERT INTO t2 SELECT * FROM t1;
+
+--echo # plans should be identical
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
+EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
+
+FLUSH status;
+SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
+--echo # Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+
+FLUSH status;
+SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
+--echo # Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 55250b73ae5..406821e7a7c 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -120,6 +120,8 @@ CREATE TABLE t1 (a int) ENGINE=example ULL=1e2;
CREATE TABLE t1 (a int) ENGINE=example ULL=0x1234;
SHOW CREATE TABLE t1;
+select create_options from information_schema.tables where table_schema='test' and table_name='t1';
+
ALTER TABLE t1 ULL=DEFAULT;
SHOW CREATE TABLE t1;
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 5d5ad180f1a..0ad3d3e8504 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1313,4 +1313,16 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY)
DROP TABLE t1;
+--echo #
+--echo # Bug #54802: 'NOT BETWEEN' evaluation is incorrect
+--echo #
+
+CREATE TABLE t1 (c_key INT, c_notkey INT, KEY(c_key));
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
+
+EXPLAIN SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
+SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
+
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test
index b9c4042665b..35ea8388df3 100644
--- a/mysql-test/t/subselect4.test
+++ b/mysql-test/t/subselect4.test
@@ -87,7 +87,20 @@ SELECT t1.col_int_nokey,(SELECT MIN( t2_a.col_int_key ) +1 FROM t2 t2_a, t2 t2_b
DROP TABLE t1,t2;
---echo End of 5.1 tests.
+--echo #
+--echo # Bug#54568: create view cause Assertion failed: 0,
+--echo # file .\item_subselect.cc, line 836
+--echo #
+EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+--echo # None of the below should crash
+CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
+CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
+DROP VIEW v1, v2;
+
+--echo #
+--echo # End of 5.1 tests.
+--echo #
--echo #
--echo # BUG#46743 "Azalea processing correlated, aggregate SELECT
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test
index 15ddceb8d68..c4445da107c 100644
--- a/mysql-test/t/timezone2.test
+++ b/mysql-test/t/timezone2.test
@@ -273,5 +273,14 @@ UNLOCK TABLES;
DROP TABLE t1;
+--echo #
+--echo # Bug #55424: convert_tz crashes when fed invalid data
+--echo #
+
+CREATE TABLE t1 (a SET('x') NOT NULL);
+INSERT INTO t1 VALUES ('');
+SELECT CONVERT_TZ(1, a, 1) FROM t1;
+SELECT CONVERT_TZ(1, 1, a) FROM t1;
+DROP TABLE t1;
--echo End of 5.1 tests
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index b6b58e7bd46..4f27866de23 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -328,4 +328,22 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
+#
+# Bug #55615: debug assertion after using variable in assignment and
+# referred to
+# Bug #55564: crash with user variables, assignments, joins...
+#
+
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (0),(0);
+--echo # BUG#55615 : should not crash
+SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a;
+--echo # BUG#55564 : should not crash
+SELECT IF(
+ @v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
+ count(*), 1)
+FROM t1 GROUP BY a LIMIT 1;
+
+DROP TABLE t1;
+
--echo End of 5.1 tests