1
1
set global innodb_monitor_disable = All;
2
- select name, status from information_schema.innodb_metrics;
2
+ select name, if(enabled,'enabled','disabled') status
3
+ from information_schema.innodb_metrics;
3
4
name status
4
5
metadata_table_handles_opened disabled
5
6
metadata_table_handles_closed disabled
@@ -252,22 +253,23 @@ icp_no_match disabled
252
253
icp_out_of_range disabled
253
254
icp_match disabled
254
255
set global innodb_monitor_enable = all;
255
- select name from information_schema.innodb_metrics where status!=' enabled' ;
256
+ select name from information_schema.innodb_metrics where not enabled;
256
257
name
257
258
set global innodb_monitor_enable = aaa;
258
259
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa'
259
260
set global innodb_monitor_disable = All;
260
- select name from information_schema.innodb_metrics where status!='disabled' ;
261
+ select name from information_schema.innodb_metrics where enabled ;
261
262
name
262
263
set global innodb_monitor_reset_all = all;
263
264
select name from information_schema.innodb_metrics where count!=0;
264
265
name
265
266
set global innodb_monitor_enable = "%lock%";
266
267
select name from information_schema.innodb_metrics
267
- where status != IF (name like "%lock%", 'enabled', 'disabled' );
268
+ where enabled != (name like "%lock%");
268
269
name
269
270
set global innodb_monitor_disable = "%lock%";
270
- select name, status from information_schema.innodb_metrics
271
+ select name, if(enabled,'enabled','disabled') status
272
+ from information_schema.innodb_metrics
271
273
where name like "%lock%";
272
274
name status
273
275
lock_deadlocks disabled
@@ -298,24 +300,25 @@ innodb_rwlock_sx_os_waits disabled
298
300
set global innodb_monitor_enable = "%lock*";
299
301
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
300
302
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
301
- select name from information_schema.innodb_metrics where status!=' enabled' ;
303
+ select name from information_schema.innodb_metrics where not enabled;
302
304
name
303
305
set global innodb_monitor_disable="%%%%%";
304
- select name from information_schema.innodb_metrics where status!='disabled' ;
306
+ select name from information_schema.innodb_metrics where enabled ;
305
307
name
306
308
set global innodb_monitor_enable="%";
307
- select name from information_schema.innodb_metrics where status!=' enabled' ;
309
+ select name from information_schema.innodb_metrics where not enabled;
308
310
name
309
311
set global innodb_monitor_disable="%_%";
310
- select name from information_schema.innodb_metrics where status!='disabled' ;
312
+ select name from information_schema.innodb_metrics where enabled ;
311
313
name
312
314
set global innodb_monitor_enable="log%%%%";
313
315
select name from information_schema.innodb_metrics
314
- where status != IF (name like "log%", 'enabled', 'disabled' );
316
+ where enabled != (name like "log%");
315
317
name
316
318
set global innodb_monitor_enable="os_%a_fs_ncs";
317
319
set global innodb_monitor_enable="os%pending%";
318
- select name, status from information_schema.innodb_metrics
320
+ select name, if(enabled,'enabled','disabled') status
321
+ from information_schema.innodb_metrics
319
322
where name like "os%";
320
323
name status
321
324
os_data_reads disabled
@@ -338,14 +341,16 @@ create table monitor_test(col int) engine = innodb;
338
341
select * from monitor_test;
339
342
col
340
343
select name, max_count, min_count, count,
341
- max_count_reset, min_count_reset, count_reset, status
344
+ max_count_reset, min_count_reset, count_reset,
345
+ if(enabled,'enabled','disabled') status
342
346
from information_schema.innodb_metrics
343
347
where name = "metadata_table_handles_opened";
344
348
name max_count min_count count max_count_reset min_count_reset count_reset status
345
349
metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled
346
350
set global innodb_monitor_reset = metadata_table_handles_opened;
347
351
select name, max_count, min_count, count,
348
- max_count_reset, min_count_reset, count_reset, status
352
+ max_count_reset, min_count_reset, count_reset,
353
+ if(enabled,'enabled','disabled') status
349
354
from information_schema.innodb_metrics
350
355
where name = "metadata_table_handles_opened";
351
356
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -355,22 +360,25 @@ create table monitor_test(col int) engine = innodb;
355
360
select * from monitor_test;
356
361
col
357
362
select name, max_count, min_count, count,
358
- max_count_reset, min_count_reset, count_reset, status
363
+ max_count_reset, min_count_reset, count_reset,
364
+ if(enabled,'enabled','disabled') status
359
365
from information_schema.innodb_metrics
360
366
where name = "metadata_table_handles_opened";
361
367
name max_count min_count count max_count_reset min_count_reset count_reset status
362
368
metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled
363
369
set global innodb_monitor_reset_all = metadata_table_handles_opened;
364
370
select name, max_count, min_count, count,
365
- max_count_reset, min_count_reset, count_reset, status
371
+ max_count_reset, min_count_reset, count_reset,
372
+ if(enabled,'enabled','disabled') status
366
373
from information_schema.innodb_metrics
367
374
where name = "metadata_table_handles_opened";
368
375
name max_count min_count count max_count_reset min_count_reset count_reset status
369
376
metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled
370
377
set global innodb_monitor_disable = metadata_table_handles_opened;
371
378
set global innodb_monitor_reset = metadata_table_handles_opened;
372
379
select name, max_count, min_count, count,
373
- max_count_reset, min_count_reset, count_reset, status
380
+ max_count_reset, min_count_reset, count_reset,
381
+ if(enabled,'enabled','disabled') status
374
382
from information_schema.innodb_metrics
375
383
where name = "metadata_table_handles_opened";
376
384
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -380,14 +388,16 @@ create table monitor_test(col int) engine = innodb;
380
388
select * from monitor_test;
381
389
col
382
390
select name, max_count, min_count, count,
383
- max_count_reset, min_count_reset, count_reset, status
391
+ max_count_reset, min_count_reset, count_reset,
392
+ if(enabled,'enabled','disabled') status
384
393
from information_schema.innodb_metrics
385
394
where name = "metadata_table_handles_opened";
386
395
name max_count min_count count max_count_reset min_count_reset count_reset status
387
396
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
388
397
set global innodb_monitor_reset_all = metadata_table_handles_opened;
389
398
select name, max_count, min_count, count,
390
- max_count_reset, min_count_reset, count_reset, status
399
+ max_count_reset, min_count_reset, count_reset,
400
+ if(enabled,'enabled','disabled') status
391
401
from information_schema.innodb_metrics
392
402
where name = "metadata_table_handles_opened";
393
403
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -398,21 +408,24 @@ create table monitor_test(col int) engine = innodb stats_persistent=0;
398
408
select * from monitor_test;
399
409
col
400
410
select name, max_count, min_count, count,
401
- max_count_reset, min_count_reset, count_reset, status
411
+ max_count_reset, min_count_reset, count_reset,
412
+ if(enabled,'enabled','disabled') status
402
413
from information_schema.innodb_metrics
403
414
where name = "metadata_table_handles_opened";
404
415
name max_count min_count count max_count_reset min_count_reset count_reset status
405
416
metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled
406
417
set global innodb_monitor_enable = metadata_table_handles_closed;
407
418
create index idx on monitor_test(col);
408
419
select name, max_count, min_count, count,
409
- max_count_reset, min_count_reset, count_reset, status
420
+ max_count_reset, min_count_reset, count_reset,
421
+ if(enabled,'enabled','disabled') status
410
422
from information_schema.innodb_metrics
411
423
where name = "metadata_table_handles_closed";
412
424
name max_count min_count count max_count_reset min_count_reset count_reset status
413
425
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
414
426
select name, max_count, min_count, count,
415
- max_count_reset, min_count_reset, count_reset, status
427
+ max_count_reset, min_count_reset, count_reset,
428
+ if(enabled,'enabled','disabled') status
416
429
from information_schema.innodb_metrics
417
430
where name like "metadata%";
418
431
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -422,7 +435,8 @@ metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
422
435
set global innodb_monitor_disable = module_metadata;
423
436
set global innodb_monitor_reset = module_metadata;
424
437
select name, max_count, min_count, count,
425
- max_count_reset, min_count_reset, count_reset, status
438
+ max_count_reset, min_count_reset, count_reset,
439
+ if(enabled,'enabled','disabled') status
426
440
from information_schema.innodb_metrics
427
441
where name like "metadata%";
428
442
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -431,7 +445,8 @@ metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
431
445
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
432
446
set global innodb_monitor_reset_all = module_metadata;
433
447
select name, max_count, min_count, count,
434
- max_count_reset, min_count_reset, count_reset, status
448
+ max_count_reset, min_count_reset, count_reset,
449
+ if(enabled,'enabled','disabled') status
435
450
from information_schema.innodb_metrics
436
451
where name like "metadata%";
437
452
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -446,7 +461,8 @@ begin;
446
461
insert into monitor_test values(9);
447
462
rollback;
448
463
select name, max_count, min_count, count,
449
- max_count_reset, min_count_reset, count_reset, status
464
+ max_count_reset, min_count_reset, count_reset,
465
+ if(enabled,'enabled','disabled') status
450
466
from information_schema.innodb_metrics
451
467
where name like "trx_rollbacks" or name like "trx_active_transactions";
452
468
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -457,7 +473,8 @@ set global innodb_monitor_enable = module_dml;
457
473
insert into monitor_test values(9);
458
474
update monitor_test set col = 10 where col = 9;
459
475
select name, max_count, min_count, count,
460
- max_count_reset, min_count_reset, count_reset, status
476
+ max_count_reset, min_count_reset, count_reset,
477
+ if(enabled,'enabled','disabled') status
461
478
from information_schema.innodb_metrics
462
479
where name like "dml%";
463
480
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -471,7 +488,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
471
488
dml_system_updates 0 NULL 0 0 NULL 0 enabled
472
489
delete from monitor_test;
473
490
select name, max_count, min_count, count,
474
- max_count_reset, min_count_reset, count_reset, status
491
+ max_count_reset, min_count_reset, count_reset,
492
+ if(enabled,'enabled','disabled') status
475
493
from information_schema.innodb_metrics
476
494
where name like "dml%";
477
495
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -485,7 +503,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
485
503
dml_system_updates 0 NULL 0 0 NULL 0 enabled
486
504
set global innodb_monitor_reset = module_dml;
487
505
select name, max_count, min_count, count,
488
- max_count_reset, min_count_reset, count_reset, status
506
+ max_count_reset, min_count_reset, count_reset,
507
+ if(enabled,'enabled','disabled') status
489
508
from information_schema.innodb_metrics
490
509
where name like "dml%";
491
510
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -501,7 +520,8 @@ insert into monitor_test values(9);
501
520
insert into monitor_test values(1);
502
521
delete from monitor_test;
503
522
select name, max_count, min_count, count,
504
- max_count_reset, min_count_reset, count_reset, status
523
+ max_count_reset, min_count_reset, count_reset,
524
+ if(enabled,'enabled','disabled') status
505
525
from information_schema.innodb_metrics
506
526
where name like "dml%";
507
527
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -515,7 +535,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
515
535
dml_system_updates 0 NULL 0 0 NULL 0 enabled
516
536
set global innodb_monitor_reset_all = module_dml;
517
537
select name, max_count, min_count, count,
518
- max_count_reset, min_count_reset, count_reset, status
538
+ max_count_reset, min_count_reset, count_reset,
539
+ if(enabled,'enabled','disabled') status
519
540
from information_schema.innodb_metrics
520
541
where name like "dml%";
521
542
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -529,7 +550,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
529
550
dml_system_updates 0 NULL 0 0 NULL 0 enabled
530
551
set global innodb_monitor_disable = module_dml;
531
552
select name, max_count, min_count, count,
532
- max_count_reset, min_count_reset, count_reset, status
553
+ max_count_reset, min_count_reset, count_reset,
554
+ if(enabled,'enabled','disabled') status
533
555
from information_schema.innodb_metrics
534
556
where name like "dml%";
535
557
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -543,7 +565,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 disabled
543
565
dml_system_updates 0 NULL 0 0 NULL 0 disabled
544
566
set global innodb_monitor_reset_all = module_dml;
545
567
select name, max_count, min_count, count,
546
- max_count_reset, min_count_reset, count_reset, status
568
+ max_count_reset, min_count_reset, count_reset,
569
+ if(enabled,'enabled','disabled') status
547
570
from information_schema.innodb_metrics
548
571
where name like "dml%";
549
572
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -560,7 +583,8 @@ insert into monitor_test values(9);
560
583
insert into monitor_test values(1);
561
584
delete from monitor_test;
562
585
select name, max_count, min_count, count,
563
- max_count_reset, min_count_reset, count_reset, status
586
+ max_count_reset, min_count_reset, count_reset,
587
+ if(enabled,'enabled','disabled') status
564
588
from information_schema.innodb_metrics
565
589
where name like "dml%";
566
590
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -576,7 +600,8 @@ set global innodb_monitor_disable = module_dml;
576
600
drop table monitor_test;
577
601
set global innodb_monitor_enable = file_num_open_files;
578
602
select name, max_count, min_count, count,
579
- max_count_reset, min_count_reset, count_reset, status
603
+ max_count_reset, min_count_reset, count_reset,
604
+ if(enabled,'enabled','disabled') status
580
605
from information_schema.innodb_metrics
581
606
where name like "file_num_open_files";
582
607
name max_count min_count count max_count_reset min_count_reset count_reset status
0 commit comments