~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

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