diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-11 11:02:27 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-11 11:15:11 +0200 |
commit | 5407117a59a87a1e0042581bc9c258cd2e743c85 (patch) | |
tree | ac30d7e0ba8501683cff593ae523035a3a8b3b4a /storage/rocksdb | |
parent | 9bc874a594edbc0e124131d0ff30b44f5fade52d (diff) | |
download | mariadb-git-5407117a59a87a1e0042581bc9c258cd2e743c85.tar.gz |
MDEV-22343 Remove SYS_TABLESPACES and SYS_DATAFILESbb-10.6-MDEV-23497
The InnoDB internal tables SYS_TABLESPACES and SYS_DATAFILES as well as the
INFORMATION_SCHEMA views INNODB_SYS_TABLESPACES and INNODB_SYS_DATAFILES
were introduced in MySQL 5.6 for no good reason in
mysql/mysql-server/commit/e9255a22ef16d612a8076bc0b34002bc5a784627
when the InnoDB support for the DATA DIRECTORY attribute was introduced.
The file system should be the authoritative source of information on files.
Storing information about file system paths in the file system (symlinks,
or even the .isl files that were unfortunately chosen as the solution) is
sufficient. If information is additionally stored in some hidden tables
inside the InnoDB system tablespace, everything unnecessarily becomes
more complicated, because more copies of data mean more opportunity
for the copies to be out of sync, and because modifying the data in
the system tablespace in the desired way might not be possible at all
without modifying the InnoDB source code. So, the copy in the system
tablespace basically is a redundant, non-authoritative source of
information.
We will stop creating or accessing the system tables SYS_TABLESPACES
and SYS_DATAFILES.
We will also remove the view
INFORMATION_SCHEMA.INNODB_SYS_DATAFILES along with SYS_DATAFILES.
The view
INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES will be repurposed
to directly reflect fil_system.space_list. The column
PAGE_SIZE, which would always contain the value of
the GLOBAL read-only variable innodb_page_size, is
removed. The column ZIP_PAGE_SIZE, which would actually
contain the physical page size of a page, is renamed to
PAGE_SIZE. Finally, a new column FILENAME is added, as a
replacement of SYS_DATAFILES.PATH.
This will also
address MDEV-21801 (files that were created before upgrading
to MySQL 5.6 or MariaDB 10.0 or later were never registered
in SYS_TABLESPACES or SYS_DATAFILES) and
MDEV-21801 (information about the system tablespace is not stored
in SYS_TABLESPACES or SYS_DATAFILES).
Diffstat (limited to 'storage/rocksdb')
3 files changed, 1 insertions, 10 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result index ac6e2bcc633..37a53036b62 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result @@ -321,6 +321,4 @@ ID FOR_NAME REF_NAME N_COLS TYPE SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; ID FOR_COL_NAME REF_COL_NAME POS SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES; -SPACE NAME FLAG ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE -SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES; -SPACE PATH +SPACE NAME FLAG ROW_FORMAT PAGE_SIZE FILENAME FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE diff --git a/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt b/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt index b3565b5fa82..5e9d95e0bf0 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt +++ b/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt @@ -1,5 +1,4 @@ --loose-enable-innodb_trx ---loose-enable-innodb_file_status --loose-enable-innodb_locks --loose-enable-innodb_lock_waits --loose-enable-innodb_cmp @@ -26,5 +25,3 @@ --loose-enable-innodb_sys_foreign --loose-enable-innodb_sys_foreign_cols --loose-enable-innodb_sys_tablespaces ---loose-enable-innodb_sys_datafiles ---loose-enable-innodb_sys_docstore_fields diff --git a/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test b/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test index 4ff48e13089..524b37a7127 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test @@ -9,8 +9,6 @@ --disable_warnings SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX; -#Not in MariaDB: SELECT * FROM INFORMATION_SCHEMA.INNODB_FILE_STATUS; - SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS; SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP; @@ -37,7 +35,5 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES; -SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES; -#Not in MariaDB: SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_DOCSTORE_FIELDS; --enable_warnings |