~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/connect.test

  • Committer: Brian Aker
  • Date: 2009-12-29 01:38:38 UTC
  • mfrom: (1251.1.1 drizzle)
  • Revision ID: brian@gaz-20091229013838-03kb2z5xbqw03ddt
Merge of Diego fix.

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
 
 
9
5
--disable_warnings
10
6
drop table if exists t1,t2;
11
7
--enable_warnings
19
15
show tables;
20
16
 
21
17
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
22
 
--error 1045
 
18
--error 1049
23
19
connect (fail_con,localhost,root,z,test2);
24
20
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
25
 
--error 1045
26
21
connect (fail_con,localhost,root,z,);
27
 
 
28
 
grant ALL on *.* to test@localhost identified by "gambling";
29
 
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
 
22
--disconnect fail_con
30
23
 
31
24
# Now check this user with different databases
32
25
#connect (con1,localhost,test,gambling,"");
37
30
show tables;
38
31
 
39
32
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
40
 
--error 1045
 
33
--error 1049
41
34
connect (fail_con,localhost,test,,test2);
42
35
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
43
 
--error 1045
 
36
--error 1049
44
37
connect (fail_con,localhost,test,,"");
45
38
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
46
 
--error 1045
 
39
--error 1049
47
40
connect (fail_con,localhost,test,zorro,test2);
48
41
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
49
 
--error 1045
50
42
connect (fail_con,localhost,test,zorro,);
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;
 
43
--disconnect fail_con
 
44
 
 
45
 
67
46
 
68
47
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
69
 
--error 1045
 
48
--error 1049
70
49
connect (fail_con,localhost,test,,test2);
71
50
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
72
 
--error 1045
73
51
connect (fail_con,localhost,test,,);
 
52
--disconnect fail_con
74
53
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
75
 
--error 1045
 
54
--error 1049
76
55
connect (fail_con,localhost,test,zorro,test2);
77
56
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
78
 
--error 1045
79
57
connect (fail_con,localhost,test,zorro,);
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;
 
58
--disconnect fail_con
 
59
 
 
60
 
87
61
 
88
62
#
89
63
# Bug#12517: Clear user variables and replication events before 
103
77
--disconnect con2
104
78
--disconnect con3
105
79
--disconnect con4
106
 
--disconnect con5
107
 
--disconnect con6
108
 
--disconnect con10
109
80
 
110
81
--echo # ------------------------------------------------------------------
111
82
--echo # -- End of 4.1 tests