1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#26174 Server Crash:INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event

- Some variables in I_S.GLOBAL_STATUS were depending on a network
  connection in order to evaluate. Since no network connection is 
  present during the execution of an event, this caused the server
  to crash.
- The variable function hooks does now verify that the vio-
  object is valid before attempting to use it.
This commit is contained in:
Kristofer.Pettersson@naruto.
2007-04-02 09:51:14 +02:00
parent 09d89e9cdd
commit f85f0950a0
4 changed files with 103 additions and 19 deletions

View File

@ -1408,4 +1408,32 @@ select user,db from information_schema.processlist;
user db
user3148 test
drop user user3148@localhost;
DROP TABLE IF EXISTS thread_status;
CREATE TABLE thread_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
CREATE TABLE server_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
DROP EVENT IF EXISTS log_status;
CREATE EVENT log_status
ON SCHEDULE EVERY 1 SECOND
DO
BEGIN
INSERT INTO thread_status SELECT variable_name, variable_value FROM
information_schema.session_status;
INSERT INTO server_status SELECT variable_name, variable_value FROM
information_schema.global_status;
END$$
SET GLOBAL event_scheduler=1;
SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2;
variable_name variable_value
SSL_ACCEPTS 0.0000000
SSL_CALLBACK_CACHE_HITS 0.0000000
SELECT variable_name FROM server_status LIMIT 1,2;
variable_name
ABORTED_CONNECTS
BINLOG_CACHE_DISK_USE
DROP EVENT log_status;
DROP TABLE thread_status;
DROP TABLE server_status;
SET GLOBAL event_scheduler=0;
End of 5.1 tests.

View File

@ -1042,5 +1042,45 @@ select user,db from information_schema.processlist;
connection default;
drop user user3148@localhost;
#
# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event
#
--disable_warnings
DROP TABLE IF EXISTS thread_status;
CREATE TABLE thread_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
CREATE TABLE server_status (variable_name VARCHAR(64),
variable_value DECIMAL(22,7));
DROP EVENT IF EXISTS log_status;
--enable_warnings
DELIMITER $$;
CREATE EVENT log_status
ON SCHEDULE EVERY 1 SECOND
DO
BEGIN
INSERT INTO thread_status SELECT variable_name, variable_value FROM
information_schema.session_status;
INSERT INTO server_status SELECT variable_name, variable_value FROM
information_schema.global_status;
END$$
DELIMITER ;$$
SET GLOBAL event_scheduler=1;
sleep 1;
SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2;
SELECT variable_name FROM server_status LIMIT 1,2;
DROP EVENT log_status;
DROP TABLE thread_status;
DROP TABLE server_status;
SET GLOBAL event_scheduler=0;
--echo End of 5.1 tests.