2
2
# with right and wrong password, with and without database
3
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
6
13
drop table if exists t1,t2;
17
24
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
19
26
connect (fail_con,localhost,root,z,test2);
20
27
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
21
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";
24
34
# Now check this user with different databases
25
35
#connect (con1,localhost,test,gambling,"");
32
42
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
34
44
connect (fail_con,localhost,test,,test2);
35
45
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
37
47
connect (fail_con,localhost,test,,"");
38
48
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
40
50
connect (fail_con,localhost,test,zorro,test2);
41
51
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
42
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);
47
71
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
49
73
connect (fail_con,localhost,test,,test2);
50
74
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
51
76
connect (fail_con,localhost,test,,);
53
77
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
55
79
connect (fail_con,localhost,test,zorro,test2);
56
80
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
57
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";
63
92
# Bug#12517: Clear user variables and replication events before