From 3facbf180b66a0752baa7f9601c2c7569712416e Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 2 Mar 2010 12:39:32 +0100 Subject: [PATCH 01/23] Bug #51590 mysqltest: --disable_abort_on_error does not work inside while/if abort_on_error flag for stmt was set at initial parse (Re)-set flag before execution instead, also added to test --- client/mysqltest.cc | 7 ++++--- mysql-test/r/mysqltest.result | 1 + mysql-test/t/mysqltest.test | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index d45f9acd87a..8ba1271e1fa 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -7571,9 +7571,6 @@ void get_command_type(struct st_command* command) sizeof(saved_expected_errors)); DBUG_PRINT("info", ("There are %d expected errors", command->expected_errors.count)); - command->abort_on_error= (command->expected_errors.count == 0 && - abort_on_error); - DBUG_VOID_RETURN; } @@ -7918,6 +7915,10 @@ int main(int argc, char **argv) command->type= Q_COMMENT; } + /* (Re-)set abort_on_error for this command */ + command->abort_on_error= (command->expected_errors.count == 0 && + abort_on_error); + /* delimiter needs to be executed so we can continue to parse */ my_bool ok_to_do= cur_block->ok || command->type == Q_DELIMITER; /* diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 67c08b0ae97..38112c032b5 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -325,6 +325,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 diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 25293ff29e7..b2d7c59a8a0 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -863,7 +863,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) @@ -874,6 +874,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; From 68297e3ece7383a79406840a406fecc573b0ac66 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Wed, 3 Mar 2010 11:17:00 +0100 Subject: [PATCH 02/23] followup test fix after 49761 --- mysql-test/t/mysqltest.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index b2d7c59a8a0..0c31af8b641 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1728,7 +1728,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; From a320ebe897b734136e61d5a3ffa7a903cb3f3257 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Thu, 4 Mar 2010 11:09:09 +0100 Subject: [PATCH 03/23] Bug #45482 MTR2: --default-storage-engine=csv is rejected by mtr Added csv to list of builtin engines Fixed dysfunctional part of csv.test so it actuallu used csv --- mysql-test/lib/mtr_cases.pm | 2 +- mysql-test/r/csv.result | 43 ++++++++++++++++++------------------- mysql-test/t/csv.test | 15 ++++++------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 1b6896e5a80..a596dfceab5 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -648,7 +648,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/r/csv.result b/mysql-test/r/csv.result index 4b96f5a5ed0..7418cd3a564 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/t/csv.test b/mysql-test/t/csv.test index cdf274190dd..cf6d5b6d4c1 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; # From bd20de0136bb222ab19e9a46ce3da971e9ddc19c Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 16 Mar 2010 10:45:32 +0100 Subject: [PATCH 04/23] Bug #51767 Implement --start-and-exit also for MTR v2 Added option and logic, bypass safe_process Adapted after review comments --- mysql-test/lib/My/SafeProcess.pm | 15 ++++++++++++++- mysql-test/mysql-test-run.pl | 30 +++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index bfcad910a16..a4ae988ed9e 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" @@ -528,6 +534,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/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a35741bebda..91ae508422f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -218,6 +218,7 @@ 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_repeat= 1; @@ -345,6 +346,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 ( @@ -384,6 +391,8 @@ sub main { my $completed= 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)); @@ -910,6 +919,7 @@ 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, 'wait-all' => \$opt_wait_all, 'print-testcases' => \&collect_option, @@ -1316,7 +1326,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; } @@ -3400,6 +3410,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(); @@ -4644,6 +4666,12 @@ sub stop_servers($$) { sub start_servers($) { my ($tinfo)= @_; + # Make sure the safe_process also exits from now on + # Could not be done before, as we don't want this for the bootstrap + if ($opt_start_exit) { + My::SafeProcess->start_exit(); + } + # Start clusters foreach my $cluster ( clusters() ) { From 2fb8854aa06da75f9a4d9b4a0bcafc3888ecea5c Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Wed, 17 Mar 2010 15:25:55 +0100 Subject: [PATCH 05/23] Bug #43588 mysqltest command disable_abort_on_error logs connect commands Only log connects after --error A few small test adjustments needed/possible --- client/mysqltest.cc | 2 +- mysql-test/r/mysqltest.result | 1 - mysql-test/t/innodb_mysql.test | 4 ---- mysql-test/t/mysqltest.test | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 64cf06736a0..18af4088e68 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -4920,7 +4920,7 @@ int connect_n_handle_errors(struct st_command *command, ds= &ds_res; /* Only log if an error is expected */ - if (!command->abort_on_error && + if (command->expected_errors.count > 0 && !disable_query_log) { /* diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 38112c032b5..de7a3eefb6a 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -447,7 +447,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 diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index a3c11b8b8d6..9d68d01b79c 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -500,11 +500,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 |; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 0c31af8b641..649a5fce366 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1441,7 +1441,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; From a707e0f5c31efd3884c71c0fd467dfef30b9490d Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Fri, 19 Mar 2010 09:56:26 +0100 Subject: [PATCH 06/23] Fixed many funcs_1 tests after 43588 --- .../funcs_1/r/innodb_storedproc_06.result | 11 ----------- .../funcs_1/r/innodb_storedproc_10.result | 4 ---- .../suite/funcs_1/r/innodb_trig_03.result | 19 ------------------- .../suite/funcs_1/r/innodb_trig_03e.result | 16 ---------------- .../suite/funcs_1/r/innodb_trig_0407.result | 2 -- .../suite/funcs_1/r/innodb_trig_08.result | 2 -- .../funcs_1/r/memory_storedproc_06.result | 11 ----------- .../funcs_1/r/memory_storedproc_10.result | 4 ---- .../suite/funcs_1/r/memory_trig_03.result | 19 ------------------- .../suite/funcs_1/r/memory_trig_03e.result | 15 --------------- .../suite/funcs_1/r/memory_trig_0407.result | 2 -- .../suite/funcs_1/r/memory_trig_08.result | 2 -- .../funcs_1/r/myisam_storedproc_06.result | 11 ----------- .../funcs_1/r/myisam_storedproc_10.result | 4 ---- .../suite/funcs_1/r/myisam_trig_03.result | 19 ------------------- .../suite/funcs_1/r/myisam_trig_03e.result | 15 --------------- .../suite/funcs_1/r/myisam_trig_0407.result | 2 -- .../suite/funcs_1/r/myisam_trig_08.result | 2 -- mysql-test/suite/funcs_1/r/ndb_trig_03.result | 19 ------------------- .../suite/funcs_1/r/ndb_trig_03e.result | 16 ---------------- .../suite/funcs_1/r/ndb_trig_0407.result | 2 -- mysql-test/suite/funcs_1/r/ndb_trig_08.result | 2 -- mysql-test/suite/funcs_1/r/storedproc.result | 1 - .../funcs_1/storedproc/storedproc_06.inc | 11 ----------- .../funcs_1/storedproc/storedproc_10.inc | 4 ---- .../suite/funcs_1/triggers/triggers_03.inc | 19 ------------------- .../funcs_1/triggers/triggers_03e_columns.inc | 2 -- .../triggers/triggers_03e_db_level.inc | 2 -- .../triggers/triggers_03e_db_table_mix.inc | 2 -- .../funcs_1/triggers/triggers_03e_definer.inc | 1 - .../triggers/triggers_03e_global_db_mix.inc | 4 ---- .../funcs_1/triggers/triggers_03e_prepare.inc | 2 -- .../triggers/triggers_03e_table_level.inc | 2 -- .../triggers/triggers_03e_transaction.inc | 1 - .../suite/funcs_1/triggers/triggers_0407.inc | 2 -- .../suite/funcs_1/triggers/triggers_08.inc | 2 -- 36 files changed, 254 deletions(-) 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_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; From d7f2f034412cee6c568d4c52fd0376b40cd381a7 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Mon, 22 Mar 2010 11:28:57 +0100 Subject: [PATCH 07/23] Bug #43603 mysqltest command disable_abort_on_error does not affect all built-in commands After disable_abort_on_error, behaved as if --error was in effect Add condition before die, as after queries --- client/mysqltest.cc | 20 ++++++++++++-------- mysql-test/r/mysqltest.result | 2 +- mysql-test/t/mysqltest.test | 9 +++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 18af4088e68..e184061d4d3 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1081,8 +1081,9 @@ void handle_command_error(struct st_command *command, uint error) command->first_word_len, command->query, error)); DBUG_VOID_RETURN; } - die("command \"%.*s\" failed with wrong error: %d", - command->first_word_len, command->query, error); + if (command->expected_errors.count > 0) + die("command \"%.*s\" failed with wrong error: %d", + command->first_word_len, command->query, error); } else if (command->expected_errors.err[0].type == ERR_ERRNO && command->expected_errors.err[0].code.errnum != 0) @@ -1352,14 +1353,14 @@ void log_msg(const char *fmt, ...) */ -void cat_file(DYNAMIC_STRING* ds, const char* filename) +int cat_file(DYNAMIC_STRING* ds, const char* filename) { int fd; size_t len; char buff[512]; if ((fd= my_open(filename, O_RDONLY, MYF(0))) < 0) - die("Failed to open file '%s'", filename); + return 1; while((len= my_read(fd, (uchar*)&buff, sizeof(buff), MYF(0))) > 0) { @@ -1383,6 +1384,7 @@ void cat_file(DYNAMIC_STRING* ds, const char* filename) dynstr_append_mem(ds, start, p-start); } my_close(fd, MYF(0)); + return 0; } @@ -2722,8 +2724,9 @@ void do_exec(struct st_command *command) else { dynstr_free(&ds_cmd); - die("command \"%s\" failed with wrong error: %d", - command->first_argument, status); + if (command->expected_errors.count > 0) + die("command \"%s\" failed with wrong error: %d", + command->first_argument, status); } } else if (command->expected_errors.err[0].type == ERR_ERRNO && @@ -3498,6 +3501,7 @@ void do_append_file(struct st_command *command) void do_cat_file(struct st_command *command) { + int error; static DYNAMIC_STRING ds_filename; const struct command_arg cat_file_args[] = { { "filename", ARG_STRING, TRUE, &ds_filename, "File to read from" } @@ -3512,8 +3516,8 @@ void do_cat_file(struct st_command *command) DBUG_PRINT("info", ("Reading from, file: %s", ds_filename.str)); - cat_file(&ds_res, ds_filename.str); - + error= cat_file(&ds_res, ds_filename.str); + handle_command_error(command, error); dynstr_free(&ds_filename); DBUG_VOID_RETURN; } diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index de7a3eefb6a..84412d2f387 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -572,7 +572,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/t/mysqltest.test b/mysql-test/t/mysqltest.test index 649a5fce366..09916f4f8cf 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -325,6 +325,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ; --error 1 --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 # ---------------------------------------------------------------------------- From 4a6bf6443e783bbaef7a517d053ec01d26c5d90f Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Mon, 22 Mar 2010 11:32:17 +0100 Subject: [PATCH 08/23] Two more funcs_1 updates after 43588 --- mysql-test/suite/funcs_1/r/ndb_storedproc_06.result | 11 ----------- mysql-test/suite/funcs_1/r/ndb_storedproc_10.result | 4 ---- 2 files changed, 15 deletions(-) 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(); From 5fbd98a1fbb91d3d1a439c5f70efb66426caecf4 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 23 Mar 2010 15:01:40 +0100 Subject: [PATCH 09/23] Bug #52301 Add --protocol to mysqltest Implement as for other clients --- client/mysqltest.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index e184061d4d3..4205d5518dc 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -188,6 +188,8 @@ static void init_re(void); static int match_re(my_regex_t *, char *); static void free_re(void); +static uint opt_protocol=0; + DYNAMIC_ARRAY q_lines; #include "sslopt-vars.h" @@ -5165,11 +5167,13 @@ void do_connect(struct st_command *command) #ifdef __WIN__ if (con_pipe) { - uint protocol= MYSQL_PROTOCOL_PIPE; - mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol); + opt_protocol= MYSQL_PROTOCOL_PIPE; } #endif + if (opt_protocol) + mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); + #ifdef HAVE_SMEM if (con_shm) { @@ -5886,6 +5890,8 @@ static struct my_option my_long_options[] = GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0}, {"password", 'p', "Password to use when connecting to server.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " "order of preference, my.cnf, $MYSQL_TCP_PORT, " #if MYSQL_PORT_DEFAULT == 0 @@ -6023,7 +6029,7 @@ void read_embedded_server_arguments(const char *name) static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), +get_one_option(int optid, const struct my_option *opt, char *argument) { switch(optid) { @@ -6112,6 +6118,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'V': print_version(); exit(0); + case OPT_MYSQL_PROTOCOL: + opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, + opt->name); + break; case '?': usage(); exit(0); @@ -7862,6 +7872,9 @@ int main(int argc, char **argv) mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR, opt_charsets_dir); + if (opt_protocol) + mysql_options(&con->mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); + #ifdef HAVE_OPENSSL if (opt_use_ssl) From 723293de3e803b2ac4a50b00c9678dd24d148fd4 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 13 Apr 2010 10:01:04 +0200 Subject: [PATCH 10/23] Bug #42513 mtr2: mysqltest doesn't count internal commands output as real output MTR insited in exit; if run without result file Simply remove the else part producing the error and let test finish --- client/mysqltest.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 4205d5518dc..57dcb258221 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -8311,16 +8311,6 @@ int main(int argc, char **argv) check_result(); } } - else - { - /* - No result_file_name specified, the result - has been printed to stdout, exit with error - unless script has called "exit" to indicate success - */ - if (abort_flag == 0) - die("Exit with failure! Call 'exit' in script to return with sucess"); - } } else { From 2682fb67c35b630b3cbebc7d0a6045930989e85a Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 13 Apr 2010 12:41:42 +0200 Subject: [PATCH 11/23] Bug #52214 Misleading error msg when test fails before having produced any query output Print error message only if real error --- client/mysqltest.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 57dcb258221..878de31d4ed 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -610,8 +610,11 @@ public: if ((bytes= fread(buf, 1, sizeof(buf), m_file)) <= 0) { - fprintf(stderr, "Failed to read from '%s', errno: %d\n", - m_file_name, errno); + // ferror=0 will happen here if no queries executed yet + if (ferror(m_file)) + fprintf(stderr, + "Failed to read from '%s', errno: %d, feof:%d, ferror:%d\n", + m_file_name, errno, feof(m_file), ferror(m_file)); DBUG_VOID_RETURN; } From f9fa3b7a3fe4846b32fc51e7e356ee6af25492ac Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Mon, 7 Jun 2010 13:30:23 +0200 Subject: [PATCH 12/23] Bug #53374 Don't delete temporary perl file if perl fails Simple condition on the delete stmt But NB: next mtr run will clean up and remove the temp file --- client/mysqltest.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 217428f7db3..a3ae0ebb18c 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -3785,8 +3785,9 @@ void do_perl(struct st_command *command) } error= pclose(res_file); - /* Remove the temporary file */ - my_delete(temp_file_path, MYF(0)); + /* Remove the temporary file, but keep it if perl failed */ + if (!error) + my_delete(temp_file_path, MYF(0)); handle_command_error(command, WEXITSTATUS(error)); } From 84a27302a17f807339d5ee2e1bef306516375b4d Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Wed, 9 Jun 2010 10:21:46 +0200 Subject: [PATCH 13/23] Bug #53949 Allow MTR2 to start server without hardcoded command-line options Added option --user-args, to be used with --start* Only keeps --defaults-file and --defaults-group-suffix Also added missing help text entry for --start-and-exit --- mysql-test/mysql-test-run.pl | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 91ae508422f..9e29de89406 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -221,6 +221,7 @@ 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= 3; my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2); @@ -921,6 +922,7 @@ sub command_line_setup { '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, @@ -1331,13 +1333,24 @@ sub command_line_setup { $start_only= 1; } + # -------------------------------------------------------------------------- + # 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"); } # -------------------------------------------------------------------------- @@ -4252,7 +4265,7 @@ sub mysqld_arguments ($$$) { } } - if ( $mysql_version_id >= 50106 ) + if ( $mysql_version_id >= 50106 && !$opt_user_args) { # Turn on logging to file mtr_add_arg($args, "--log-output=file"); @@ -4290,7 +4303,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"); } @@ -4298,7 +4311,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; } @@ -4596,6 +4609,9 @@ sub envsubst { sub get_extra_opts { + # No extra options if --user-args + return \@opt_extra_mysqld_opt if $opt_user_args; + my ($mysqld, $tinfo)= @_; my $opts= @@ -5468,8 +5484,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 From b27f1478d9b4f30109dbf8a0c9feb9ba34dbc778 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Thu, 10 Jun 2010 10:34:16 +0200 Subject: [PATCH 14/23] Bug #54364 Allow multiple --experimental command line options for MTR Convert --experimental into a multi option Size of diff is caused by intenting code put into a for loop --- mysql-test/lib/mtr_report.pm | 2 +- mysql-test/mysql-test-run.pl | 66 +++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 1c4b940bbee..77f6920771d 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -124,7 +124,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 91ae508422f..46a9fdafdbf 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -187,7 +187,7 @@ our $opt_client_debugger; my $config; # The currently running config my $current_config_name; # The currently running config file template -our $opt_experimental; +our @opt_experimentals; our $experimental_test_cases; my $baseport; @@ -846,7 +846,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, # Specify ports @@ -1028,43 +1028,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/\@.*$//; + 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, $_; } - # 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, $_; + close FILE; } - close FILE; } foreach my $arg ( @ARGV ) From 3a320f95deeba165a4879836a8fc45a0f0f95168 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Mon, 14 Jun 2010 15:34:43 +0200 Subject: [PATCH 15/23] Bug #54368 MTR does not recognize carriage return in --defaults-file Remove any leftover trailing ^M from lines read in --- mysql-test/lib/My/Config.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index f8416e3df3a..315e415e219 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -188,6 +188,8 @@ sub new { while ( my $line= <$F> ) { chomp($line); + # Remove any trailing CR from Windows edited files + $line=~ s/\cM$//; # [group] if ( $line =~ /^\[(.*)\]/ ) { From 4316bf37f042fce342ac8b984976030e550e8d16 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 15 Jun 2010 11:16:38 +0200 Subject: [PATCH 16/23] Bug #52321 mtr test suite paths need to be updated Use $suitedir instead of $basedir to find suites Add 'testdir' to ConfigFactory --- mysql-test/lib/My/ConfigFactory.pm | 11 +++++++++-- mysql-test/lib/mtr_cases.pm | 8 ++++---- mysql-test/mysql-test-run.pl | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 41b595c80e8..342390edef8 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)= @_; @@ -142,8 +149,8 @@ sub fix_secure_file_priv { sub fix_std_data { my ($self, $config, $group_name, $group)= @_; - my $basedir= $self->get_basedir($group); - return "$basedir/mysql-test/std_data"; + my $testdir= $self->get_testdir($group); + return "$testdir/std_data"; } sub ssl_supported { diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 0ef993aa92d..835ae6319fa 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -266,11 +266,11 @@ sub collect_one_suite($) } else { - $suitedir= my_find_dir($::basedir, - ["mysql-test/suite", - "mysql-test", + $suitedir= my_find_dir($suitedir, + ["suite", + ".", # Look in storage engine specific suite dirs - "storage/*/mysql-test-suites" + "../storage/*/mysql-test-suites" ], [$suite]); } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 91ae508422f..f58e78d5b77 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2742,6 +2742,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, @@ -3350,6 +3351,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, From 711ce7761257a2b4bc73c4ad56c2fbe628d44b66 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 15 Jun 2010 11:29:24 +0200 Subject: [PATCH 17/23] Bug #54111 mysqltest command remove_files_wildcard does not work in embedded server Wildcard chars are changed in embedded mode Temporarily reset the wild_* variables before wild_compare, also for list_files --- client/mysqltest.cc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index a3ae0ebb18c..ba8e882f33e 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -2875,6 +2875,41 @@ void do_system(struct st_command *command) } +/* + SYNOPSIS + set_wild_chars + set true to set * etc. as wild char, false to reset + + DESCRIPTION + Auxiliary function to set "our" wild chars before calling wild_compare + This is needed because the default values are changed to SQL syntax + in mysqltest_embedded. +*/ + +void set_wild_chars (my_bool set) +{ + static char old_many= 0, old_one, old_prefix; + + if (set) + { + if (wild_many == '*') return; // No need + old_many= wild_many; + old_one= wild_one; + old_prefix= wild_prefix; + wild_many= '*'; + wild_one= '?'; + wild_prefix= 0; + } + else + { + if (! old_many) return; // Was not set + wild_many= old_many; + wild_one= old_one; + wild_prefix= old_prefix; + } +} + + /* SYNOPSIS do_remove_file @@ -2951,6 +2986,10 @@ void do_remove_files_wildcard(struct st_command *command) dir_separator[0]= FN_LIBCHAR; dir_separator[1]= 0; dynstr_append(&ds_file_to_remove, dir_separator); + + /* Set default wild chars for wild_compare, is changed in embedded mode */ + set_wild_chars(1); + for (i= 0; i < (uint) dir_info->number_off_files; i++) { file= dir_info->dir_entry + i; @@ -2970,6 +3009,7 @@ void do_remove_files_wildcard(struct st_command *command) if (error) break; } + set_wild_chars(0); my_dirend(dir_info); end: @@ -3211,6 +3251,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname, /* Note that my_dir sorts the list if not given any flags */ if (!(dir_info= my_dir(ds_dirname->str, MYF(0)))) DBUG_RETURN(1); + set_wild_chars(1); for (i= 0; i < (uint) dir_info->number_off_files; i++) { file= dir_info->dir_entry + i; @@ -3224,6 +3265,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname, dynstr_append(ds, file->name); dynstr_append(ds, "\n"); } + set_wild_chars(0); my_dirend(dir_info); DBUG_RETURN(0); } From 6eb0165b255cba62c8582c17098ad293806240bf Mon Sep 17 00:00:00 2001 From: Bjorn Munch <Bjorn.Munch@sun.com> Date: Tue, 15 Jun 2010 13:37:53 +0200 Subject: [PATCH 18/23] Bug #54364 Allow multiple --experimental command line options for MTR Bummer: MTR fails if a test fails and no --experimental is used $experimental_test_cases must be intialized --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e802c8807a4..fce8ce5ec1c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -188,7 +188,7 @@ my $config; # The currently running config my $current_config_name; # The currently running config file template our @opt_experimentals; -our $experimental_test_cases; +our $experimental_test_cases= []; my $baseport; # $opt_build_thread may later be set from $opt_port_base From 2994f8b7f10131f1f2bb69ad80c1bfeba8e86d8c Mon Sep 17 00:00:00 2001 From: Bjorn Munch <bjorn.bunch@oracle.com> Date: Fri, 23 Jul 2010 14:53:09 +0200 Subject: [PATCH 19/23] Bug #55503 MTR fails to filter LEAK SUMMARY from valgrind report of restarted servers Was not covered by "skip" pattern Replace with a more generic pattern for SUMMARY --- mysql-test/mysql-test-run.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fce8ce5ec1c..93f9b671f5a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3791,7 +3791,8 @@ sub extract_warning_lines ($$) { if ($opt_valgrind_mysqld) { # Skip valgrind summary from tests where server has been restarted # Should this contain memory leaks, the final report will find it - $skip_valgrind= 1 if $line =~ /^==\d+== ERROR SUMMARY:/; + # Use a generic pattern for summaries + $skip_valgrind= 1 if $line =~ /^==\d+== [A-Z ]+ SUMMARY:/; $skip_valgrind= 0 unless $line =~ /^==\d+==/; next if $skip_valgrind; } From 56a1917b7106956fecbc38535e7b364a8ea67498 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <bjorn.bunch@oracle.com> Date: Wed, 28 Jul 2010 12:24:38 +0200 Subject: [PATCH 20/23] Bug #55597 MTR: Restart the server, from within the test case, with new CLI options. The expect file can now include "restart:<server options>" Also drop check-testcase if this has been done --- mysql-test/mysql-test-run.pl | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 91ae508422f..afca6df4cdf 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2988,7 +2988,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; @@ -3982,6 +3983,12 @@ sub check_expected_crash_and_restart { next; } + 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 @@ -4326,7 +4333,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 ) { @@ -4507,7 +4520,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) From 1ba9d79b7b6679253353714307e497e6256eb77b Mon Sep 17 00:00:00 2001 From: Bjorn Munch <bjorn.bunch@oracle.com> Date: Tue, 3 Aug 2010 16:11:23 +0200 Subject: [PATCH 21/23] Bug #55582 mtr root detection (and if-expression execution) broken if() treated any non-numeric string as false Fixed to treat those as true instead Added some test cases Fixed missing $ in variable name in include/mix2.inc --- client/mysqltest.cc | 17 ++++++++++++++++- mysql-test/include/mix2.inc | 4 ++-- mysql-test/r/mysqltest.result | 2 ++ mysql-test/t/mysqltest.test | 19 +++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index ba8e882f33e..4a090f5481e 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -2383,6 +2383,9 @@ void eval_expr(VAR *v, const char *p, const char **p_end) if ((vp= var_get(p, p_end, 0, 0))) var_copy(v, vp); + /* Apparently it is not safe to assume null-terminated string */ + v->str_val[v->str_val_len]= 0; + /* Make sure there was just a $variable and nothing else */ const char* end= *p_end + 1; if (end < expected_end) @@ -5391,8 +5394,20 @@ void do_block(enum block_cmd cmd, struct st_command* command) /* Define inner block */ cur_block++; cur_block->cmd= cmd; - cur_block->ok= (v.int_val ? TRUE : FALSE); + if (v.int_val) + { + cur_block->ok= TRUE; + } else + /* Any non-empty string which does not begin with 0 is also TRUE */ + { + p= v.str_val; + /* First skip any leading white space or unary -+ */ + while (*p && ((my_isspace(charset_info, *p) || *p == '-' || *p == '+'))) + p++; + cur_block->ok= (*p && *p != '0') ? TRUE : FALSE; + } + if (not_expr) cur_block->ok = !cur_block->ok; diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc index b4c4a9b8836..123d049855a 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/r/mysqltest.result b/mysql-test/r/mysqltest.result index 84412d2f387..721050bae19 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -393,6 +393,8 @@ 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 1 Testing while with not mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 09916f4f8cf..b88cde8c8f0 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1105,6 +1105,25 @@ if (!$counter) echo Counter is not 0, (counter=0); } +# ---------------------------------------------------------------------------- +# 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; +} +if (beta) +{ + echo Beta is true; +} + # ---------------------------------------------------------------------------- # Test while, { and } # ---------------------------------------------------------------------------- From 0792d2b0692a0da66956c548357e89693a9a6de9 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <bjorn.bunch@oracle.com> Date: Wed, 4 Aug 2010 10:52:45 +0200 Subject: [PATCH 22/23] Bug #55582 mtr root detection (and if-expression execution) broken Follow-up patch: added test cases for -0 and while --- mysql-test/r/mysqltest.result | 1 + mysql-test/t/mysqltest.test | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 721050bae19..e4f68d68c3f 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -395,6 +395,7 @@ 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 diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index b88cde8c8f0..031c51a0720 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1119,10 +1119,21 @@ 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 } From ae2c3d62e911ffc51f9b851aeaddeb63298148c7 Mon Sep 17 00:00:00 2001 From: Bjorn Munch <bjorn.munch@oracle.com> Date: Fri, 6 Aug 2010 11:35:17 +0200 Subject: [PATCH 23/23] Bug #55503 MTR fails to filter LEAK SUMMARY from valgrind report of restarted servers Undo workaround as fix is being merged in --- mysql-test/suite/innodb_plugin/t/innodb-autoinc-44030.test | 2 -- mysql-test/suite/innodb_plugin/t/innodb-autoinc.test | 2 -- 2 files changed, 4 deletions(-) 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..5a83ffe3617 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`;