1
# This test is to check various cases of connections
2
# with right and wrong password, with and without database
3
# Unfortunately the check is incomplete as we can't connect without database
5
# This test makes no sense with the embedded server
6
--source include/not_embedded.inc
8
# check that CSV engine was compiled in, as the test relies on the presence
9
# of the log tables (which are CSV-based). By connect mysql; show tables;
10
--source include/have_csv.inc
13
drop table if exists t1,t2;
17
#connect (con1,localhost,root,,"");
19
connect (con1,localhost,root,,mysql);
21
connect (con2,localhost,root,,test);
24
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
26
connect (fail_con,localhost,root,z,test2);
27
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
29
connect (fail_con,localhost,root,z,);
31
grant ALL on *.* to test@localhost identified by "gambling";
32
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
34
# Now check this user with different databases
35
#connect (con1,localhost,test,gambling,"");
37
connect (con3,localhost,test,gambling,mysql);
39
connect (con4,localhost,test,gambling,test);
42
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
44
connect (fail_con,localhost,test,,test2);
45
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
47
connect (fail_con,localhost,test,,"");
48
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
50
connect (fail_con,localhost,test,zorro,test2);
51
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
53
connect (fail_con,localhost,test,zorro,);
56
# check if old password version also works
57
update mysql.user set password=old_password("gambling2") where user=_binary"test";
60
connect (con10,localhost,test,gambling2,);
61
connect (con5,localhost,test,gambling2,mysql);
65
set password='gambling3';
66
set password=old_password('gambling3');
68
connect (con6,localhost,test,gambling3,test);
71
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
73
connect (fail_con,localhost,test,,test2);
74
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
76
connect (fail_con,localhost,test,,);
77
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
79
connect (fail_con,localhost,test,zorro,test2);
80
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
82
connect (fail_con,localhost,test,zorro,);
85
# remove user 'test' so that other tests which may use 'test'
86
# do not depend on this test.
88
delete from mysql.user where user=_binary"test";
92
# Bug#12517: Clear user variables and replication events before
93
# closing temp tables in thread cleanup.
94
connect (con7,localhost,root,,test);
96
create table t1 (id integer not null auto_increment primary key);
97
create temporary table t2(id integer not null auto_increment primary key);
99
delete from t1 where id like @id;
113
--echo # ------------------------------------------------------------------
114
--echo # -- End of 4.1 tests
115
--echo # ------------------------------------------------------------------
117
--echo # ------------------------------------------------------------------
118
--echo # -- End of 5.1 tests
119
--echo # ------------------------------------------------------------------