Commit 749c1278 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin Committed by Sergei Golubchik

MDEV-5215 prerequisite of prerequisite: if DB is not mentioned in connect...

MDEV-5215 prerequisite of prerequisite: if DB is not mentioned in connect ignore errors of switching to it
parent 2bd41fc5
......@@ -5794,6 +5794,7 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
con - connection structure to be used
host, user, pass, - connection parameters
db, port, sock
default_db - 0 if db was explicitly passed
DESCRIPTION
This function will try to establish a connection to server and handle
......@@ -5811,7 +5812,8 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
int connect_n_handle_errors(struct st_command *command,
MYSQL* con, const char* host,
const char* user, const char* pass,
const char* db, int port, const char* sock)
const char* db, int port, const char* sock,
my_bool default_db)
{
DYNAMIC_STRING *ds;
int failed_attempts= 0;
......@@ -5852,8 +5854,10 @@ int connect_n_handle_errors(struct st_command *command,
mysql_options(con, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(con, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "mysqltest");
while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
CLIENT_MULTI_STATEMENTS))
while (!mysql_real_connect(con, host, user, pass,
(default_db ? "" : db),
port, (sock ? sock : 0),
CLIENT_MULTI_STATEMENTS))
{
/*
If we have used up all our connections check whether this
......@@ -5893,6 +5897,13 @@ int connect_n_handle_errors(struct st_command *command,
return 0; /* Not connected */
}
if (default_db && db && db[0] != '\0')
{
mysql_select_db(con, db);
// Ignore errors intentionally
}
var_set_errno(0);
handle_no_error(command);
revert_properties();
......@@ -5946,6 +5957,7 @@ void do_connect(struct st_command *command)
int connect_timeout= 0;
char *csname=0;
struct st_connection* con_slot;
my_bool default_db;
static DYNAMIC_STRING ds_connection_name;
static DYNAMIC_STRING ds_host;
......@@ -6152,7 +6164,12 @@ void do_connect(struct st_command *command)
/* Use default db name */
if (ds_database.length == 0)
{
dynstr_set(&ds_database, opt_db);
default_db= 1;
}
else
default_db= 0;
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(con_slot->mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
......@@ -6167,7 +6184,7 @@ void do_connect(struct st_command *command)
if (connect_n_handle_errors(command, con_slot->mysql,
ds_host.str,ds_user.str,
ds_password.str, ds_database.str,
con_port, ds_sock.str))
con_port, ds_sock.str, default_db))
{
DBUG_PRINT("info", ("Inserting connection %s in connection pool",
ds_connection_name.str));
......
connect con0,localhost,root,,;
connect con0,localhost,root,,test;
connection con0;
select hex(@a);
hex(@a)
NULL
connect con1,localhost,user_1,,;
connect con1,localhost,user_1,,test;
connection con1;
select hex(@a);
hex(@a)
610063
connection con0;
set global init_connect="set @a=2;set @b=3";
connect con2,localhost,user_1,,;
connect con2,localhost,user_1,,test;
connection con2;
select @a, @b;
@a @b
2 3
connection con0;
set GLOBAL init_connect=DEFAULT;
connect con3,localhost,user_1,,;
connect con3,localhost,user_1,,test;
connection con3;
select @a;
@a
......@@ -25,7 +25,7 @@ NULL
connection con0;
set global init_connect="drop table if exists t1; create table t1(a char(10));\
insert into t1 values ('\0');insert into t1 values('abc')";
connect con4,localhost,user_1,,;
connect con4,localhost,user_1,,test;
connection con4;
select hex(a) from t1;
hex(a)
......@@ -33,7 +33,7 @@ hex(a)
616263
connection con0;
set GLOBAL init_connect="adsfsdfsdfs";
connect con5,localhost,user_1,,;
connect con5,localhost,user_1,,test;
connection con5;
select @a;
ERROR 08S01: Aborted connection to db: 'test' user: 'user_1' host: 'localhost' (init_connect command failed)
......@@ -53,7 +53,7 @@ create table t2 (y int);
create user mysqltest1@localhost;
grant all privileges on test.* to mysqltest1@localhost;
set global init_connect="create procedure p1() select * from t1";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
call p1();
x
......@@ -69,7 +69,7 @@ begin\
select * from t1;\
set @x = x;
end";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
call p1(42);
count(*)
......@@ -84,7 +84,7 @@ select @x;
connection con0;
disconnect con1;
set global init_connect="call p1(4711)";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select @x;
@x
......@@ -92,7 +92,7 @@ select @x;
connection con0;
disconnect con1;
set global init_connect="drop procedure if exists p1";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
call p1();
ERROR 42000: PROCEDURE test.p1 does not exist
......@@ -119,7 +119,7 @@ end;
end loop;
end|
set global init_connect="call p1(@sum)";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select @sum;
@sum
......@@ -136,7 +136,7 @@ execute stmt1 using @v;
deallocate prepare stmt1;
end|
set global init_connect="call p1('t1', 11)";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select * from t1;
x
......@@ -154,7 +154,7 @@ select count(*) into n from t1;
return n;
end|
set global init_connect="set @x = f1()";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select @x;
@x
......@@ -162,7 +162,7 @@ select @x;
connection con0;
disconnect con1;
set global init_connect="create view v1 as select f1()";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select * from v1;
f1()
......@@ -170,7 +170,7 @@ f1()
connection con0;
disconnect con1;
set global init_connect="drop view v1";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select * from v1;
ERROR 42S02: Table 'test.v1' doesn't exist
......@@ -182,7 +182,7 @@ after insert on t2
for each row
insert into t1 values (new.y);
set global init_connect="insert into t2 values (13), (17), (19)";
connect con1,localhost,mysqltest1,,;
connect con1,localhost,mysqltest1,,test;
connection con1;
select * from t1;
x
......
......@@ -10,31 +10,31 @@
--source include/add_anonymous_users.inc
connect (con0,localhost,root,,);
connect (con0,localhost,root,,test);
connection con0;
select hex(@a);
connect (con1,localhost,user_1,,);
connect (con1,localhost,user_1,,test);
connection con1;
select hex(@a);
connection con0;
set global init_connect="set @a=2;set @b=3";
connect (con2,localhost,user_1,,);
connect (con2,localhost,user_1,,test);
connection con2;
select @a, @b;
connection con0;
set GLOBAL init_connect=DEFAULT;
connect (con3,localhost,user_1,,);
connect (con3,localhost,user_1,,test);
connection con3;
select @a;
connection con0;
set global init_connect="drop table if exists t1; create table t1(a char(10));\
insert into t1 values ('\0');insert into t1 values('abc')";
connect (con4,localhost,user_1,,);
connect (con4,localhost,user_1,,test);
connection con4;
select hex(a) from t1;
connection con0;
set GLOBAL init_connect="adsfsdfsdfs";
connect (con5,localhost,user_1,,);
connect (con5,localhost,user_1,,test);
connection con5;
# BUG#11755281/47032: ERROR 2006 / ERROR 2013 INSTEAD OF PROPER ERROR MESSAGE
# We now throw a proper error message here:
......@@ -72,7 +72,7 @@ grant all privileges on test.* to mysqltest1@localhost;
# Create a simple procedure
#
set global init_connect="create procedure p1() select * from t1";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
call p1();
drop procedure p1;
......@@ -88,7 +88,7 @@ begin\
select * from t1;\
set @x = x;
end";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
call p1(42);
select @x;
......@@ -99,7 +99,7 @@ disconnect con1;
# Just call it - this will not generate any output
#
set global init_connect="call p1(4711)";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select @x;
......@@ -109,7 +109,7 @@ disconnect con1;
# Drop the procedure
#
set global init_connect="drop procedure if exists p1";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
--error ER_SP_DOES_NOT_EXIST
call p1();
......@@ -145,7 +145,7 @@ end|
delimiter ;|
# Call the procedure with a cursor
set global init_connect="call p1(@sum)";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select @sum;
......@@ -167,7 +167,7 @@ end|
delimiter ;|
# Call the procedure with prepared statements
set global init_connect="call p1('t1', 11)";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select * from t1;
......@@ -188,7 +188,7 @@ end|
delimiter ;|
# Invoke a function
set global init_connect="set @x = f1()";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select @x;
......@@ -198,7 +198,7 @@ disconnect con1;
# Create a view
#
set global init_connect="create view v1 as select f1()";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select * from v1;
......@@ -208,7 +208,7 @@ disconnect con1;
# Drop the view
#
set global init_connect="drop view v1";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
--error ER_NO_SUCH_TABLE
select * from v1;
......@@ -225,7 +225,7 @@ drop function f1;
# after insert on t2\
# for each row\
# insert into t1 values (new.y)";
#connect (con1,localhost,mysqltest1,,);
#connect (con1,localhost,mysqltest1,,test);
#connection con1;
#insert into t2 values (2), (4);
#select * from t1;
......@@ -240,7 +240,7 @@ create trigger trg1
# Invoke trigger
set global init_connect="insert into t2 values (13), (17), (19)";
connect (con1,localhost,mysqltest1,,);
connect (con1,localhost,mysqltest1,,test);
connection con1;
select * from t1;
......
......@@ -2,7 +2,7 @@ set @save_userstat=@@global.userstat;
create user foo@localhost identified by 'foo';
flush user_statistics;
set global userstat=1;
connect foo, localhost, foo, foo;
connect foo, localhost, foo, foo, test;
select 1;
1
1
......@@ -12,7 +12,7 @@ select user, bytes_received from information_schema.user_statistics where user =
user bytes_received
foo 18
connect(localhost,foo,bar,test,MASTER_PORT,MASTER_SOCKET);
connect foo, localhost, foo, bar;
connect foo, localhost, foo, bar, test;
ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES)
connection default;
select user, bytes_received from information_schema.user_statistics where user = 'foo';
......
......@@ -12,7 +12,7 @@ create user foo@localhost identified by 'foo';
flush user_statistics;
set global userstat=1;
connect(foo, localhost, foo, foo);
connect(foo, localhost, foo, foo, test);
select 1;
disconnect foo;
connection default;
......@@ -27,7 +27,7 @@ select user, bytes_received from information_schema.user_statistics where user =
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
connect(foo, localhost, foo, bar);
connect(foo, localhost, foo, bar, test);
connection default;
......
......@@ -39,7 +39,7 @@ execute dump_hosts;
#
# To avoid noise from main, the background threads are disabled.
connect (con1, localhost, user1, , );
connect (con1, localhost, user1, ,test);
--connection default
......@@ -122,7 +122,7 @@ execute dump_hosts;
# select * from performance_schema.events_waits_history_long;
# select PROCESSLIST_USER, PROCESSLIST_HOST, INSTRUMENTED from performance_schema.threads;
connect (con2, localhost, user2, , );
connect (con2, localhost, user2, ,test);
--connection default
......@@ -201,7 +201,7 @@ execute dump_accounts;
execute dump_users;
execute dump_hosts;
connect (con3, localhost, user3, , );
connect (con3, localhost, user3, ,test);
--connection default
......@@ -280,7 +280,7 @@ execute dump_accounts;
execute dump_users;
execute dump_hosts;
connect (con4, localhost, user4, , );
connect (con4, localhost, user4, ,test);
--connection default
......
......@@ -20,7 +20,7 @@ SET @old_general_log_file= @@global.general_log_file;
SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
SET GLOBAL log_output = 'FILE,TABLE';
SET GLOBAL general_log= 'ON';
connect con1, localhost, root,,;
connect con1, localhost, root,,test;
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
......
......@@ -83,7 +83,7 @@ root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -339,7 +339,7 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -663,7 +663,7 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -1045,7 +1045,7 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -82,7 +82,7 @@ root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -308,7 +308,7 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -574,7 +574,7 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -870,7 +870,7 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -68,7 +68,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -266,7 +266,7 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -504,7 +504,7 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -772,7 +772,7 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -81,7 +81,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -277,7 +277,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -485,7 +485,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -695,7 +695,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -67,7 +67,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -235,7 +235,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -415,7 +415,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -597,7 +597,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -69,7 +69,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -297,7 +297,7 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -593,7 +593,7 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -947,7 +947,7 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -82,7 +82,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -308,7 +308,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -574,7 +574,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -870,7 +870,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -68,7 +68,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con1, localhost, user1, , ;
connect con1, localhost, user1, ,test;
connection default;
"================== Step 2 =================="
call dump_thread();
......@@ -266,7 +266,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con2, localhost, user2, , ;
connect con2, localhost, user2, ,test;
connection default;
"================== Step 4 =================="
call dump_thread();
......@@ -504,7 +504,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con3, localhost, user3, , ;
connect con3, localhost, user3, ,test;
connection default;
"================== Step 6 =================="
call dump_thread();
......@@ -772,7 +772,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connect con4, localhost, user4, , ;
connect con4, localhost, user4, ,test;
connection default;
"================== Step 8 =================="
call dump_thread();
......
......@@ -33,7 +33,7 @@ eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/rewrite_general_con.lo
SET GLOBAL log_output = 'FILE,TABLE';
SET GLOBAL general_log= 'ON';
connect(con1, localhost, root,,);
connect(con1, localhost, root,,test);
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
......
......@@ -476,8 +476,8 @@ TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0
TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0
TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,,,0
TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,,`plug_dest`@`%`,0
TIME,HOSTNAME,plug,localhost,ID,ID,QUERY,test,'select USER(),CURRENT_USER()',0
TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment