mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-12023 Assertion failure sym_node->table != NULL on startup
row_drop_table_for_mysql(): Avoid accessing non-existing dictionary tables. dict_create_or_check_foreign_constraint_tables(): Add debug instrumentation for creating and dropping a table before the creation of any non-core dictionary tables. trx_purge_add_update_undo_to_history(): Adjust a debug assertion, so that it will not fail due to the test instrumentation.
This commit is contained in:
134
mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff
Normal file
134
mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff
Normal file
@ -0,0 +1,134 @@
|
||||
--- suite/innodb/r/table_flags.result
|
||||
+++ suite/innodb/r/table_flags,32k,debug.reject
|
||||
@@ -5,96 +5,98 @@
|
||||
SET innodb_strict_mode=OFF;
|
||||
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=DYNAMIC.
|
||||
SET innodb_strict_mode=ON;
|
||||
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=10; LEVEL=0; INDEX_ID=0x0000000000000001
|
||||
-header=0x01000003016e (NAME=0x696e66696d756d00)
|
||||
-header=0x00002815008d (NAME='SYS_DATAFILES',
|
||||
+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=0x0400201501b8 (NAME='SYS_TABLESPACES',
|
||||
+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=0x000030150244 (NAME='SYS_VIRTUAL',
|
||||
+header=0x000038150251 (NAME='SYS_VIRTUAL',
|
||||
DB_TRX_ID=0x000000000304,
|
||||
DB_ROLL_PTR=0x82000001350110,
|
||||
- ID=0x000000000000000f,
|
||||
+ ID=0x0000000000000010,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000040150288 (NAME='test/tc',
|
||||
+header=0x000040150295 (NAME='test/tc',
|
||||
DB_TRX_ID=0x000000000308,
|
||||
DB_ROLL_PTR=0x84000001380110,
|
||||
- ID=0x0000000000000011,
|
||||
+ ID=0x0000000000000012,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000002)
|
||||
-header=0x000048150310 (NAME='test/td',
|
||||
+header=0x00004815031d (NAME='test/td',
|
||||
DB_TRX_ID=0x00000000030a,
|
||||
DB_ROLL_PTR=0x85000001390110,
|
||||
- ID=0x0000000000000012,
|
||||
+ ID=0x0000000000000013,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000003)
|
||||
-header=0x000058150200 (NAME='test/tp',
|
||||
+header=0x00005815008d (NAME='test/tp',
|
||||
DB_TRX_ID=0x00000000030e,
|
||||
DB_ROLL_PTR=0x870000013b0110,
|
||||
- ID=0x0000000000000014,
|
||||
+ ID=0x0000000000000015,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x000009a1,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000005)
|
||||
-header=0x0000381502cc (NAME='test/tr',
|
||||
+header=0x0000101502d9 (NAME='test/tr',
|
||||
DB_TRX_ID=0x000000000306,
|
||||
DB_ROLL_PTR=0x83000001370110,
|
||||
- ID=0x0000000000000010,
|
||||
+ ID=0x0000000000000011,
|
||||
N_COLS=0x00000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
@@ -104,9 +106,9 @@
|
||||
header=0x000050150074 (NAME='test/tz',
|
||||
DB_TRX_ID=0x00000000030c,
|
||||
DB_ROLL_PTR=0x860000013a0110,
|
||||
- ID=0x0000000000000013,
|
||||
+ ID=0x0000000000000014,
|
||||
N_COLS=0x80000001,
|
||||
- TYPE=0x00000023,
|
||||
+ TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
133
mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff
Normal file
133
mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff
Normal file
@ -0,0 +1,133 @@
|
||||
--- suite/innodb/r/table_flags.result
|
||||
+++ suite/innodb/r/table_flags,4k,debug.reject
|
||||
@@ -10,91 +10,91 @@
|
||||
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||||
SYS_TABLES clustered index root page (8):
|
||||
N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001
|
||||
-header=0x01000003016e (NAME=0x696e66696d756d00)
|
||||
-header=0x00002815008d (NAME='SYS_DATAFILES',
|
||||
+header=0x0100000301bf (NAME=0x696e66696d756d00)
|
||||
+header=0x0000301500de (NAME='SYS_DATAFILES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320194,
|
||||
- ID=0x000000000000000e,
|
||||
+ DB_ROLL_PTR=0x81000003270194,
|
||||
+ 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=0x8000000320016f,
|
||||
+ 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=0x80000003200260,
|
||||
+ ID=0x000000000000000d,
|
||||
N_COLS=0x00000004,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x0400201501b8 (NAME='SYS_TABLESPACES',
|
||||
+header=0x040028150209 (NAME='SYS_TABLESPACES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320110,
|
||||
- ID=0x000000000000000d,
|
||||
+ DB_ROLL_PTR=0x81000003270110,
|
||||
+ ID=0x000000000000000e,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000030150244 (NAME='SYS_VIRTUAL',
|
||||
+header=0x000038150251 (NAME='SYS_VIRTUAL',
|
||||
DB_TRX_ID=0x000000000304,
|
||||
- DB_ROLL_PTR=0x82000001350110,
|
||||
- ID=0x000000000000000f,
|
||||
+ DB_ROLL_PTR=0x820000032b0110,
|
||||
+ ID=0x0000000000000010,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000040150288 (NAME='test/tc',
|
||||
+header=0x000040150295 (NAME='test/tc',
|
||||
DB_TRX_ID=0x000000000308,
|
||||
- DB_ROLL_PTR=0x84000001380110,
|
||||
- ID=0x0000000000000011,
|
||||
+ DB_ROLL_PTR=0x840000032f0110,
|
||||
+ ID=0x0000000000000012,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000002)
|
||||
-header=0x000048150310 (NAME='test/td',
|
||||
+header=0x00004815031d (NAME='test/td',
|
||||
DB_TRX_ID=0x00000000030a,
|
||||
- DB_ROLL_PTR=0x85000001390110,
|
||||
- ID=0x0000000000000012,
|
||||
+ DB_ROLL_PTR=0x85000003300110,
|
||||
+ ID=0x0000000000000013,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000003)
|
||||
-header=0x000058150200 (NAME='test/tp',
|
||||
+header=0x00005815008d (NAME='test/tp',
|
||||
DB_TRX_ID=0x00000000030e,
|
||||
- DB_ROLL_PTR=0x870000013b0110,
|
||||
- ID=0x0000000000000014,
|
||||
+ DB_ROLL_PTR=0x87000003320110,
|
||||
+ ID=0x0000000000000015,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x000009a1,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000005)
|
||||
-header=0x0000381502cc (NAME='test/tr',
|
||||
+header=0x0000101502d9 (NAME='test/tr',
|
||||
DB_TRX_ID=0x000000000306,
|
||||
- DB_ROLL_PTR=0x83000001370110,
|
||||
- ID=0x0000000000000010,
|
||||
+ DB_ROLL_PTR=0x830000032d0110,
|
||||
+ ID=0x0000000000000011,
|
||||
N_COLS=0x00000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
@@ -103,8 +103,8 @@
|
||||
SPACE=0x00000001)
|
||||
header=0x000050150074 (NAME='test/tz',
|
||||
DB_TRX_ID=0x00000000030c,
|
||||
- DB_ROLL_PTR=0x860000013a0110,
|
||||
- ID=0x0000000000000013,
|
||||
+ DB_ROLL_PTR=0x86000003310110,
|
||||
+ ID=0x0000000000000014,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000023,
|
||||
MIX_ID=0x0000000000000000,
|
134
mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff
Normal file
134
mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff
Normal file
@ -0,0 +1,134 @@
|
||||
--- suite/innodb/r/table_flags.result
|
||||
+++ suite/innodb/r/table_flags,64k,debug.reject
|
||||
@@ -5,96 +5,98 @@
|
||||
SET innodb_strict_mode=OFF;
|
||||
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=DYNAMIC.
|
||||
SET innodb_strict_mode=ON;
|
||||
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=10; LEVEL=0; INDEX_ID=0x0000000000000001
|
||||
-header=0x01000003016e (NAME=0x696e66696d756d00)
|
||||
-header=0x00002815008d (NAME='SYS_DATAFILES',
|
||||
+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=0x0400201501b8 (NAME='SYS_TABLESPACES',
|
||||
+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=0x000030150244 (NAME='SYS_VIRTUAL',
|
||||
+header=0x000038150251 (NAME='SYS_VIRTUAL',
|
||||
DB_TRX_ID=0x000000000304,
|
||||
DB_ROLL_PTR=0x82000001350110,
|
||||
- ID=0x000000000000000f,
|
||||
+ ID=0x0000000000000010,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000040150288 (NAME='test/tc',
|
||||
+header=0x000040150295 (NAME='test/tc',
|
||||
DB_TRX_ID=0x000000000308,
|
||||
DB_ROLL_PTR=0x84000001380110,
|
||||
- ID=0x0000000000000011,
|
||||
+ ID=0x0000000000000012,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000002)
|
||||
-header=0x000048150310 (NAME='test/td',
|
||||
+header=0x00004815031d (NAME='test/td',
|
||||
DB_TRX_ID=0x00000000030a,
|
||||
DB_ROLL_PTR=0x85000001390110,
|
||||
- ID=0x0000000000000012,
|
||||
+ ID=0x0000000000000013,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000003)
|
||||
-header=0x000058150200 (NAME='test/tp',
|
||||
+header=0x00005815008d (NAME='test/tp',
|
||||
DB_TRX_ID=0x00000000030e,
|
||||
DB_ROLL_PTR=0x870000013b0110,
|
||||
- ID=0x0000000000000014,
|
||||
+ ID=0x0000000000000015,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x000009a1,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000005)
|
||||
-header=0x0000381502cc (NAME='test/tr',
|
||||
+header=0x0000101502d9 (NAME='test/tr',
|
||||
DB_TRX_ID=0x000000000306,
|
||||
DB_ROLL_PTR=0x83000001370110,
|
||||
- ID=0x0000000000000010,
|
||||
+ ID=0x0000000000000011,
|
||||
N_COLS=0x00000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
@@ -104,9 +106,9 @@
|
||||
header=0x000050150074 (NAME='test/tz',
|
||||
DB_TRX_ID=0x00000000030c,
|
||||
DB_ROLL_PTR=0x860000013a0110,
|
||||
- ID=0x0000000000000013,
|
||||
+ ID=0x0000000000000014,
|
||||
N_COLS=0x80000001,
|
||||
- TYPE=0x00000023,
|
||||
+ TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
133
mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff
Normal file
133
mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff
Normal file
@ -0,0 +1,133 @@
|
||||
--- suite/innodb/r/table_flags.result
|
||||
+++ suite/innodb/r/table_flags,8k,debug.reject
|
||||
@@ -10,91 +10,91 @@
|
||||
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||||
SYS_TABLES clustered index root page (8):
|
||||
N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001
|
||||
-header=0x01000003016e (NAME=0x696e66696d756d00)
|
||||
-header=0x00002815008d (NAME='SYS_DATAFILES',
|
||||
+header=0x0100000301bf (NAME=0x696e66696d756d00)
|
||||
+header=0x0000301500de (NAME='SYS_DATAFILES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320194,
|
||||
- ID=0x000000000000000e,
|
||||
+ DB_ROLL_PTR=0x81000001d80194,
|
||||
+ 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=0x80000001d1016f,
|
||||
+ 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=0x80000001d10260,
|
||||
+ ID=0x000000000000000d,
|
||||
N_COLS=0x00000004,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x0400201501b8 (NAME='SYS_TABLESPACES',
|
||||
+header=0x040028150209 (NAME='SYS_TABLESPACES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320110,
|
||||
- ID=0x000000000000000d,
|
||||
+ DB_ROLL_PTR=0x81000001d80110,
|
||||
+ ID=0x000000000000000e,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000030150244 (NAME='SYS_VIRTUAL',
|
||||
+header=0x000038150251 (NAME='SYS_VIRTUAL',
|
||||
DB_TRX_ID=0x000000000304,
|
||||
- DB_ROLL_PTR=0x82000001350110,
|
||||
- ID=0x000000000000000f,
|
||||
+ DB_ROLL_PTR=0x82000001db0110,
|
||||
+ ID=0x0000000000000010,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000040150288 (NAME='test/tc',
|
||||
+header=0x000040150295 (NAME='test/tc',
|
||||
DB_TRX_ID=0x000000000308,
|
||||
- DB_ROLL_PTR=0x84000001380110,
|
||||
- ID=0x0000000000000011,
|
||||
+ DB_ROLL_PTR=0x84000001de0110,
|
||||
+ ID=0x0000000000000012,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000002)
|
||||
-header=0x000048150310 (NAME='test/td',
|
||||
+header=0x00004815031d (NAME='test/td',
|
||||
DB_TRX_ID=0x00000000030a,
|
||||
- DB_ROLL_PTR=0x85000001390110,
|
||||
- ID=0x0000000000000012,
|
||||
+ DB_ROLL_PTR=0x85000001df0110,
|
||||
+ ID=0x0000000000000013,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000003)
|
||||
-header=0x000058150200 (NAME='test/tp',
|
||||
+header=0x00005815008d (NAME='test/tp',
|
||||
DB_TRX_ID=0x00000000030e,
|
||||
- DB_ROLL_PTR=0x870000013b0110,
|
||||
- ID=0x0000000000000014,
|
||||
+ DB_ROLL_PTR=0x87000001e10110,
|
||||
+ ID=0x0000000000000015,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x000009a1,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000005)
|
||||
-header=0x0000381502cc (NAME='test/tr',
|
||||
+header=0x0000101502d9 (NAME='test/tr',
|
||||
DB_TRX_ID=0x000000000306,
|
||||
- DB_ROLL_PTR=0x83000001370110,
|
||||
- ID=0x0000000000000010,
|
||||
+ DB_ROLL_PTR=0x83000001dd0110,
|
||||
+ ID=0x0000000000000011,
|
||||
N_COLS=0x00000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
@@ -103,8 +103,8 @@
|
||||
SPACE=0x00000001)
|
||||
header=0x000050150074 (NAME='test/tz',
|
||||
DB_TRX_ID=0x00000000030c,
|
||||
- DB_ROLL_PTR=0x860000013a0110,
|
||||
- ID=0x0000000000000013,
|
||||
+ DB_ROLL_PTR=0x86000001e00110,
|
||||
+ ID=0x0000000000000014,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000023,
|
||||
MIX_ID=0x0000000000000000,
|
133
mysql-test/suite/innodb/r/table_flags,debug.rdiff
Normal file
133
mysql-test/suite/innodb/r/table_flags,debug.rdiff
Normal file
@ -0,0 +1,133 @@
|
||||
--- suite/innodb/r/table_flags.result
|
||||
+++ suite/innodb/r/table_flags,debug.reject
|
||||
@@ -10,91 +10,91 @@
|
||||
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||||
SYS_TABLES clustered index root page (8):
|
||||
N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001
|
||||
-header=0x01000003016e (NAME=0x696e66696d756d00)
|
||||
-header=0x00002815008d (NAME='SYS_DATAFILES',
|
||||
+header=0x0100000301bf (NAME=0x696e66696d756d00)
|
||||
+header=0x0000301500de (NAME='SYS_DATAFILES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320194,
|
||||
- ID=0x000000000000000e,
|
||||
+ DB_ROLL_PTR=0x81000001330194,
|
||||
+ 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=0x800000012d016f,
|
||||
+ 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=0x800000012d0260,
|
||||
+ ID=0x000000000000000d,
|
||||
N_COLS=0x00000004,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x0400201501b8 (NAME='SYS_TABLESPACES',
|
||||
+header=0x040028150209 (NAME='SYS_TABLESPACES',
|
||||
DB_TRX_ID=0x000000000302,
|
||||
- DB_ROLL_PTR=0x81000001320110,
|
||||
- ID=0x000000000000000d,
|
||||
+ DB_ROLL_PTR=0x81000001330110,
|
||||
+ ID=0x000000000000000e,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000030150244 (NAME='SYS_VIRTUAL',
|
||||
+header=0x000038150251 (NAME='SYS_VIRTUAL',
|
||||
DB_TRX_ID=0x000000000304,
|
||||
- DB_ROLL_PTR=0x82000001350110,
|
||||
- ID=0x000000000000000f,
|
||||
+ DB_ROLL_PTR=0x82000001360110,
|
||||
+ ID=0x0000000000000010,
|
||||
N_COLS=0x00000003,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000040,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000000)
|
||||
-header=0x000040150288 (NAME='test/tc',
|
||||
+header=0x000040150295 (NAME='test/tc',
|
||||
DB_TRX_ID=0x000000000308,
|
||||
- DB_ROLL_PTR=0x84000001380110,
|
||||
- ID=0x0000000000000011,
|
||||
+ DB_ROLL_PTR=0x84000001390110,
|
||||
+ ID=0x0000000000000012,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000002)
|
||||
-header=0x000048150310 (NAME='test/td',
|
||||
+header=0x00004815031d (NAME='test/td',
|
||||
DB_TRX_ID=0x00000000030a,
|
||||
- DB_ROLL_PTR=0x85000001390110,
|
||||
- ID=0x0000000000000012,
|
||||
+ DB_ROLL_PTR=0x850000013a0110,
|
||||
+ ID=0x0000000000000013,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000021,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000003)
|
||||
-header=0x000058150200 (NAME='test/tp',
|
||||
+header=0x00005815008d (NAME='test/tp',
|
||||
DB_TRX_ID=0x00000000030e,
|
||||
- DB_ROLL_PTR=0x870000013b0110,
|
||||
- ID=0x0000000000000014,
|
||||
+ DB_ROLL_PTR=0x870000013c0110,
|
||||
+ ID=0x0000000000000015,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x000009a1,
|
||||
MIX_ID=0x0000000000000000,
|
||||
MIX_LEN=0x00000050,
|
||||
CLUSTER_NAME=NULL(0 bytes),
|
||||
SPACE=0x00000005)
|
||||
-header=0x0000381502cc (NAME='test/tr',
|
||||
+header=0x0000101502d9 (NAME='test/tr',
|
||||
DB_TRX_ID=0x000000000306,
|
||||
- DB_ROLL_PTR=0x83000001370110,
|
||||
- ID=0x0000000000000010,
|
||||
+ DB_ROLL_PTR=0x83000001380110,
|
||||
+ ID=0x0000000000000011,
|
||||
N_COLS=0x00000001,
|
||||
TYPE=0x00000001,
|
||||
MIX_ID=0x0000000000000000,
|
||||
@@ -103,8 +103,8 @@
|
||||
SPACE=0x00000001)
|
||||
header=0x000050150074 (NAME='test/tz',
|
||||
DB_TRX_ID=0x00000000030c,
|
||||
- DB_ROLL_PTR=0x860000013a0110,
|
||||
- ID=0x0000000000000013,
|
||||
+ DB_ROLL_PTR=0x860000013b0110,
|
||||
+ ID=0x0000000000000014,
|
||||
N_COLS=0x80000001,
|
||||
TYPE=0x00000023,
|
||||
MIX_ID=0x0000000000000000,
|
@ -1,6 +1,7 @@
|
||||
--source include/innodb_page_size.inc
|
||||
# Embedded server tests do not support restarting
|
||||
--source include/not_embedded.inc
|
||||
--source include/maybe_debug.inc
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Table `mysql`\\.`innodb_table_stats` not found");
|
||||
@ -28,6 +29,9 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags;
|
||||
--let $d=--innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir
|
||||
--let $d=$d --innodb-data-file-path=ibdata1:1M:autoextend
|
||||
--let $d=$d --innodb-undo-tablespaces=0
|
||||
if ($have_debug) {
|
||||
--let $d=$d --debug=d,create_and_drop_garbage
|
||||
}
|
||||
--let $restart_parameters=$d --innodb-stats-persistent=0 --innodb-file-format=1
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
|
@ -1653,6 +1653,21 @@ dict_create_or_check_foreign_constraint_tables(void)
|
||||
|
||||
row_mysql_lock_data_dictionary(trx);
|
||||
|
||||
DBUG_EXECUTE_IF(
|
||||
"create_and_drop_garbage",
|
||||
err = que_eval_sql(
|
||||
NULL,
|
||||
"PROCEDURE CREATE_GARBAGE_TABLE_PROC () IS\n"
|
||||
"BEGIN\n"
|
||||
"CREATE TABLE\n"
|
||||
"\"test/#sql-ib-garbage\"(ID CHAR);\n"
|
||||
"CREATE UNIQUE CLUSTERED INDEX PRIMARY"
|
||||
" ON \"test/#sql-ib-garbage\"(ID);\n"
|
||||
"END;\n", FALSE, trx);
|
||||
ut_ad(err == DB_SUCCESS);
|
||||
row_drop_table_for_mysql("test/#sql-ib-garbage", trx,
|
||||
SQLCOM_DROP_DB, true););
|
||||
|
||||
/* Check which incomplete table definition to drop. */
|
||||
|
||||
if (sys_foreign_err == DB_CORRUPTION) {
|
||||
|
@ -37,6 +37,8 @@ Created 9/17/2000 Heikki Tuuri
|
||||
#include <sql_const.h>
|
||||
#include "dict0dict.h"
|
||||
#include "dict0load.h"
|
||||
#include "dict0priv.h"
|
||||
#include "dict0boot.h"
|
||||
#include "dict0stats.h"
|
||||
#include "dict0stats_bg.h"
|
||||
#include "dict0defrag_bg.h"
|
||||
@ -3682,132 +3684,110 @@ defer:
|
||||
|
||||
info = pars_info_create();
|
||||
|
||||
pars_info_add_str_literal(info, "table_name", name);
|
||||
pars_info_add_str_literal(info, "name", name);
|
||||
|
||||
err = (sqlcom == SQLCOM_TRUNCATE) ? DB_SUCCESS : que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_FOREIGN_PROC () IS\n"
|
||||
"sys_foreign_id CHAR;\n"
|
||||
"table_id CHAR;\n"
|
||||
"foreign_id CHAR;\n"
|
||||
"space_id INT;\n"
|
||||
"found INT;\n"
|
||||
if (sqlcom != SQLCOM_TRUNCATE
|
||||
&& strchr(name, '/')
|
||||
&& dict_table_get_low("SYS_FOREIGN")
|
||||
&& dict_table_get_low("SYS_FOREIGN_COLS")) {
|
||||
err = que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_FOREIGN_PROC () IS\n"
|
||||
"fid CHAR;\n"
|
||||
|
||||
"DECLARE CURSOR cur_fk IS\n"
|
||||
"SELECT ID FROM SYS_FOREIGN\n"
|
||||
"WHERE FOR_NAME = :table_name\n"
|
||||
"AND TO_BINARY(FOR_NAME)\n"
|
||||
" = TO_BINARY(:table_name)\n"
|
||||
"LOCK IN SHARE MODE;\n"
|
||||
"DECLARE CURSOR fk IS\n"
|
||||
"SELECT ID FROM SYS_FOREIGN\n"
|
||||
"WHERE FOR_NAME = :name\n"
|
||||
"AND TO_BINARY(FOR_NAME) = TO_BINARY(:name)\n"
|
||||
"FOR UPDATE;\n"
|
||||
|
||||
"BEGIN\n"
|
||||
|
||||
"SELECT ID INTO table_id\n"
|
||||
"FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :table_name\n"
|
||||
"LOCK IN SHARE MODE;\n"
|
||||
"IF (SQL % NOTFOUND) THEN\n"
|
||||
" RETURN;\n"
|
||||
"END IF;\n"
|
||||
|
||||
"SELECT SPACE INTO space_id\n"
|
||||
"FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :table_name;\n"
|
||||
"IF (SQL % NOTFOUND) THEN\n"
|
||||
" RETURN;\n"
|
||||
"END IF;\n"
|
||||
|
||||
"found := 1;\n"
|
||||
"SELECT ID INTO sys_foreign_id\n"
|
||||
"FROM SYS_TABLES\n"
|
||||
"WHERE NAME = 'SYS_FOREIGN'\n"
|
||||
"LOCK IN SHARE MODE;\n"
|
||||
"IF (SQL % NOTFOUND) THEN\n"
|
||||
" found := 0;\n"
|
||||
"END IF;\n"
|
||||
"IF (:table_name = 'SYS_FOREIGN') THEN\n"
|
||||
" found := 0;\n"
|
||||
"END IF;\n"
|
||||
"IF (:table_name = 'SYS_FOREIGN_COLS') \n"
|
||||
"THEN\n"
|
||||
" found := 0;\n"
|
||||
"END IF;\n"
|
||||
|
||||
"OPEN cur_fk;\n"
|
||||
"WHILE found = 1 LOOP\n"
|
||||
" FETCH cur_fk INTO foreign_id;\n"
|
||||
" IF (SQL % NOTFOUND) THEN\n"
|
||||
" found := 0;\n"
|
||||
" ELSE\n"
|
||||
" DELETE FROM \n"
|
||||
" SYS_FOREIGN_COLS\n"
|
||||
" WHERE ID = foreign_id;\n"
|
||||
" DELETE FROM SYS_FOREIGN\n"
|
||||
" WHERE ID = foreign_id;\n"
|
||||
" END IF;\n"
|
||||
"END LOOP;\n"
|
||||
"CLOSE cur_fk;\n"
|
||||
|
||||
"END;\n",
|
||||
FALSE, trx);
|
||||
|
||||
if (err == DB_SUCCESS) {
|
||||
if (sqlcom != SQLCOM_TRUNCATE) {
|
||||
"BEGIN\n"
|
||||
"OPEN fk;\n"
|
||||
"WHILE 1 = 1 LOOP\n"
|
||||
" FETCH fk INTO fid;\n"
|
||||
" IF (SQL % NOTFOUND) THEN RETURN; END IF;\n"
|
||||
" DELETE FROM SYS_FOREIGN_COLS WHERE ID=fid;\n"
|
||||
" DELETE FROM SYS_FOREIGN WHERE ID=fid;\n"
|
||||
"END LOOP;\n"
|
||||
"CLOSE fk;\n"
|
||||
"END;\n", FALSE, trx);
|
||||
if (err == DB_SUCCESS) {
|
||||
info = pars_info_create();
|
||||
pars_info_add_str_literal(info, "table_name",
|
||||
name);
|
||||
pars_info_add_str_literal(info, "name", name);
|
||||
goto do_drop;
|
||||
}
|
||||
} else {
|
||||
do_drop:
|
||||
if (dict_table_get_low("SYS_VIRTUAL")) {
|
||||
err = que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_VIRTUAL_PROC () IS\n"
|
||||
"tid CHAR;\n"
|
||||
|
||||
"BEGIN\n"
|
||||
"SELECT ID INTO tid FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :name FOR UPDATE;\n"
|
||||
"IF (SQL % NOTFOUND) THEN RETURN;"
|
||||
" END IF;\n"
|
||||
"DELETE FROM SYS_VIRTUAL"
|
||||
" WHERE TABLE_ID = tid;\n"
|
||||
"END;\n", FALSE, trx);
|
||||
if (err == DB_SUCCESS) {
|
||||
info = pars_info_create();
|
||||
pars_info_add_str_literal(
|
||||
info, "name", name);
|
||||
}
|
||||
} else {
|
||||
err = DB_SUCCESS;
|
||||
}
|
||||
|
||||
err = que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_TABLE_PROC () IS\n"
|
||||
"table_id CHAR;\n"
|
||||
"space_id INT;\n"
|
||||
"index_id CHAR;\n"
|
||||
err = err == DB_SUCCESS ? que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_TABLE_PROC () IS\n"
|
||||
"tid CHAR;\n"
|
||||
"iid CHAR;\n"
|
||||
|
||||
"DECLARE CURSOR cur_idx IS\n"
|
||||
"SELECT ID FROM SYS_INDEXES\n"
|
||||
"WHERE TABLE_ID = table_id\n"
|
||||
"FOR UPDATE;\n"
|
||||
"DECLARE CURSOR cur_idx IS\n"
|
||||
"SELECT ID FROM SYS_INDEXES\n"
|
||||
"WHERE TABLE_ID = tid FOR UPDATE;\n"
|
||||
|
||||
"BEGIN\n"
|
||||
"SELECT ID, SPACE INTO table_id,space_id\n"
|
||||
"FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :table_name FOR UPDATE;\n"
|
||||
"IF (SQL % NOTFOUND) THEN\n"
|
||||
" RETURN;\n"
|
||||
"END IF;\n"
|
||||
"BEGIN\n"
|
||||
"SELECT ID INTO tid FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :name FOR UPDATE;\n"
|
||||
"IF (SQL % NOTFOUND) THEN RETURN; END IF;\n"
|
||||
|
||||
"DELETE FROM SYS_COLUMNS\n"
|
||||
"WHERE TABLE_ID = table_id;\n"
|
||||
"DELETE FROM SYS_TABLES\n"
|
||||
"WHERE NAME = :table_name;\n"
|
||||
"OPEN cur_idx;\n"
|
||||
"WHILE 1 = 1 LOOP\n"
|
||||
" FETCH cur_idx INTO iid;\n"
|
||||
" IF (SQL % NOTFOUND) THEN EXIT; END IF;\n"
|
||||
" DELETE FROM SYS_FIELDS\n"
|
||||
" WHERE INDEX_ID = iid;\n"
|
||||
" DELETE FROM SYS_INDEXES\n"
|
||||
" WHERE ID = iid AND TABLE_ID = tid;\n"
|
||||
"END LOOP;\n"
|
||||
"CLOSE cur_idx;\n"
|
||||
|
||||
"DELETE FROM SYS_TABLESPACES\n"
|
||||
"WHERE SPACE = space_id;\n"
|
||||
"DELETE FROM SYS_DATAFILES\n"
|
||||
"WHERE SPACE = space_id;\n"
|
||||
"DELETE FROM SYS_COLUMNS WHERE TABLE_ID=tid;\n"
|
||||
"DELETE FROM SYS_TABLES WHERE NAME=:name;\n"
|
||||
|
||||
"DELETE FROM SYS_VIRTUAL\n"
|
||||
"WHERE TABLE_ID = table_id;\n"
|
||||
"END;\n", FALSE, trx) : err;
|
||||
|
||||
"OPEN cur_idx;\n"
|
||||
"WHILE 1 = 1 LOOP\n"
|
||||
" FETCH cur_idx INTO index_id;\n"
|
||||
" IF (SQL % NOTFOUND) THEN\n"
|
||||
" EXIT;\n"
|
||||
" ELSE\n"
|
||||
" DELETE FROM SYS_FIELDS\n"
|
||||
" WHERE INDEX_ID = index_id;\n"
|
||||
" DELETE FROM SYS_INDEXES\n"
|
||||
" WHERE ID = index_id\n"
|
||||
" AND TABLE_ID = table_id;\n"
|
||||
" END IF;\n"
|
||||
"END LOOP;\n"
|
||||
"CLOSE cur_idx;\n"
|
||||
|
||||
"END;\n",
|
||||
FALSE, trx);
|
||||
if (err == DB_SUCCESS && table->space
|
||||
&& dict_table_get_low("SYS_TABLESPACES")
|
||||
&& dict_table_get_low("SYS_DATAFILES")) {
|
||||
info = pars_info_create();
|
||||
pars_info_add_int4_literal(info, "id",
|
||||
lint(table->space));
|
||||
err = que_eval_sql(
|
||||
info,
|
||||
"PROCEDURE DROP_SPACE_PROC () IS\n"
|
||||
"BEGIN\n"
|
||||
"DELETE FROM SYS_TABLESPACES\n"
|
||||
"WHERE SPACE = :id;\n"
|
||||
"DELETE FROM SYS_DATAFILES\n"
|
||||
"WHERE SPACE = :id;\n"
|
||||
"END;\n", FALSE, trx);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
page_no = page_nos;
|
||||
|
@ -296,7 +296,7 @@ trx_purge_add_update_undo_to_history(
|
||||
user transactions. */
|
||||
ut_ad(srv_undo_sources
|
||||
|| trx->undo_no == 0
|
||||
|| ((srv_startup_is_before_trx_rollback_phase
|
||||
|| ((srv_is_being_started
|
||||
|| trx_rollback_or_clean_is_active)
|
||||
&& purge_sys->state == PURGE_STATE_INIT)
|
||||
|| (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND
|
||||
|
Reference in New Issue
Block a user