diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result index 83ca6d5cf3f..b1fa4f6c765 100644 --- a/mysql-test/suite/perfschema/r/misc.result +++ b/mysql-test/suite/perfschema/r/misc.result @@ -174,3 +174,16 @@ select object_type, object_schema, object_name from performance_schema.objects_summary_global_by_type where object_schema="test"; object_type object_schema object_name +# +# MDEV-28344: sys.ps_setup_save and dependent procedures fail +# with ER_ILLEGAL_HA_CREATE_OPTION +# +CREATE TEMPORARY TABLE t1 (t int) ENGINE = PERFORMANCE_SCHEMA; +ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY' +CREATE TEMPORARY TABLE t1 LIKE performance_schema.setup_actors; +ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY' +SET @default_storage_engine_old = @@default_storage_engine; +SET default_storage_engine = performance_schema; +CREATE TEMPORARY TABLE t1 (t int); +ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY' +SET @@default_storage_engine = @default_storage_engine_old; diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test index 848be3beea1..79c23c65616 100644 --- a/mysql-test/suite/perfschema/t/misc.test +++ b/mysql-test/suite/perfschema/t/misc.test @@ -298,3 +298,23 @@ drop tables t1; select object_type, object_schema, object_name from performance_schema.objects_summary_global_by_type where object_schema="test"; + +--echo # +--echo # MDEV-28344: sys.ps_setup_save and dependent procedures fail +--echo # with ER_ILLEGAL_HA_CREATE_OPTION +--echo # + +# It is not allowed to create temporary tables with performance schema +--error ER_ILLEGAL_HA_CREATE_OPTION +CREATE TEMPORARY TABLE t1 (t int) ENGINE = PERFORMANCE_SCHEMA; + +--error ER_ILLEGAL_HA_CREATE_OPTION +CREATE TEMPORARY TABLE t1 LIKE performance_schema.setup_actors; + +SET @default_storage_engine_old = @@default_storage_engine; +SET default_storage_engine = performance_schema; + +--error ER_ILLEGAL_HA_CREATE_OPTION +CREATE TEMPORARY TABLE t1 (t int); + +SET @@default_storage_engine = @default_storage_engine_old; \ No newline at end of file diff --git a/mysql-test/suite/sysschema/r/pr_diagnostics.result b/mysql-test/suite/sysschema/r/pr_diagnostics.result index 90021f636d8..d07295bdbe9 100644 --- a/mysql-test/suite/sysschema/r/pr_diagnostics.result +++ b/mysql-test/suite/sysschema/r/pr_diagnostics.result @@ -6,6 +6,8 @@ SET @sys.debug = 'OFF', @sys.diagnostics.allow_i_s_tables = 'OFF', @sys.diagnostics.include_raw = 'OFF'; CALL sys.diagnostics(0, 0, 'full'); +summary +Disabled 1 thread ERROR 45000: in_max_runtime must be greater than 0 CALL sys.diagnostics(2, 0, 'full'); ERROR 45000: in_interval must be greater than 0 diff --git a/mysql-test/suite/sysschema/t/pr_diagnostics.test b/mysql-test/suite/sysschema/t/pr_diagnostics.test index 01825a1274e..40ea90005a9 100644 --- a/mysql-test/suite/sysschema/t/pr_diagnostics.test +++ b/mysql-test/suite/sysschema/t/pr_diagnostics.test @@ -19,7 +19,6 @@ SET @sys.debug = 'ON', @sys.diagnostics.allow_i_s_tables = 'ON', @sys.diagnostics.include_raw = 'ON'; ---error ER_ILLEGAL_HA_CREATE_OPTION CALL sys.diagnostics(4, 2, 'full'); SET @sys.debug = 'OFF', diff --git a/scripts/sys_schema/procedures/ps_setup_save.sql b/scripts/sys_schema/procedures/ps_setup_save.sql index a5a2197e935..b7843ecd1f2 100644 --- a/scripts/sys_schema/procedures/ps_setup_save.sql +++ b/scripts/sys_schema/procedures/ps_setup_save.sql @@ -80,14 +80,11 @@ BEGIN DROP TEMPORARY TABLE IF EXISTS tmp_setup_instruments; DROP TEMPORARY TABLE IF EXISTS tmp_threads; - CREATE TEMPORARY TABLE tmp_setup_actors LIKE performance_schema.setup_actors; - CREATE TEMPORARY TABLE tmp_setup_consumers LIKE performance_schema.setup_consumers; - CREATE TEMPORARY TABLE tmp_setup_instruments LIKE performance_schema.setup_instruments; + CREATE TEMPORARY TABLE tmp_setup_actors AS SELECT * FROM performance_schema.setup_actors; + CREATE TEMPORARY TABLE tmp_setup_consumers AS SELECT * FROM performance_schema.setup_consumers; + CREATE TEMPORARY TABLE tmp_setup_instruments AS SELECT * FROM performance_schema.setup_instruments; CREATE TEMPORARY TABLE tmp_threads (THREAD_ID bigint unsigned NOT NULL PRIMARY KEY, INSTRUMENTED enum('YES','NO') NOT NULL); - INSERT INTO tmp_setup_actors SELECT * FROM performance_schema.setup_actors; - INSERT INTO tmp_setup_consumers SELECT * FROM performance_schema.setup_consumers; - INSERT INTO tmp_setup_instruments SELECT * FROM performance_schema.setup_instruments; INSERT INTO tmp_threads SELECT THREAD_ID, INSTRUMENTED FROM performance_schema.threads; ELSE SIGNAL SQLSTATE VALUE '90000'