~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-02-10 16:42:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210164205-ej41ocvm4z1s14nq
Tags: 5.1.31-1ubuntu1
* Merge from debian experimental, remaining changes: 
  - debian/mysql-server-5.1.config: ask for MySQL root password at priority
    high instead of medium so that the password prompt is seen on a default
    install. (LP: #319843)
  - debian/control: 
    + Don't build mysql-server, mysql-client, mysql-common and 
      libmysqlclient15-dev binary packages since they're still provided 
      by mysql-dfsg-5.0.
    + Rename libmysqlclient-dev package to libmysqlclient16-dev (LP: #316280).
      Make it conflict with libmysqlclient15-dev.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide 
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src 
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
  - debian/rules: added -fno-strict-aliasing to CFLAGS to get
    around mysql testsuite build failures.
* debian/patches/92_ssl_test_cert.dpatch: certificate expiration in 
  test suite (LP: #323755).
* Dropped changes:
  - all of the changes made to support both 5.0 and 5.1 installed at the
    same time have been dropped now that amarok doesn't depend on
    mysql-server-5.1 anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SET @old_general_log= @@global.general_log;
 
2
SET @old_general_log_file= @@global.general_log_file;
 
3
SET @old_slow_query_log= @@global.slow_query_log;
 
4
SET @old_slow_query_log_file= @@global.slow_query_log_file;
1
5
set global general_log= OFF;
2
6
truncate table mysql.general_log;
3
7
truncate table mysql.slow_log;
33
37
log     ON
34
38
log_slow_queries        OFF
35
39
slow_query_log  OFF
36
 
set session long_query_time=1;
37
 
select sleep(2);
38
 
sleep(2)
 
40
# Establish connection con1 (user=root)
 
41
# Switch to connection con1
 
42
set @long_query_time = <long_query_time>;
 
43
set session long_query_time = @long_query_time;
 
44
select sleep(@long_query_time + 1);
 
45
sleep(@long_query_time + 1)
39
46
0
40
47
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
41
48
start_time      user_host       query_time      lock_time       rows_sent       rows_examined   db      last_insert_id  insert_id       server_id       sql_text
 
49
# Switch to connection default
42
50
set global slow_query_log= ON;
43
 
set session long_query_time=1;
44
 
select sleep(2);
45
 
sleep(2)
 
51
# Switch to connection con1
 
52
set session long_query_time = @long_query_time;
 
53
select sleep(@long_query_time + 1);
 
54
sleep(@long_query_time + 1)
46
55
0
47
56
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
48
57
start_time      user_host       query_time      lock_time       rows_sent       rows_examined   db      last_insert_id  insert_id       server_id       sql_text
49
 
TIMESTAMP       USER_HOST       QUERY_TIME      00:00:00        1       0       test    0       0       1       select sleep(2)
 
58
TIMESTAMP       USER_HOST       QUERY_TIME      00:00:00        1       0       test    0       0       1       select sleep(@long_query_time + 1)
 
59
# Switch to connection default
50
60
show global variables
51
61
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
52
62
Variable_name = 'general_log' or Variable_name = 'slow_query_log';
92
102
show variables like 'log_output';
93
103
Variable_name   Value
94
104
log_output      FILE,TABLE
95
 
set global general_log_file='/not exiting path/log.master';
96
 
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
 
105
set global general_log_file='/not existing path/log.master';
 
106
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not existing path/log.master'
97
107
set global general_log_file='MYSQLTEST_VARDIR';
98
108
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR'
99
109
set global general_log_file='';
153
163
event_time      user_host       thread_id       server_id       command_type    argument
154
164
TIMESTAMP       USER_HOST       #       1       Query   drop table t1
155
165
TIMESTAMP       USER_HOST       #       1       Query   select * from mysql.general_log
156
 
SET @old_general_log_state = @@global.general_log;
157
 
SET @old_slow_log_state = @@global.slow_query_log;
158
 
SET GLOBAL general_log = ON;
159
 
SET GLOBAL slow_query_log = ON;
160
 
FLUSH TABLES WITH READ LOCK;
161
 
SET GLOBAL general_log = OFF;
162
 
SET GLOBAL slow_query_log = OFF;
163
 
UNLOCK TABLES;
164
 
FLUSH TABLES WITH READ LOCK;
165
 
SET GLOBAL general_log = ON;
166
 
SET GLOBAL slow_query_log = ON;
167
 
UNLOCK TABLES;
168
 
SET GLOBAL READ_ONLY = ON;
169
 
SET GLOBAL general_log = OFF;
170
 
SET GLOBAL slow_query_log = OFF;
171
 
SET GLOBAL READ_ONLY = OFF;
172
 
SET GLOBAL READ_ONLY = ON;
173
 
SET GLOBAL general_log = ON;
174
 
SET GLOBAL slow_query_log = ON;
175
 
SET GLOBAL READ_ONLY = OFF;
176
 
SET GLOBAL general_log = @old_general_log_state;
177
 
SET GLOBAL slow_query_log = @old_slow_log_state;
178
 
SET @old_general_log_state = @@global.general_log;
179
 
SET @old_slow_log_state = @@global.slow_query_log;
 
166
SET @@global.general_log = @old_general_log;
 
167
SET @@global.general_log_file = @old_general_log_file;
 
168
SET @@global.slow_query_log = @old_slow_query_log;
 
169
SET @@global.slow_query_log_file = @old_slow_query_log_file;
 
170
SET GLOBAL general_log = ON;
 
171
SET GLOBAL slow_query_log = ON;
 
172
FLUSH TABLES WITH READ LOCK;
 
173
SET GLOBAL general_log = OFF;
 
174
SET GLOBAL slow_query_log = OFF;
 
175
UNLOCK TABLES;
 
176
FLUSH TABLES WITH READ LOCK;
 
177
SET GLOBAL general_log = ON;
 
178
SET GLOBAL slow_query_log = ON;
 
179
UNLOCK TABLES;
 
180
SET GLOBAL READ_ONLY = ON;
 
181
SET GLOBAL general_log = OFF;
 
182
SET GLOBAL slow_query_log = OFF;
 
183
SET GLOBAL READ_ONLY = OFF;
 
184
SET GLOBAL READ_ONLY = ON;
 
185
SET GLOBAL general_log = ON;
 
186
SET GLOBAL slow_query_log = ON;
 
187
SET GLOBAL READ_ONLY = OFF;
 
188
SET GLOBAL general_log = @old_general_log;
 
189
SET GLOBAL slow_query_log = @old_slow_query_log;
 
190
SET GLOBAL general_log = ON;
180
191
SHOW VARIABLES LIKE 'general_log';
181
192
Variable_name   Value
182
193
general_log     ON
239
250
SELECT @@slow_query_log, @@log_slow_queries;
240
251
@@slow_query_log        @@log_slow_queries
241
252
1       1
242
 
SET GLOBAL general_log = @old_general_log_state;
243
 
SET GLOBAL slow_query_log = @old_slow_log_state;
244
 
set @old_general_log_file= @@global.general_log_file;
245
 
set @old_slow_query_log_file= @@global.slow_query_log_file;
246
 
set global general_log_file= concat('/not exiting path/log.maste', 'r');
247
 
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
248
 
set global general_log_file= NULL;
 
253
SET GLOBAL general_log = @old_general_log;
 
254
SET GLOBAL slow_query_log = @old_slow_query_log;
 
255
SET GLOBAL general_log_file= CONCAT('/not existing path/log.maste', 'r');
 
256
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not existing path/log.master'
 
257
SET GLOBAL general_log_file= NULL;
249
258
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL'
250
 
set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
251
 
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master'
252
 
set global slow_query_log_file= NULL;
 
259
SET GLOBAL slow_query_log_file= CONCAT('/not existing path/log.maste', 'r');
 
260
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not existing path/log.master'
 
261
SET GLOBAL slow_query_log_file= NULL;
253
262
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL'
254
 
set global general_log_file= @old_general_log_file;
255
 
set global slow_query_log_file= @old_slow_query_log_file;
 
263
SET GLOBAL general_log_file= @old_general_log_file;
 
264
SET GLOBAL slow_query_log_file= @old_slow_query_log_file;
256
265
 
257
266
# --
258
267
# -- Bug#32748: Inconsistent handling of assignments to
259
 
# -- general_log_file/slow_query_log_file.
 
268
# --            general_log_file/slow_query_log_file.
260
269
# --
261
270
 
262
 
SET @general_log_file_saved = @@global.general_log_file;
263
 
SET @slow_query_log_file_saved = @@global.slow_query_log_file;
264
 
 
265
271
SET GLOBAL general_log_file = 'bug32748.query.log';
266
272
SET GLOBAL slow_query_log_file = 'bug32748.slow.log';
267
273
 
270
276
general_log_file        bug32748.query.log
271
277
slow_query_log_file     bug32748.slow.log
272
278
 
273
 
SET GLOBAL general_log_file = @general_log_file_saved;
274
 
SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
 
279
SET GLOBAL general_log_file = @old_general_log_file;
 
280
SET GLOBAL slow_query_log_file = @old_slow_query_log_file;
275
281
 
276
282
# -- End of Bug#32748.
277
283
deprecated:
298
304
SET GLOBAL slow_query_log_file = @my_sqlf;
299
305
SET GLOBAL general_log = DEFAULT;
300
306
SET GLOBAL slow_query_log = DEFAULT;
 
307
SET @@global.general_log = @old_general_log;
 
308
SET @@global.general_log_file = @old_general_log_file;
 
309
SET @@global.slow_query_log = @old_slow_query_log;
 
310
SET @@global.slow_query_log_file = @old_slow_query_log_file;
301
311
End of 5.1 tests
 
312
# Close connection con1
 
313
SET global general_log = @old_general_log;
 
314
SET global general_log_file = @old_general_log_file;
 
315
SET global slow_query_log = @old_slow_query_log;
 
316
SET global slow_query_log_file = @old_slow_query_log_file;