~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/connect.test

Merged in changes. 
Edited a the comment test case so deal with our version bump.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
4
4
 
 
5
# check that CSV engine was compiled in, as the test relies on the presence
 
6
# of the log tables (which are CSV-based). By connect mysql; show tables;
 
7
--source include/have_csv.inc
 
8
 
5
9
--disable_warnings
6
10
drop table if exists t1,t2;
7
11
--enable_warnings
15
19
show tables;
16
20
 
17
21
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
18
 
--error 1049
 
22
--error 1045
19
23
connect (fail_con,localhost,root,z,test2);
20
24
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
25
--error 1045
21
26
connect (fail_con,localhost,root,z,);
22
 
--disconnect fail_con
 
27
 
 
28
grant ALL on *.* to test@localhost identified by "gambling";
 
29
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
23
30
 
24
31
# Now check this user with different databases
25
32
#connect (con1,localhost,test,gambling,"");
30
37
show tables;
31
38
 
32
39
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
33
 
--error 1049
 
40
--error 1045
34
41
connect (fail_con,localhost,test,,test2);
35
42
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
36
 
--error 1049
 
43
--error 1045
37
44
connect (fail_con,localhost,test,,"");
38
45
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
39
 
--error 1049
 
46
--error 1045
40
47
connect (fail_con,localhost,test,zorro,test2);
41
48
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
49
--error 1045
42
50
connect (fail_con,localhost,test,zorro,);
43
 
--disconnect fail_con
44
 
 
45
 
 
 
51
 
 
52
 
 
53
# check if old password version also works
 
54
update mysql.user set password=old_password("gambling2") where user=_binary"test";
 
55
flush privileges;
 
56
 
 
57
connect (con10,localhost,test,gambling2,);
 
58
connect (con5,localhost,test,gambling2,mysql);
 
59
connection con5;
 
60
set password="";
 
61
--error 1372
 
62
set password='gambling3';
 
63
set password=old_password('gambling3');
 
64
show tables;
 
65
connect (con6,localhost,test,gambling3,test);
 
66
show tables;
46
67
 
47
68
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
48
 
--error 1049
 
69
--error 1045
49
70
connect (fail_con,localhost,test,,test2);
50
71
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
72
--error 1045
51
73
connect (fail_con,localhost,test,,);
52
 
--disconnect fail_con
53
74
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
54
 
--error 1049
 
75
--error 1045
55
76
connect (fail_con,localhost,test,zorro,test2);
56
77
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
78
--error 1045
57
79
connect (fail_con,localhost,test,zorro,);
58
 
--disconnect fail_con
59
 
 
60
 
 
 
80
 
 
81
 
 
82
# remove user 'test' so that other tests which may use 'test'
 
83
# do not depend on this test.
 
84
 
 
85
delete from mysql.user where user=_binary"test";
 
86
flush privileges;
61
87
 
62
88
#
63
89
# Bug#12517: Clear user variables and replication events before 
77
103
--disconnect con2
78
104
--disconnect con3
79
105
--disconnect con4
 
106
--disconnect con5
 
107
--disconnect con6
 
108
--disconnect con10
80
109
 
81
110
--echo # ------------------------------------------------------------------
82
111
--echo # -- End of 4.1 tests