mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28344:sys.ps_setup_save and dependent procedures fail with ER_ILLEGAL_HA_CREATE_OPTION
- The problem: ============== - Commitf7216fa63d
created the check function for default temporary storage engine and in case the SE doesn't support temporary tables the error `ER_ILLEGAL_HA_CREATE_OPTION` is raised. Before that commit in such cases temporary tables were created by silently substituting default SE (RocksDB, Connect, PerfSchema) with MyISAM. - The test `pr_diagnostics.test` was modified in that commit with raising the error, since I didn't check the root cause of test itself. - The solution: =============== - This commit update the root case: procedure `ps_setup_save()` that uses temporary tables created from performance schema tables definition using `LIKE`, what is not supported. The suggested fix is to use InnoDB table by using `AS SELECT`. - Note that test `pr_diagnostics` will raise this error for `medium/full` third argument, but not for `current` value of third argument. - Additionally this patch updates the test case of commitf7216fa
, by adding missing relation between temporary tables and Performance schema in `perfschema.misc` test. - Reviewed by: <wlad@mariadb.com>
This commit is contained in:
@ -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'
|
||||
|
Reference in New Issue
Block a user