mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 13:10:12 +03:00
The following INFORMATION_SCHEMA views were unnecessarily retrieving the data from the SYS_TABLESPACES table instead of directly fetching it from the fil_system cache: information_schema.innodb_tablespaces_encryption information_schema.innodb_tablespaces_scrubbing InnoDB always loads all tablespace metadata into memory at startup and never evicts it while the tablespace exists. With this fix, accessing these views will be much faster and use less memory, and include data about all tablespaces, including undo tablespaces. The view information_schema.innodb_sys_tablespaces will still reflect the contents of the SYS_TABLESPACES table.
47 lines
2.4 KiB
Plaintext
47 lines
2.4 KiB
Plaintext
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
|
|
ENCRYPTED=YES;
|
|
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
|
|
ALTER TABLE t1 ENCRYPTED=YES;
|
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
|
|
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
|
|
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
|
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), FORCE, ALGORITHM=INPLACE;
|
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
|
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
|
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
|
CREATE SPATIAL INDEX b on t1(coordinate);
|
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB;
|
|
CREATE SPATIAL INDEX b on t1(coordinate);
|
|
INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)'));
|
|
ALTER TABLE t1 DROP INDEX b;
|
|
INSERT INTO t1 values(2, 'secret', ST_GeomFromText('POINT(903994614 180726515)'));
|
|
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate);
|
|
INSERT INTO t1 values(3, 'secret', ST_GeomFromText('POINT(903994614 180726515)'));
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
|
|
CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
|
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB PAGE_COMPRESSED=YES;
|
|
INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)'));
|
|
INSERT INTO t2 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)'));
|
|
# Success!
|
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION > 0;
|
|
NAME
|
|
innodb_system
|
|
mysql/innodb_index_stats
|
|
mysql/innodb_table_stats
|
|
test/t1
|
|
test/t2
|
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
|
NAME
|
|
DROP TABLE t1, t2;
|