~drizzle-trunk/drizzle/development

1 by brian
clean slate
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
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
--disable_warnings
10
drop table if exists t1,t2;
11
--enable_warnings
12
13
14
#connect (con1,localhost,root,,"");
15
#show tables;
16
connect (con1,localhost,root,,mysql);
17
show tables;
18
connect (con2,localhost,root,,test);
19
show tables;
20
21
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
22
--error 1049
1 by brian
clean slate
23
connect (fail_con,localhost,root,z,test2);
24
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
25
connect (fail_con,localhost,root,z,);
722.2.16 by Monty Taylor
Fixed connect.test.
26
--disconnect fail_con
1 by brian
clean slate
27
28
# Now check this user with different databases
29
#connect (con1,localhost,test,gambling,"");
30
#show tables;
31
connect (con3,localhost,test,gambling,mysql);
32
show tables;
33
connect (con4,localhost,test,gambling,test);
34
show tables;
35
36
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
37
--error 1049
1 by brian
clean slate
38
connect (fail_con,localhost,test,,test2);
39
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
40
--error 1049
1 by brian
clean slate
41
connect (fail_con,localhost,test,,"");
42
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
43
--error 1049
1 by brian
clean slate
44
connect (fail_con,localhost,test,zorro,test2);
45
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
46
connect (fail_con,localhost,test,zorro,);
722.2.16 by Monty Taylor
Fixed connect.test.
47
--disconnect fail_con
48
49
1 by brian
clean slate
50
51
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
52
--error 1049
1 by brian
clean slate
53
connect (fail_con,localhost,test,,test2);
54
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
55
connect (fail_con,localhost,test,,);
722.2.16 by Monty Taylor
Fixed connect.test.
56
--disconnect fail_con
1 by brian
clean slate
57
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
722.2.16 by Monty Taylor
Fixed connect.test.
58
--error 1049
1 by brian
clean slate
59
connect (fail_con,localhost,test,zorro,test2);
60
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
61
connect (fail_con,localhost,test,zorro,);
722.2.16 by Monty Taylor
Fixed connect.test.
62
--disconnect fail_con
63
64
1 by brian
clean slate
65
66
#
67
# Bug#12517: Clear user variables and replication events before 
68
#            closing temp tables in thread cleanup.
69
connect (con7,localhost,root,,test);
70
connection con7;
71
create table t1 (id integer not null auto_increment primary key);
72
create temporary table t2(id integer not null auto_increment primary key);
73
set @id := 1;
74
delete from t1 where id like @id;
75
disconnect con7;
76
--sleep 5
77
connection default;
78
drop table t1;
79
80
--disconnect con1
81
--disconnect con2
82
--disconnect con3
83
--disconnect con4
84
85
--echo # ------------------------------------------------------------------
86
--echo # -- End of 4.1 tests
87
--echo # ------------------------------------------------------------------
88
89
--echo # ------------------------------------------------------------------
90
--echo # -- End of 5.1 tests
91
--echo # ------------------------------------------------------------------