diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-17 23:22:01 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-18 08:02:48 +0100 |
commit | 601c577142639d7bde947d071ca944c16920340c (patch) | |
tree | 435bd2ea761ebd9641a551d2cb5b97d1b616e1c7 /scripts/sys_schema/functions/sys_get_config.sql | |
parent | 4bac804c90c6f8d101ef32aef39813c3d13283ff (diff) | |
download | mariadb-git-601c577142639d7bde947d071ca944c16920340c.tar.gz |
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
Diffstat (limited to 'scripts/sys_schema/functions/sys_get_config.sql')
-rw-r--r-- | scripts/sys_schema/functions/sys_get_config.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/sys_schema/functions/sys_get_config.sql b/scripts/sys_schema/functions/sys_get_config.sql index cca2bc63700..1064a8f4ee8 100644 --- a/scripts/sys_schema/functions/sys_get_config.sql +++ b/scripts/sys_schema/functions/sys_get_config.sql @@ -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 |