mariadb/mysql-test/suite/perfschema/r/thread_cache.result
Monty 775cba4d0f MDEV-33145 Add FLUSH GLOBAL STATUS
- FLUSH GLOBAL STATUS now resets most global_status_vars.
  At this stage, this is mainly to be used for testing.
- FLUSH SESSION STATUS added as an alias for FLUSH STATUS.
- FLUSH STATUS does not require any privilege (before required RELOAD).
- FLUSH GLOBAL STATUS requires RELOAD privilege.
- All global status reset moved to FLUSH GLOBAL STATUS.
- Replication semisync status variables are now reset by
  FLUSH GLOBAL STATUS.
- In test cases, the only changes are:
  - Replace FLUSH STATUS with FLUSH GLOBAL STATUS
  - Replace FLUSH STATUS with FLUSH STATUS; FLUSH GLOBAL STATUS.
    This was only done in a few tests where the test was using SHOW STATUS
    for both local and global variables.
- Uptime_since_flush_status is now always provided, independent if
  ENABLED_PROFILING is enabled when compiling MariaDB.
- @@global.Uptime_since_flush_status is reset on FLUSH GLOBAL STATUS
  and @@session.Uptime_since_flush_status is reset on FLUSH SESSION STATUS.
- When connected, @@session.Uptime_since_flush_status is set to 0.
2024-05-27 12:39:03 +02:00

57 lines
1.3 KiB
Text

flush global status;
SET @saved_thread_cache_size = @@global.thread_cache_size;
set global thread_cache_size = 0;
show global variables like "thread_cache_size";
Variable_name Value
thread_cache_size 0
connect con1, localhost, root, , ;
connect con2, localhost, root, , ;
connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
disconnect con2;
connection default;
connect con3, localhost, root, , ;
disconnect con3;
disconnect con1;
connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
set global thread_cache_size = 100;
show global variables like "thread_cache_size";
Variable_name Value
thread_cache_size 100
connect con1, localhost, root, , ;
connect con2, localhost, root, , ;
connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
disconnect con2;
connection default;
connect con3, localhost, root, , ;
disconnect con3;
disconnect con1;
connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
set global thread_cache_size = @saved_thread_cache_size;
show global status like "performance_schema_thread%";
Variable_name Value
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0