1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-9077 - port sys schema to MariaDB

- Innodb is not always available, which means t is not always
possible to use innodb system variables, or innodb information schema
tables.

Thus creation of objects that use Innodb information_schema is enclosed
into BEGIN NOT ATOMIC blocks with dummy SQLEXCEPTION handler.

- sys_config table uses Aria, just like other system tables.

- several tables that exist in MySQL, do not exist in MariaDB
   performance_schema.replication_applier_status, mysql.slave_master_info,
   mysql.slave_relay_log_info
This commit is contained in:
Vladislav Vaintroub
2021-03-17 23:22:01 +01:00
parent 4bac804c90
commit 601c577142
18 changed files with 134 additions and 94 deletions

View File

@ -83,9 +83,13 @@ CREATE DEFINER='root'@'localhost' FUNCTION sys_get_config (
READS SQL DATA
BEGIN
DECLARE v_value VARCHAR(128) DEFAULT NULL;
DECLARE old_val INTEGER DEFAULT NULL;
SET old_val = @@session.sql_notes;
SET SESSION sql_notes=0;
-- Check if we have the variable in the sys.sys_config table
SET v_value = (SELECT value FROM sys.sys_config WHERE variable = in_variable_name);
SET SESSION sql_notes=old_val;
-- Protection against the variable not existing in sys_config
IF (v_value IS NULL) THEN