Commit e581396b authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-29983 Deprecate innodb_file_per_table

Before commit 6112853c in MySQL 4.1.1
introduced the parameter innodb_file_per_table, all InnoDB data was
written to the InnoDB system tablespace (often named ibdata1).
A serious design problem is that once the system tablespace has grown to
some size, it cannot shrink even if the data inside it has been deleted.

There are also other design problems, such as the server hang MDEV-29930
that should only be possible when using innodb_file_per_table=0 and
innodb_undo_tablespaces=0 (storing both tables and undo logs in the
InnoDB system tablespace).

The parameter innodb_change_buffering was deprecated
in commit b5852ffb.
Starting with commit baf276e6
(MDEV-19229) the number of innodb_undo_tablespaces can be increased,
so that the undo logs can be moved out of the system tablespace
of an existing installation.

If all these things (tables, undo logs, and the change buffer) are
removed from the InnoDB system tablespace, the only variable-size
data structure inside it is the InnoDB data dictionary.

DDL operations on .ibd files was optimized in
commit 86dc7b4d (MDEV-24626).
That should have removed any thinkable performance advantage of
using innodb_file_per_table=0.

Since there should be no benefit of setting innodb_file_per_table=0,
the parameter should be deprecated. Starting with MySQL 5.6 and
MariaDB Server 10.0, the default value is innodb_file_per_table=1.
parent ae79cedf
--loose-innodb-lock-wait-timeout=2
--loose-innodb-file-per-table
......@@ -141,7 +141,6 @@ CREATE TABLE t1 (a BLOB COMPRESSED)
CREATE TABLE t1 (a VARCHAR(200) COMPRESSED) PARTITION BY KEY(a) partitions 30;
ALTER TABLE t1 COALESCE PARTITION 20;
#ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`); --mdev MDEV-13584
ALTER TABLE t1 ADD PARTITION (PARTITION pm);
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
......
--loose-skip-stack-trace --skip-core-file
--default-storage-engine=MyISAM
--loose-skip-innodb-file-per-table
......@@ -8,9 +8,6 @@ DROP TABLE t1;
# WL#6168: FLUSH TABLES ... FOR EXPORT -- parser
#
# Requires innodb_file_per_table
SET @old_innodb_file_per_table= @@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table= 1;
# new "EXPORT" keyword is a valid user variable name:
SET @export = 10;
# new "EXPORT" keyword is a valid SP parameter name:
......@@ -300,6 +297,4 @@ DROP TABLE t1;
connection con1;
disconnect con1;
connection default;
# Reset innodb_file_per_table
SET GLOBAL innodb_file_per_table= @old_innodb_file_per_table;
# End of 5.6 tests
......@@ -18,10 +18,6 @@ DROP TABLE t1;
--echo #
--echo
--echo # Requires innodb_file_per_table
SET @old_innodb_file_per_table= @@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table= 1;
--echo # new "EXPORT" keyword is a valid user variable name:
SET @export = 10;
......@@ -432,7 +428,4 @@ DROP TABLE t1;
--source include/wait_until_disconnected.inc
--connection default
--echo # Reset innodb_file_per_table
SET GLOBAL innodb_file_per_table= @old_innodb_file_per_table;
--echo # End of 5.6 tests
......@@ -1231,7 +1231,7 @@ DROP TABLE t, t2, tp;
# failed during EXCHANGE PARTITION with different TABLESPACE.
#
CREATE TABLE t1 (a VARCHAR(200)) PARTITION BY KEY(a) partitions 10;
ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`);
ALTER TABLE t1 ADD PARTITION (PARTITION pm);
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2;
......
......@@ -525,7 +525,7 @@ DROP TABLE t, t2, tp;
--echo # failed during EXCHANGE PARTITION with different TABLESPACE.
--echo #
CREATE TABLE t1 (a VARCHAR(200)) PARTITION BY KEY(a) partitions 10;
ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`);
ALTER TABLE t1 ADD PARTITION (PARTITION pm);
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
# The following works as table spaces are not checked anymore
......
......@@ -42,6 +42,8 @@ SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
SET @@global.innodb_file_per_table = ON,
@@global.innodb_strict_mode = ON;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
connect con1,localhost,root,,;
CREATE TABLE t1 (id INT NOT NULL
PRIMARY KEY,
......@@ -62,6 +64,8 @@ t1 CREATE TABLE `t1` (
PARTITION BY HASH (`id`)
PARTITIONS 1
SET GLOBAL innodb_file_per_table = OFF;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
disconnect con1;
connect con2,localhost,root,,;
LOCK TABLE t1 WRITE;
......@@ -104,6 +108,8 @@ disconnect con2;
connection default;
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
SET @save_detect= @@GLOBAL.innodb_deadlock_detect;
SET @save_report= @@GLOBAL.innodb_deadlock_report;
SET GLOBAL innodb_deadlock_detect=ON;
......
--default-storage-engine=MyISAM
--loose-innodb-file-per-table=0
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM
--skip-core-file --skip-slave-start
SET GLOBAL innodb_file_per_table = ON;
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
show warnings;
......
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
# Create and populate a tables
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
......
......@@ -9,7 +9,6 @@ call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found"
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# Start server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
......
......@@ -8,7 +8,6 @@ call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
......
......@@ -5,7 +5,6 @@ call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
call mtr.add_suppression("Table .*t1.* is corrupted");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
......
SET @saved_file_per_table = @@global.innodb_file_per_table;
SET @saved_encrypt_tables = @@global.innodb_encrypt_tables;
SET @saved_encryption_threads = @@global.innodb_encryption_threads;
SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_default_encryption_key_id=4;
......@@ -92,7 +90,6 @@ test.t check status OK
test.tpe check status OK
test.tp check status OK
DROP TABLE tce, tc, te, t, tpe, tp;
SET GLOBAL innodb_file_per_table = @saved_file_per_table;
SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables;
SET GLOBAL innodb_encryption_threads = @saved_encryption_threads;
SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id;
......@@ -4,7 +4,6 @@ call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[pag
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
# Restart mysqld --file-key-management-filename=keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
set GLOBAL innodb_default_encryption_key_id=4;
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
......
......@@ -2,7 +2,6 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
# Create and populate tables to be corrupted
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes;
......
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create database enctests;
use enctests;
......
......@@ -14,7 +14,6 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
# Wait max 10 min for key encryption threads to encrypt all spaces
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
create table t3(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=4;
......
......@@ -11,7 +11,6 @@ call mtr.add_suppression("InnoDB: Missing FILE_CHECKPOINT");
call mtr.add_suppression("InnoDB: Log scan aborted at LSN");
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
create table t3(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=20;
......
set global innodb_file_per_table=OFF;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
call mtr.add_suppression("(mysqld|mariadbd).*: file-key-management-filename is not set");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error.");
call mtr.add_suppression("Plugin 'file_key_management' registration as a ENCRYPTION failed.");
......
......@@ -41,7 +41,6 @@ NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd
# restart
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 ADD COLUMN b int default 2;
ALTER TABLE t7 ADD COLUMN b int default 2;
......
......@@ -12,8 +12,6 @@
--let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd
--let SEARCH_RANGE = 10000000
SET GLOBAL innodb_file_per_table = ON;
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
show warnings;
......
......@@ -26,7 +26,6 @@ call mtr.add_suppression("InnoDB: Crash recovery is broken due to insufficient i
--enable_query_log
let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
......
......@@ -23,8 +23,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
......
......@@ -23,8 +23,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="
--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
......
......@@ -19,8 +19,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="
--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
......
......@@ -2,12 +2,10 @@
-- source include/innodb_page_size.inc
-- source include/have_file_key_management_plugin.inc
SET @saved_file_per_table = @@global.innodb_file_per_table;
SET @saved_encrypt_tables = @@global.innodb_encrypt_tables;
SET @saved_encryption_threads = @@global.innodb_encryption_threads;
SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
......@@ -77,7 +75,6 @@ update tp set b=substr(b,1);
CHECK TABLE tce, tc, te, t, tpe, tp;
DROP TABLE tce, tc, te, t, tpe, tp;
SET GLOBAL innodb_file_per_table = @saved_file_per_table;
SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables;
SET GLOBAL innodb_encryption_threads = @saved_encryption_threads;
SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id;
......@@ -13,8 +13,6 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
set GLOBAL innodb_default_encryption_key_id=4;
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
......
......@@ -12,7 +12,6 @@ call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page nu
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
--echo # Create and populate tables to be corrupted
......
......@@ -4,7 +4,6 @@
-- source include/not_embedded.inc
let $encryption = `SELECT @@innodb_encrypt_tables`;
SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
......
......@@ -31,8 +31,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
--source include/wait_condition.inc
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
create table t3(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=4;
......
......@@ -19,8 +19,6 @@ call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corrupti
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
create table t3(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=20;
......
......@@ -75,8 +75,6 @@ set autocommit=1;
-- source include/start_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 ADD COLUMN b int default 2;
ALTER TABLE t7 ADD COLUMN b int default 2;
......
......@@ -3,7 +3,6 @@
[mysqld.1]
# server-id=101
#wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
#wsrep_sst_method=rsync
wsrep_sst_method=mariabackup
......@@ -20,7 +19,6 @@ log_bin=binlog
[mysqld.2]
# server-id=102
#wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
#wsrep_sst_method=rsync
wsrep_sst_method=mariabackup
......
......@@ -3,7 +3,6 @@
[mysqld.1]
# server-id=101
#wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
wsrep_sst_method=rsync
#wsrep_sst_method=mariabackup
......@@ -20,7 +19,6 @@ log_bin=binlog
[mysqld.2]
# server-id=102
#wsrep-debug=1
innodb_file_per_table
innodb_autoinc_lock_mode=2
wsrep_sst_method=rsync
#wsrep_sst_method=mariabackup
......
......@@ -2,7 +2,6 @@
[mysqld.1]
secure-file-priv = ""
innodb_file_per_table = ON
innodb_stats_persistent=ON
innodb_stats_auto_recalc=ON
innodb_stats_persistent_sample_pages=20
......@@ -11,7 +10,6 @@ skip-innodb-read-only-compressed
[mysqld.2]
secure-file-priv = ""
innodb_file_per_table = ON
innodb_stats_persistent=ON
innodb_stats_auto_recalc=ON
innodb_stats_persistent_sample_pages=20
......
......@@ -7,7 +7,6 @@ loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
loose-file-key-management-encryption-algorithm=aes_cbc
wsrep-debug=1
innodb_encryption_threads = 4
innodb_file_per_table=1
wsrep_sst_method=rsync
[mysqld.1]
......
......@@ -4,7 +4,6 @@
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=1
innodb-file-per-table=ON
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
......
......@@ -35,8 +35,6 @@ if ($row_format != 'COMPRESSED')
if ($row_format == 'COMPRESSED')
{
SET GLOBAL innodb_file_per_table=1;
eval CREATE TABLE t1(
class INT,
id INT,
......@@ -176,10 +174,4 @@ SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
DROP TABLE t1;
# Restore global variables
if ($row_format == 'COMPRESSED')
{
SET GLOBAL innodb_file_per_table=default;
}
DROP PROCEDURE populate_t1;
......@@ -38,8 +38,6 @@ if ($row_format != 'COMPRESSED')
if ($row_format == 'COMPRESSED')
{
SET GLOBAL innodb_file_per_table=1;
eval CREATE TABLE t1(
class INT,
id INT,
......@@ -69,8 +67,6 @@ if ($row_format != 'COMPRESSED') {
}
if ($row_format == 'COMPRESSED') {
SET GLOBAL innodb_file_per_table=1;
eval CREATE TABLE t1(
a INT PRIMARY KEY,
b TEXT,
......@@ -124,8 +120,6 @@ if ($row_format != 'COMPRESSED')
if ($row_format == 'COMPRESSED')
{
SET GLOBAL innodb_file_per_table=1;
eval CREATE TABLE t1(
class INT,
id INT,
......@@ -174,8 +168,6 @@ if ($row_format != 'COMPRESSED') {
}
if ($row_format == 'COMPRESSED') {
SET GLOBAL innodb_file_per_table=1;
eval CREATE TABLE t1(
a INT PRIMARY KEY,
b TEXT,
......
#
# Test to cause merge of the pages (by deleting)
# test/tab1 should be created already with innodb_file_per_table=ON
# test/tab1 should be created already
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
......
#
# Test to cause merge of the pages (at secondary index by deleting)
# test/tab1 should be created already with innodb_file_per_table=ON
# test/tab1 should be created already
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;"
# "create index index1 on tab1(b(750));"
......
#
# Test to cause merge of the pages (by updating to smaller)
# test/tab1 should be created already with innodb_file_per_table=ON
# test/tab1 should be created already
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
......
#
# Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP
#
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB;
connect con1,localhost,root;
......@@ -30,7 +29,6 @@ DROP TABLE bug16720368, bug16720368_1;
# Bug#16735660 ASSERT TABLE2 == NULL, ROLLBACK OF RESURRECTED TXNS,
# DICT_TABLE_ADD_TO_CACHE
#
SET GLOBAL innodb_file_per_table=1;
CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES(42);
......
......@@ -2,7 +2,6 @@
# Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
# OR DISCARDED TABLESPACES
#
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a SERIAL)ENGINE=InnoDB;
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
......
......@@ -36,6 +36,8 @@ ERROR HY000: Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME' (errno: 184 "
# Create another t1, but in the system tablespace.
#
SET GLOBAL innodb_file_per_table=OFF;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t1 (a SERIAL, b CHAR(20)) ENGINE=InnoDB;
INSERT INTO t1(b) VALUES('one'), ('two'), ('three');
SHOW CREATE TABLE t1;
......@@ -58,6 +60,8 @@ ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=COPY;
# while a blocking t1.ibd file exists.
#
SET GLOBAL innodb_file_per_table=ON;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ERROR HY000: Tablespace for table 'test/#sql-ib' exists. Please DISCARD the tablespace before IMPORT
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
......@@ -93,3 +97,5 @@ a b
2 two
3 three
DROP TABLE t1;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
......@@ -3,6 +3,8 @@
#
SET @save_fpt=@@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=0;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE DATABASE Db;
CREATE TABLE Db.t1 (c1 INT KEY) ENGINE=InnoDB;
CREATE DATABASE DB;
......@@ -14,3 +16,5 @@ DROP DATABASE Db;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'D%';
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
SET GLOBAL innodb_file_per_table=@save_fpt;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
......@@ -2,7 +2,6 @@
# Bug#15923864 (Bug#67718):
# INNODB DRASTICALLY UNDER-FILLS PAGES IN CERTAIN CONDITIONS
#
SET GLOBAL innodb_file_per_table=ON;
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b VARCHAR(4096)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, REPEAT('a', 4096));
INSERT INTO t1 VALUES (1000, REPEAT('a', 4096));
......
set global innodb_file_per_table = 1;
drop table if exists b;
drop database if exists bug_fk;
create database bug_fk;
use bug_fk;
CREATE TABLE b (
......@@ -93,5 +90,5 @@ show warnings;
Level Code Message
b.frm
b.ibd
drop table if exists b;
drop database if exists bug_fk;
drop table b;
drop database bug_fk;
call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on;
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, c3 TEXT)
ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
......@@ -540,6 +538,5 @@ Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
call mtr.add_suppression("MariaDB is trying to open a table handle but the .ibd file for");
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on;
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL)
ENGINE = InnoDB;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
......@@ -472,6 +470,5 @@ DROP TABLE t1;
connection default;
SET DEBUG_SYNC=RESET;
disconnect con1;
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
......@@ -12,21 +12,18 @@ call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1`
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page");
call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted");
FLUSH TABLES;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
SET SESSION debug_dbug="+d,ib_discard_before_commit_crash";
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR HY000: Lost connection to server during query
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
SET SESSION debug_dbug="+d,ib_discard_after_commit_crash";
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR HY000: Lost connection to server during query
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = Innodb;
INSERT INTO t1 VALUES (1), (2), (3), (4);
FLUSH TABLES t1 FOR EXPORT;
......@@ -52,8 +49,6 @@ ERROR HY000: Lost connection to server during query
unlink: t1.ibd
unlink: t1.cfg
DROP TABLE t1;
SET @file_per_table= @@innodb_file_per_table;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = Innodb;
ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
......@@ -943,4 +938,3 @@ SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table;
......@@ -120,7 +120,6 @@ ALTER TABLE t2 IMPORT TABLESPACE;
Warnings:
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
DROP TABLE t2;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
......@@ -285,6 +284,8 @@ c1 c2
unlink: t1.cfg
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 0;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;
......@@ -302,6 +303,8 @@ Warning 1809 Table `test`.`t1` in system tablespace
UNLOCK TABLES;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 1;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT, INDEX idx(c2)) ENGINE=InnoDB;
......
......@@ -2,9 +2,7 @@
# This is a copy of innodb-alter.test except using remote tablespaces
# and showing those files.
#
SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table;
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=ON;
SET NAMES utf8mb4;
CREATE TABLE t1 (
c1 INT PRIMARY KEY, c2 INT DEFAULT 1, ct TEXT,
......@@ -1589,4 +1587,3 @@ DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign;
### files in MYSQL_DATA_DIR/test
db.opt
### files in MYSQL_TMP_DIR/alt_dir/test
SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
......@@ -2,7 +2,6 @@
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET GLOBAL innodb_fast_shutdown=0;
# Create and populate the table to be corrupted
set global innodb_file_per_table=ON;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
......
SET GLOBAL innodb_file_per_table=0;
SET @save_fpt=@@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=OFF;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
create table bug56947(a int not null) engine = innodb;
SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
......@@ -8,5 +11,7 @@ check table bug56947;
Table Op Msg_type Msg_text
test.bug56947 check status OK
drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT;
SET GLOBAL innodb_file_per_table=@save_fpt;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
SET debug_dbug= @saved_dbug;
set global innodb_file_per_table=1;
CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
CREATE TABLE `main` (
......
......@@ -532,7 +532,6 @@ END|
SELECT @@innodb_fill_factor;
@@innodb_fill_factor
100
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
class INT,
id INT,
......@@ -686,7 +685,6 @@ test.t1 check status OK
SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
CHAR_LENGTH(b)
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=default;
DROP PROCEDURE populate_t1;
SET GLOBAL innodb_fill_factor=10;
CREATE PROCEDURE populate_t1(load_even INT)
......
......@@ -407,7 +407,6 @@ SET i = i + 1;
END WHILE;
COMMIT;
END|
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
class INT,
id INT,
......@@ -421,7 +420,6 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
RENAME TABLE t1 TO t0;
# Test Blob
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
a INT PRIMARY KEY,
b TEXT,
......@@ -467,7 +465,6 @@ class id title
SELECT * FROM t1 WHERE title = 'a10010';
class id title
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
class INT,
id INT,
......@@ -501,7 +498,6 @@ SELECT * FROM t1 WHERE title = 'a10010';
class id title
DROP TABLE t1;
# Test Blob
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
a INT PRIMARY KEY,
b TEXT,
......
......@@ -72,8 +72,6 @@ test.t1 check status OK
SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
CHAR_LENGTH(b)
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=default;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
class INT,
id INT,
......@@ -135,5 +133,4 @@ test.t1 check status OK
SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
CHAR_LENGTH(b)
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=default;
DROP PROCEDURE populate_t1;
SET GLOBAL innodb_file_per_table=0;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t(a INT)ENGINE=InnoDB;
SET GLOBAL innodb_file_per_table=1;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE ibd4(a INT UNIQUE)ENGINE=InnoDB;
CREATE TABLE ibd4f(a INT UNIQUE)ENGINE=InnoDB;
CREATE TABLE ibd5(a INT UNIQUE, b INT UNIQUE)ENGINE=InnoDB;
......
SET GLOBAL innodb_file_per_table=ON;
FLUSH TABLES;
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# restart
......
SET @save_per_table= @@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table= 1;
#
# MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
#
......@@ -43,4 +41,3 @@ $$
INSERT INTO t1 SET id=1,c294=1;
REPLACE t1 SET id=1,c294=1;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table= @save_per_table;
SET GLOBAL innodb_fast_shutdown=0;
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
SET GLOBAL innodb_file_per_table=1;
#
# Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE ==
# MTR_LOG_NO_REDO
#
SET GLOBAL innodb_file_per_table=ON;
create table t1 (a int not null, d varchar(15) not null, b
varchar(198) not null, c char(156)) engine=InnoDB
row_format=redundant;
......@@ -16,6 +14,8 @@ insert into t values(789, 'abcdef', 'jghikl', 'mnop');
insert into t values(134, 'kasdfsdsadf', 'adfjlasdkfjasd', 'adfsadflkasdasdfljasdf');
insert into t1 select a,d,b,c from t, seq_1_to_1024;
SET GLOBAL innodb_file_per_table=OFF;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
create table t2 (a int not null, d varchar(15) not null, b
varchar(198) not null, c char(156), fulltext ftsic(c)) engine=InnoDB
row_format=redundant;
......
# restart: with restart_parameters
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE tr(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE tc(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPACT;
CREATE TABLE td(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
......
......@@ -25,7 +25,6 @@ call mtr.add_suppression("Table .*bug16720368.* is corrupted");
-- echo # Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP
-- echo #
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB;
......@@ -129,8 +128,6 @@ DROP TABLE bug16720368, bug16720368_1;
-- echo # DICT_TABLE_ADD_TO_CACHE
-- echo #
SET GLOBAL innodb_file_per_table=1;
CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES(42);
......
......@@ -21,7 +21,6 @@ call mtr.add_suppression("InnoDB: ALTER TABLE `test`.`t` DISCARD TABLESPACE fail
--enable_query_log
let $MYSQLD_DATADIR=`select @@datadir`;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a SERIAL)ENGINE=InnoDB;
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
......
......@@ -9,12 +9,6 @@
# Otherwise, the follwing records 999,998,997 cause each page per record.
#
--disable_query_log
SET @old_innodb_file_per_table = @@innodb_file_per_table;
--enable_query_log
SET GLOBAL innodb_file_per_table=ON;
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b VARCHAR(4096)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, REPEAT('a', 4096));
INSERT INTO t1 VALUES (1000, REPEAT('a', 4096));
......@@ -68,7 +62,3 @@ WHERE s1.space = s2.space AND name = 'test/t1'
AND page_type = "INDEX" ORDER BY page_number;
DROP TABLE t1;
--disable_query_log
SET GLOBAL innodb_file_per_table = @old_innodb_file_per_table;
--enable_query_log
......@@ -2,7 +2,7 @@
let MYSQLD_DATADIR =`SELECT @@datadir`;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
CREATE DATABASE testdb_wl5522;
CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb;
......
......@@ -4,7 +4,7 @@ let MYSQLD_DATADIR =`SELECT @@datadir`;
SET AUTOCOMMIT = 0;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
CREATE DATABASE testdb_wl5522;
CREATE TABLE testdb_wl5522.t1 (c1 int ) engine = Innodb;
......
--innodb-file-per-table
--innodb-buffer-pool-size=32M
--innodb-page-size=64k
--innodb-strict-mode=OFF
......@@ -4,17 +4,6 @@
#
# MDEV-10083: Orphan ibd file when playing with foreign keys
#
--disable_query_log
SET @start_global_fpt = @@global.innodb_file_per_table;
SET @start_global_fkc = @@global.foreign_key_checks;
--enable_query_log
set global innodb_file_per_table = 1;
--disable_warnings
drop table if exists b;
drop database if exists bug_fk;
--enable_warnings
let $MYSQLD_DATADIR = `select @@datadir`;
......@@ -114,12 +103,6 @@ show warnings;
#
# Cleanup
#
--disable_query_log
SET @@global.innodb_file_per_table = @start_global_fpt;
SET @@global.foreign_key_checks = @start_global_fkc;
--enable_query_log
--disable_warnings
drop table if exists b;
drop database if exists bug_fk;
--enable_warnings
drop table b;
drop database bug_fk;
......@@ -9,10 +9,6 @@ SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl
call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
# DISCARD TABLESPACE needs file-per-table
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on;
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
......@@ -515,7 +511,6 @@ SET DEBUG_SYNC = 'RESET';
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
--disable_warnings
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
......
......@@ -11,10 +11,6 @@ call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
call mtr.add_suppression("MariaDB is trying to open a table handle but the .ibd file for");
# DISCARD TABLESPACE needs file-per-table
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on;
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
......@@ -447,7 +443,6 @@ disconnect con1;
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
--disable_warnings
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
......
......@@ -35,7 +35,6 @@ FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $strerrfix=/ (\(.+\))//;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
......@@ -52,8 +51,6 @@ ALTER TABLE t1 DISCARD TABLESPACE;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
......@@ -66,8 +63,6 @@ ALTER TABLE t1 DISCARD TABLESPACE;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table = 1;
# Create the table that we will use for crash recovery (during IMPORT)
CREATE TABLE t1 (c1 INT) ENGINE = Innodb;
INSERT INTO t1 VALUES (1), (2), (3), (4);
......@@ -130,9 +125,6 @@ EOF
DROP TABLE t1;
SET @file_per_table= @@innodb_file_per_table;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = Innodb;
ALTER TABLE t1 DISCARD TABLESPACE;
......@@ -1397,5 +1389,3 @@ call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
#cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table;
......@@ -98,7 +98,6 @@ if ($checksum_algorithm == "strict_full_crc32") {
ALTER TABLE t2 IMPORT TABLESPACE;
DROP TABLE t2;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
let MYSQLD_DATADIR =`SELECT @@datadir`;
......@@ -114,7 +113,7 @@ ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
DROP TABLE t1;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;
......@@ -158,7 +157,7 @@ SELECT COUNT(*) FROM t1;
DROP TABLE t1;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
# Insert some more records to move the LSN forward and then drop the
# table and restore
CREATE TABLE t1(
......@@ -204,7 +203,7 @@ SELECT COUNT(*) FROM t1;
DROP TABLE t1;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
# Insert some more records to move the LSN forward and then drop the
# table and restore, this time the table has a secondary index too.
CREATE TABLE t1(
......@@ -245,7 +244,7 @@ SELECT COUNT(*) FROM t1 WHERE c2 = 1;
DROP TABLE t1;
# Export/import on the same instance, with --innodb-file-per-table=1
# Export/import on the same instance
# Insert some more records to move the LSN forward and then drop the
# table and restore, this time the table has a secondary index too.
# Rename the index on the create so that the IMPORT fails, drop index
......
......@@ -6,7 +6,6 @@
--source include/have_innodb.inc
--source include/have_symlink.inc
SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table;
LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/;
# Set up some variables
......@@ -14,7 +13,6 @@ LET $MYSQL_DATA_DIR = `select @@datadir`;
LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=ON;
SET NAMES utf8mb4;
......@@ -706,5 +704,3 @@ DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign;
--list_files $MYSQL_TMP_DIR/alt_dir/test
--rmdir $MYSQL_TMP_DIR/alt_dir/test
--rmdir $MYSQL_TMP_DIR/alt_dir
SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
--innodb_file_per_table=1
--loose-skip-stack-trace
--skip-core-file
--loose-innodb_buffer_pool_load_at_startup=OFF
......@@ -21,8 +21,6 @@ SET GLOBAL innodb_fast_shutdown=0;
--echo # Create and populate the table to be corrupted
set global innodb_file_per_table=ON;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
......
......@@ -3,10 +3,6 @@
# Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
# http://bugs.mysql.com/39438
#
# This test must be run with innodb_file_per_table=1 because the crash
# only occurs if that option is turned on and DISCARD TABLESPACE only
# works with innodb_file_per_table.
#
SET default_storage_engine=InnoDB;
......
......@@ -4,7 +4,8 @@
-- source include/have_innodb.inc
-- source include/have_debug.inc
SET GLOBAL innodb_file_per_table=0;
SET @save_fpt=@@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=OFF;
create table bug56947(a int not null) engine = innodb;
SET @saved_dbug = @@SESSION.debug_dbug;
......@@ -15,5 +16,5 @@ alter table bug56947 add unique index (a);
check table bug56947;
drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT;
SET GLOBAL innodb_file_per_table=@save_fpt;
SET debug_dbug= @saved_dbug;
......@@ -6,8 +6,6 @@
# MDEV-8845: Table disappear after modifying FK
#
set global innodb_file_per_table=1;
CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
......
......@@ -80,11 +80,6 @@ SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=default;
# Test Compressed Table
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t1(
class INT,
id INT,
......@@ -143,6 +138,4 @@ SELECT CHAR_LENGTH(b) FROM t1 WHERE a=4975;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=default;
DROP PROCEDURE populate_t1;
--loose-innodb-buffer-pool-stats
--loose-innodb-buffer-page
--loose-innodb-buffer-page-lru
--innodb-file-per-table
--innodb-defragment=1
\ No newline at end of file
--innodb-defragment=1
......@@ -7,7 +7,6 @@
# Embedded server does not support crashing
--source include/not_embedded.inc
SET GLOBAL innodb_file_per_table=ON;
FLUSH TABLES;
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
......
......@@ -258,7 +258,7 @@ drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
# Counters are unpredictable
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset,
......
--source include/have_innodb.inc
--source include/have_sequence.inc
SET @save_per_table= @@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table= 1;
let MYSQLD_DATADIR =`SELECT @@datadir`;
--echo #
......@@ -68,5 +65,3 @@ DELIMITER ;$$
INSERT INTO t1 SET id=1,c294=1;
REPLACE t1 SET id=1,c294=1;
DROP TABLE t1;
SET GLOBAL innodb_file_per_table= @save_per_table;
......@@ -26,14 +26,11 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/row_format_redundant;
SET GLOBAL innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table=1;
--echo #
--echo # Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE ==
--echo # MTR_LOG_NO_REDO
--echo #
SET GLOBAL innodb_file_per_table=ON;
create table t1 (a int not null, d varchar(15) not null, b
varchar(198) not null, c char(156)) engine=InnoDB
row_format=redundant;
......
......@@ -40,7 +40,6 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags;
--let $restart_parameters=$d --innodb-stats-persistent=0
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE tr(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE tc(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPACT;
CREATE TABLE td(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
......
......@@ -161,6 +161,8 @@ DROP TABLE mdev19073, mdev19073_2;
# MDEV-28706 Redundant InnoDB table fails during alter
#
SET @@global.innodb_file_per_table = 0;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t1 (
col_int INTEGER, col_text TEXT,
col_text_1 TEXT
......
......@@ -721,6 +721,8 @@ DROP TABLE t1;
#
SET @save = @@global.innodb_file_per_table;
SET @@global.innodb_file_per_table = 0;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
CREATE TABLE t1 (
col_int INTEGER, col_text TEXT,
col_int_g INTEGER GENERATED ALWAYS AS (col_int)
......@@ -730,6 +732,8 @@ ALTER TABLE t1 DROP KEY `ftidx` ;
INSERT INTO t1 (col_int, col_text) VALUES ( 1255, NULL);
DROP TABLE t1;
SET @@global.innodb_file_per_table = @save;
Warnings:
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
#
# MDEV-20797 FULLTEXT search with apostrophe,
# and mandatory words
......
......@@ -466,7 +466,8 @@ ROLLBACK;
SELECT * FROM t2 WHERE MATCH(s2) AGAINST ('Lollipops');
s1 s2
DROP TABLE t2 , t1;
set global innodb_file_per_table=1;
SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed;
SET GLOBAL innodb_read_only_compressed=OFF;
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
a VARCHAR(200),
......@@ -649,7 +650,7 @@ id a b
6 MYSQL SECURITY when configured properly, mysql ...
7 TEST QUERY EXPANSION for database ...
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
a VARCHAR(200),
......
drop table if exists t1;
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
a VARCHAR(200),
......@@ -133,7 +132,6 @@ AGAINST ('"xyz blob"@3' IN BOOLEAN MODE);
count(*)
2
DROP TABLE t1;
set global innodb_file_per_table=1;
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
a TEXT,
......@@ -214,4 +212,3 @@ AGAINST ('"very blob"@3' IN BOOLEAN MODE);
count(*)
1
DROP TABLE t1;
SET GLOBAL innodb_file_per_table=1;
......@@ -427,15 +427,9 @@ DROP TABLE t2 , t1;
# FTS index with compressed row format
#------------------------------------------------------------------------------
# Save innodb variables
let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
set global innodb_file_per_table=1;
--disable_query_log
SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed;
SET GLOBAL innodb_read_only_compressed=OFF;
--enable_query_log
# Create FTS table
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
......@@ -583,10 +577,7 @@ SELECT * FROM t1 WHERE MATCH (a,b)
SELECT * FROM t1 ORDER BY id;
DROP TABLE t1;
--disable_query_log
SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
--enable_query_log
eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
#------------------------------------------------------------------------------
# FTS index with utf8 character testcase
......
......@@ -5,14 +5,6 @@
# Functional testing with FTS proximity search using '@'
# and try search default words
--disable_warnings
drop table if exists t1;
--enable_warnings
--disable_query_log
let $innodb_file_per_table_orig = `select @@innodb_file_per_table`;
--enable_query_log
# Create FTS table
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
......@@ -161,8 +153,6 @@ SELECT count(*) FROM t1
DROP TABLE t1;
set global innodb_file_per_table=1;
# Test fts with externally stored long column
CREATE TABLE t1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
......@@ -257,5 +247,3 @@ SELECT count(*) FROM t1
AGAINST ('"very blob"@3' IN BOOLEAN MODE);
DROP TABLE t1;
eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
SET GLOBAL innodb_file_per_table=ON;
DROP TABLE IF EXISTS table6;
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
Warnings:
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
......@@ -12,5 +7,3 @@ SHOW WARNINGS;
Level Code Message
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
DROP TABLE bug53591;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_strict_mode=DEFAULT;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment