~vadim-tk/percona-server/flushing-algo

« back to all changes in this revision

Viewing changes to mysql-test/r/connect.result

  • Committer: root
  • Date: 2011-10-29 01:34:40 UTC
  • Revision ID: root@hppro1.office.percona.com-20111029013440-qhnf4jk8kdjcf4e0
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set global log_warnings=0;
 
2
drop table if exists t1,t2;
 
3
show tables;
 
4
Tables_in_mysql
 
5
columns_priv
 
6
db
 
7
event
 
8
func
 
9
general_log
 
10
help_category
 
11
help_keyword
 
12
help_relation
 
13
help_topic
 
14
host
 
15
ndb_binlog_index
 
16
plugin
 
17
proc
 
18
procs_priv
 
19
proxies_priv
 
20
servers
 
21
slow_log
 
22
tables_priv
 
23
time_zone
 
24
time_zone_leap_second
 
25
time_zone_name
 
26
time_zone_transition
 
27
time_zone_transition_type
 
28
user
 
29
show tables;
 
30
Tables_in_test
 
31
connect(localhost,root,z,test2,MASTER_PORT,MASTER_SOCKET);
 
32
ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
 
33
connect(localhost,root,z,test,MASTER_PORT,MASTER_SOCKET);
 
34
ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
 
35
grant ALL on *.* to test@localhost identified by "gambling";
 
36
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
 
37
show tables;
 
38
Tables_in_mysql
 
39
columns_priv
 
40
db
 
41
event
 
42
func
 
43
general_log
 
44
help_category
 
45
help_keyword
 
46
help_relation
 
47
help_topic
 
48
host
 
49
ndb_binlog_index
 
50
plugin
 
51
proc
 
52
procs_priv
 
53
proxies_priv
 
54
servers
 
55
slow_log
 
56
tables_priv
 
57
time_zone
 
58
time_zone_leap_second
 
59
time_zone_name
 
60
time_zone_transition
 
61
time_zone_transition_type
 
62
user
 
63
show tables;
 
64
Tables_in_test
 
65
connect(localhost,test,,test2,MASTER_PORT,MASTER_SOCKET);
 
66
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
 
67
connect(localhost,test,,"",MASTER_PORT,MASTER_SOCKET);
 
68
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
 
69
connect(localhost,test,zorro,test2,MASTER_PORT,MASTER_SOCKET);
 
70
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
 
71
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
 
72
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
 
73
update mysql.user set password=old_password("gambling2") where user=_binary"test";
 
74
flush privileges;
 
75
set password="";
 
76
set password='gambling3';
 
77
ERROR HY000: Password hash should be a 41-digit hexadecimal number
 
78
set password=old_password('gambling3');
 
79
show tables;
 
80
Tables_in_mysql
 
81
columns_priv
 
82
db
 
83
event
 
84
func
 
85
general_log
 
86
help_category
 
87
help_keyword
 
88
help_relation
 
89
help_topic
 
90
host
 
91
ndb_binlog_index
 
92
plugin
 
93
proc
 
94
procs_priv
 
95
proxies_priv
 
96
servers
 
97
slow_log
 
98
tables_priv
 
99
time_zone
 
100
time_zone_leap_second
 
101
time_zone_name
 
102
time_zone_transition
 
103
time_zone_transition_type
 
104
user
 
105
show tables;
 
106
Tables_in_test
 
107
connect(localhost,test,,test2,MASTER_PORT,MASTER_SOCKET);
 
108
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
 
109
connect(localhost,test,,test,MASTER_PORT,MASTER_SOCKET);
 
110
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
 
111
connect(localhost,test,zorro,test2,MASTER_PORT,MASTER_SOCKET);
 
112
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
 
113
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
 
114
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
 
115
delete from mysql.user where user=_binary"test";
 
116
flush privileges;
 
117
create table t1 (id integer not null auto_increment primary key);
 
118
create temporary table t2(id integer not null auto_increment primary key);
 
119
set @id := 1;
 
120
delete from t1 where id like @id;
 
121
drop table t1;
 
122
# ------------------------------------------------------------------
 
123
# -- End of 4.1 tests
 
124
# ------------------------------------------------------------------
 
125
 
 
126
# -- Bug#33507: Event scheduler creates more threads than max_connections
 
127
# -- which results in user lockout.
 
128
 
 
129
GRANT USAGE ON *.* TO mysqltest_u1@localhost;
 
130
 
 
131
SET GLOBAL max_connections = 3;
 
132
SET GLOBAL event_scheduler = ON;
 
133
 
 
134
# -- Waiting for Event Scheduler to start...
 
135
 
 
136
# -- Disconnecting default connection...
 
137
 
 
138
# -- Check that we allow exactly three user connections, no matter how
 
139
# -- many threads are running.
 
140
 
 
141
# -- Connecting (1)...
 
142
# -- Establishing connection 'con_1' (user: mysqltest_u1)...
 
143
# -- Connection 'con_1' has been established.
 
144
 
 
145
# -- Connecting (2)...
 
146
# -- Establishing connection 'con_2' (user: mysqltest_u1)...
 
147
# -- Connection 'con_2' has been established.
 
148
 
 
149
# -- Connecting (3)...
 
150
# -- Establishing connection 'con_3' (user: mysqltest_u1)...
 
151
# -- Connection 'con_3' has been established.
 
152
 
 
153
# -- Connecting (4) [should fail]...
 
154
# -- Establishing connection 'con_4' (user: mysqltest_u1)...
 
155
# -- Error: can not establish connection 'con_4'.
 
156
 
 
157
# -- Check that we allow one extra SUPER-user connection.
 
158
 
 
159
# -- Connecting super (1)...
 
160
# -- Establishing connection 'con_super_1' (user: root)...
 
161
# -- Connection 'con_super_1' has been established.
 
162
 
 
163
# -- Connecting super (2) [should fail]...
 
164
# -- Establishing connection 'con_super_2' (user: root)...
 
165
# -- Error: can not establish connection 'con_super_2'.
 
166
 
 
167
# -- Ensure that we have Event Scheduler thread, 3 ordinary user
 
168
# -- connections and one extra super-user connection.
 
169
SELECT user FROM information_schema.processlist ORDER BY id;
 
170
user
 
171
event_scheduler
 
172
mysqltest_u1
 
173
mysqltest_u1
 
174
mysqltest_u1
 
175
root
 
176
 
 
177
# -- Resetting variables...
 
178
SET GLOBAL max_connections = 151;
 
179
 
 
180
# -- Stopping Event Scheduler...
 
181
SET GLOBAL event_scheduler = OFF;
 
182
 
 
183
# -- Waiting for Event Scheduler to stop...
 
184
 
 
185
# -- That's it. Closing connections...
 
186
 
 
187
# -- Restoring default connection...
 
188
 
 
189
# -- Waiting for connections to close...
 
190
 
 
191
DROP USER mysqltest_u1@localhost;
 
192
 
 
193
# -- End of Bug#33507.
 
194
 
 
195
# -- Bug#35074: max_used_connections is not correct.
 
196
 
 
197
FLUSH STATUS;
 
198
 
 
199
SHOW STATUS LIKE 'max_used_connections';
 
200
Variable_name   Value
 
201
Max_used_connections    1
 
202
 
 
203
# -- Starting Event Scheduler...
 
204
SET GLOBAL event_scheduler = ON;
 
205
# -- Waiting for Event Scheduler to start...
 
206
 
 
207
# -- Opening a new connection to check max_used_connections...
 
208
 
 
209
# -- Check that max_used_connections hasn't changed.
 
210
SHOW STATUS LIKE 'max_used_connections';
 
211
Variable_name   Value
 
212
Max_used_connections    2
 
213
 
 
214
# -- Closing new connection...
 
215
 
 
216
# -- Stopping Event Scheduler...
 
217
SET GLOBAL event_scheduler = OFF;
 
218
# -- Waiting for Event Scheduler to stop...
 
219
 
 
220
# -- End of Bug#35074.
 
221
 
 
222
# ------------------------------------------------------------------
 
223
# -- End of 5.1 tests
 
224
# ------------------------------------------------------------------
 
225
set global log_warnings=1;