@@ -258,103 +258,3 @@ DROP TABLE t1;
258
258
#
259
259
# Bug MDEV-15789 (Upstream: #80329): MYSQLSLAP OPTIONS --AUTO-GENERATE-SQL-GUID-PRIMARY and --AUTO-GENERATE-SQL-SECONDARY-INDEXES DONT WORK
260
260
#
261
- #
262
- # MDEV-22485: mysqlslap does not use current user as default for connecting to server
263
- #
264
- set @old_general_log=@@global.general_log;
265
- set @old_general_log_file=@@global.general_log_file;
266
- select @old_general_log;
267
- @old_general_log
268
- 0
269
- show global variables
270
- where Variable_name = 'general_log' or Variable_name = 'slow_query_log';
271
- Variable_name Value
272
- general_log OFF
273
- slow_query_log OFF
274
- truncate table mysql.general_log;
275
- select * from mysql.general_log;
276
- event_time user_host thread_id server_id command_type argument
277
- set global general_log=ON;
278
- current_user.log;
279
- @@current_user.log
280
- current_user.log
281
- SET GLOBAL general_log_file=general_log.log;
282
- show global variables
283
- where Variable_name = 'general_log' or Variable_name = 'slow_query_log';
284
- Variable_name Value
285
- general_log ON
286
- slow_query_log OFF
287
- flush logs;
288
- create user anel@localhost;
289
- grant all on *.* to anel@localhost;
290
- connect con1,localhost,anel,,;
291
- connection con1;
292
- create table t(t int);
293
- # Run mysqlslap user anel
294
- Benchmark
295
- Average number of seconds to run all queries: X seconds
296
- Minimum number of seconds to run all queries: X seconds
297
- Maximum number of seconds to run all queries: X seconds
298
- Number of clients running queries: 1
299
- Average number of queries per client: 1
300
-
301
- flush tables;
302
- select user_host, command_type, argument from mysql.general_log;
303
- user_host command_type argument
304
- root[root] @ localhost [] Query select @@general_log_file
305
- root[root] @ localhost [] Query SET GLOBAL general_log_file=current_user.log
306
- root[root] @ localhost [] Query show global variables
307
- where Variable_name = 'general_log' or Variable_name = 'slow_query_log'
308
- root[root] @ localhost [] Query flush logs
309
- root[root] @ localhost [] Query create user anel@localhost
310
- root[root] @ localhost [] Query grant all on *.* to anel@localhost
311
- [anel] @ localhost [] Connect anel@localhost as anonymous on test
312
- anel[anel] @ localhost [] Query create table t(t int)
313
- [root] @ localhost [] Connect root@localhost as anonymous on
314
- [root] @ localhost [] Connect root@localhost as anonymous on test
315
- root[root] @ localhost [] Query SELECT current_user()
316
- root[root] @ localhost [] Quit
317
- root[root] @ localhost [] Quit
318
- anel[anel] @ localhost [] Query flush tables
319
- anel[anel] @ localhost [] Query select user_host, command_type, argument from mysql.general_log
320
- disconnect con1;
321
- connection default;
322
- # Run mysqlslap user root
323
- Benchmark
324
- Average number of seconds to run all queries: X seconds
325
- Minimum number of seconds to run all queries: X seconds
326
- Maximum number of seconds to run all queries: X seconds
327
- Number of clients running queries: 1
328
- Average number of queries per client: 1
329
-
330
- flush tables;
331
- select user_host, command_type, argument from mysql.general_log;
332
- user_host command_type argument
333
- root[root] @ localhost [] Query select @@general_log_file
334
- root[root] @ localhost [] Query SET GLOBAL general_log_file=current_user.log
335
- root[root] @ localhost [] Query show global variables
336
- where Variable_name = 'general_log' or Variable_name = 'slow_query_log'
337
- root[root] @ localhost [] Query flush logs
338
- root[root] @ localhost [] Query create user anel@localhost
339
- root[root] @ localhost [] Query grant all on *.* to anel@localhost
340
- [anel] @ localhost [] Connect anel@localhost as anonymous on test
341
- anel[anel] @ localhost [] Query create table t(t int)
342
- [root] @ localhost [] Connect root@localhost as anonymous on
343
- [root] @ localhost [] Connect root@localhost as anonymous on test
344
- root[root] @ localhost [] Query SELECT current_user()
345
- root[root] @ localhost [] Quit
346
- root[root] @ localhost [] Quit
347
- anel[anel] @ localhost [] Query flush tables
348
- anel[anel] @ localhost [] Query select user_host, command_type, argument from mysql.general_log
349
- anel[anel] @ localhost [] Quit
350
- [root] @ localhost [] Connect root@localhost as anonymous on
351
- [root] @ localhost [] Connect root@localhost as anonymous on test
352
- root[root] @ localhost [] Query SELECT current_user()
353
- root[root] @ localhost [] Quit
354
- root[root] @ localhost [] Quit
355
- root[root] @ localhost [] Query flush tables
356
- root[root] @ localhost [] Query select user_host, command_type, argument from mysql.general_log
357
- drop user anel@localhost;
358
- drop table t;
359
- set global general_log= @old_general_log;
360
- set global general_log_file= @old_general_log_file;
0 commit comments