diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-10-31 12:08:28 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-10-31 12:09:08 +0200 |
commit | a5cbdd63bc2ff25a52e2e10f84b6aaf59837dbae (patch) | |
tree | ba46d9e3435c7c1d89251d953a0f796a46f53f1c | |
parent | b92ff45089eb21ede352f5fd18dc69baa4bcb13f (diff) | |
download | mariadb-git-a5cbdd63bc2ff25a52e2e10f84b6aaf59837dbae.tar.gz |
Fix innodb.table_flags,debug
-rw-r--r-- | mysql-test/suite/innodb/disabled.def | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff | 130 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff | 8 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff | 130 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff | 8 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/table_flags,debug.rdiff | 8 | ||||
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 4 | ||||
-rw-r--r-- | storage/xtradb/row/row0mysql.cc | 4 |
8 files changed, 279 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def index e8991f6b851..8cae44a3607 100644 --- a/mysql-test/suite/innodb/disabled.def +++ b/mysql-test/suite/innodb/disabled.def @@ -9,4 +9,4 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -table_flags: crashes on assert, Marko to fix + diff --git a/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff new file mode 100644 index 00000000000..13fdc5657c4 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff @@ -0,0 +1,130 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,32k,debug.reject +@@ -4,85 +4,87 @@ + CREATE TABLE td(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + CREATE TABLE tz(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPRESSED + KEY_BLOCK_SIZE=1; ++Warnings: ++Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > 16k. Assuming ROW_FORMAT=COMPACT. + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; + SYS_TABLES clustered index root page (8): + N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', +- DB_TRX_ID=0x000000000301, ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', ++ DB_TRX_ID=0x000000000302, + DB_ROLL_PTR=0x81000001320194, +- ID=0x000000000000000e, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0110, +- ID=0x000000000000000b, ++ DB_ROLL_PTR=0x800000012c016f, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0201, +- ID=0x000000000000000c, ++ DB_ROLL_PTR=0x800000012c0260, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501fc (NAME='SYS_TABLESPACES', +- DB_TRX_ID=0x000000000301, ++header=0x040028150209 (NAME='SYS_TABLESPACES', ++ DB_TRX_ID=0x000000000302, + DB_ROLL_PTR=0x81000001320110, +- ID=0x000000000000000d, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000038150240 (NAME='test/tc', +- DB_TRX_ID=0x000000000303, ++header=0x00003815024d (NAME='test/tc', ++ DB_TRX_ID=0x000000000304, + DB_ROLL_PTR=0x83000001360110, +- ID=0x0000000000000010, ++ ID=0x0000000000000011, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x0000401502c8 (NAME='test/td', +- DB_TRX_ID=0x000000000304, ++header=0x0000401502d5 (NAME='test/td', ++ DB_TRX_ID=0x000000000305, + DB_ROLL_PTR=0x84000001370110, +- ID=0x0000000000000011, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x0000501501b8 (NAME='test/tp', +- DB_TRX_ID=0x000000000306, ++header=0x00005015008d (NAME='test/tp', ++ DB_TRX_ID=0x000000000307, + DB_ROLL_PTR=0x86000001390110, +- ID=0x0000000000000013, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x000009a1, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x000030150284 (NAME='test/tr', +- DB_TRX_ID=0x000000000302, ++header=0x000010150291 (NAME='test/tr', ++ DB_TRX_ID=0x000000000303, + DB_ROLL_PTR=0x82000001350110, +- ID=0x000000000000000f, ++ ID=0x0000000000000010, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -90,11 +92,11 @@ + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000001) + header=0x000048150074 (NAME='test/tz', +- DB_TRX_ID=0x000000000305, ++ DB_TRX_ID=0x000000000306, + DB_ROLL_PTR=0x85000001380110, +- ID=0x0000000000000012, ++ ID=0x0000000000000013, + N_COLS=0x80000001, +- TYPE=0x00000023, ++ TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), diff --git a/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff index 83e40b2d3fd..b49aba8f661 100644 --- a/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff @@ -1,7 +1,7 @@ --- suite/innodb/r/table_flags.result +++ suite/innodb/r/table_flags,4k,debug.reject -@@ -10,81 +10,81 @@ - CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +@@ -8,81 +8,81 @@ + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; SYS_TABLES clustered index root page (8): N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 -header=0x01000003016e (NAME=0x696e66696d756d00) @@ -97,7 +97,7 @@ + DB_ROLL_PTR=0x86000003300110, + ID=0x0000000000000014, N_COLS=0x80000001, - TYPE=0x00000021, + TYPE=0x000009a1, MIX_ID=0x0000000000000000, MIX_LEN=0x00000050, CLUSTER_NAME=NULL(0 bytes), @@ -113,7 +113,7 @@ N_COLS=0x00000001, TYPE=0x00000001, MIX_ID=0x0000000000000000, -@@ -92,9 +92,9 @@ +@@ -90,9 +90,9 @@ CLUSTER_NAME=NULL(0 bytes), SPACE=0x00000001) header=0x000048150074 (NAME='test/tz', diff --git a/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff new file mode 100644 index 00000000000..dcd5f2329c7 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff @@ -0,0 +1,130 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,64k,debug.reject +@@ -4,85 +4,87 @@ + CREATE TABLE td(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + CREATE TABLE tz(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPRESSED + KEY_BLOCK_SIZE=1; ++Warnings: ++Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > 16k. Assuming ROW_FORMAT=COMPACT. + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; + SYS_TABLES clustered index root page (8): + N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', +- DB_TRX_ID=0x000000000301, ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', ++ DB_TRX_ID=0x000000000302, + DB_ROLL_PTR=0x81000001320194, +- ID=0x000000000000000e, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0110, +- ID=0x000000000000000b, ++ DB_ROLL_PTR=0x800000012c016f, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0201, +- ID=0x000000000000000c, ++ DB_ROLL_PTR=0x800000012c0260, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501fc (NAME='SYS_TABLESPACES', +- DB_TRX_ID=0x000000000301, ++header=0x040028150209 (NAME='SYS_TABLESPACES', ++ DB_TRX_ID=0x000000000302, + DB_ROLL_PTR=0x81000001320110, +- ID=0x000000000000000d, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000038150240 (NAME='test/tc', +- DB_TRX_ID=0x000000000303, ++header=0x00003815024d (NAME='test/tc', ++ DB_TRX_ID=0x000000000304, + DB_ROLL_PTR=0x83000001360110, +- ID=0x0000000000000010, ++ ID=0x0000000000000011, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x0000401502c8 (NAME='test/td', +- DB_TRX_ID=0x000000000304, ++header=0x0000401502d5 (NAME='test/td', ++ DB_TRX_ID=0x000000000305, + DB_ROLL_PTR=0x84000001370110, +- ID=0x0000000000000011, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x0000501501b8 (NAME='test/tp', +- DB_TRX_ID=0x000000000306, ++header=0x00005015008d (NAME='test/tp', ++ DB_TRX_ID=0x000000000307, + DB_ROLL_PTR=0x86000001390110, +- ID=0x0000000000000013, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x000009a1, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x000030150284 (NAME='test/tr', +- DB_TRX_ID=0x000000000302, ++header=0x000010150291 (NAME='test/tr', ++ DB_TRX_ID=0x000000000303, + DB_ROLL_PTR=0x82000001350110, +- ID=0x000000000000000f, ++ ID=0x0000000000000010, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -90,11 +92,11 @@ + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000001) + header=0x000048150074 (NAME='test/tz', +- DB_TRX_ID=0x000000000305, ++ DB_TRX_ID=0x000000000306, + DB_ROLL_PTR=0x85000001380110, +- ID=0x0000000000000012, ++ ID=0x0000000000000013, + N_COLS=0x80000001, +- TYPE=0x00000023, ++ TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), diff --git a/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff index 14fa7509c19..0ce96c8eb10 100644 --- a/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff @@ -1,7 +1,7 @@ --- suite/innodb/r/table_flags.result +++ suite/innodb/r/table_flags,8k,debug.reject -@@ -10,81 +10,81 @@ - CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +@@ -8,81 +8,81 @@ + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; SYS_TABLES clustered index root page (8): N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 -header=0x01000003016e (NAME=0x696e66696d756d00) @@ -97,7 +97,7 @@ + DB_ROLL_PTR=0x86000001df0110, + ID=0x0000000000000014, N_COLS=0x80000001, - TYPE=0x00000021, + TYPE=0x000009a1, MIX_ID=0x0000000000000000, MIX_LEN=0x00000050, CLUSTER_NAME=NULL(0 bytes), @@ -113,7 +113,7 @@ N_COLS=0x00000001, TYPE=0x00000001, MIX_ID=0x0000000000000000, -@@ -92,9 +92,9 @@ +@@ -90,9 +90,9 @@ CLUSTER_NAME=NULL(0 bytes), SPACE=0x00000001) header=0x000048150074 (NAME='test/tz', diff --git a/mysql-test/suite/innodb/r/table_flags,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,debug.rdiff index d038515ffe5..acc796a0a7f 100644 --- a/mysql-test/suite/innodb/r/table_flags,debug.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,debug.rdiff @@ -1,7 +1,7 @@ --- suite/innodb/r/table_flags.result +++ suite/innodb/r/table_flags,debug.reject -@@ -10,81 +10,81 @@ - CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +@@ -8,81 +8,81 @@ + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; SYS_TABLES clustered index root page (8): N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 -header=0x01000003016e (NAME=0x696e66696d756d00) @@ -97,7 +97,7 @@ + DB_ROLL_PTR=0x860000013a0110, + ID=0x0000000000000014, N_COLS=0x80000001, - TYPE=0x00000021, + TYPE=0x000009a1, MIX_ID=0x0000000000000000, MIX_LEN=0x00000050, CLUSTER_NAME=NULL(0 bytes), @@ -113,7 +113,7 @@ N_COLS=0x00000001, TYPE=0x00000001, MIX_ID=0x0000000000000000, -@@ -92,9 +92,9 @@ +@@ -90,9 +90,9 @@ CLUSTER_NAME=NULL(0 bytes), SPACE=0x00000001) header=0x000048150074 (NAME='test/tz', diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 7a737cd10e8..bb815de3138 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -4049,7 +4049,9 @@ row_drop_table_for_mysql( dict_stats_recalc_pool_del(table); dict_stats_defrag_pool_del(table, NULL); - btr_defragment_remove_table(table); + if (btr_defragment_thread_active) { + btr_defragment_remove_table(table); + } /* Remove stats for this table and all of its indexes from the persistent storage if it exists and if there are stats for this diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index 450813bef6d..88ebe24f3bb 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -4059,7 +4059,9 @@ row_drop_table_for_mysql( dict_stats_recalc_pool_del(table); dict_stats_defrag_pool_del(table, NULL); - btr_defragment_remove_table(table); + if (btr_defragment_thread_active) { + btr_defragment_remove_table(table); + } /* Remove stats for this table and all of its indexes from the persistent storage if it exists and if there are stats for this |