mariadb/mysql-test/suite/perfschema/r/misc_session_status.result
Sergei Golubchik c6c2a2b8d4 MDEV-33150 double-locking of LOCK_thd_kill in performance_schema.session_status
perfschema thread walker needs to take thread's LOCK_thd_kill to prevent
the thread from disappearing why it's being looked at.
But there's no need to lock it for the current thread.

In fact, it was harmful as some code down the stack might take
LOCK_thd_kill (e.g. set_killed() does it, and my_malloc_size_cb_func()
calls set_killed()). And it caused a bunch of mutexes being locked under
LOCK_thd_kill, which created problems later when my_malloc_size_cb_func()
called set_killed() at some unspecified point under some
random mutexes.
2024-01-09 16:05:08 +01:00

20 lines
977 B
Text

#
# MDEV-33150 double-locking of LOCK_thd_kill in performance_schema.session_status
#
set @old_innodb_io_capacity=@@global.innodb_io_capacity;
set @old_innodb_io_capacity_max=@@global.innodb_io_capacity_max;
select * from performance_schema.session_status limit 0;
VARIABLE_NAME VARIABLE_VALUE
set max_session_mem_used=32768;
select * from performance_schema.session_status;
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=32768 option so it cannot execute this statement
set global innodb_io_capacity_max=100;
Warnings:
Warning 1210 Setting innodb_io_capacity_max 100 lower than innodb_io_capacity 200.
Warning 1210 Setting innodb_io_capacity to 100
set max_session_mem_used=default;
set global innodb_io_capacity=@old_innodb_io_capacity;
Warnings:
Warning 1210 Setting innodb_io_capacity to 200 higher than innodb_io_capacity_max 100
Warning 1210 Setting innodb_max_io_capacity to 400
set global innodb_io_capacity_max=@old_innodb_io_capacity_max;