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

MDEV-13625: Add innodb.check_ibd_filesize

parent eb14806e
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,32k
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 196608
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
-# bytes: 9437184
+# bytes: 786432
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 196608
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 786432
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,4k
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 24576
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 24576
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
+# bytes: 16384
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 25600
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,64k
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 393216
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
-# bytes: 9437184
+# bytes: 983040
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 393216
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 1572864
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,8k
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 49152
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 49152
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
+# bytes: 32768
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 32768
DROP TABLE t1;
#
# Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
# bytes: 98304
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
# bytes: 98304
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
# bytes: 65536
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 65536
DROP TABLE t1;
--source include/innodb_page_size.inc
--source include/have_sequence.inc
--echo #
--echo # Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
--echo # SPACE IN 5.7 THAN IN 5.6
--echo #
#
# Table 1: small rows
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
let MYSQLD_DATADIR=`select @@datadir`;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
DROP TABLE t1;
#
# Table 2: BLOB
#
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
DROP TABLE t1;
let $page_size=`SELECT @@innodb_page_size`;
if ($page_size < 32768)
{
#
# Table 3: compressed BLOB
#
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
perl;
print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
EOF
DROP TABLE t1;
}
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