Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d9a5c5db
Commit
d9a5c5db
authored
Nov 12, 2021
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.6' into 10.7
parents
06988bdc
e58a312e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
15 deletions
+27
-15
mysql-test/suite/innodb/r/import_bugs.result
mysql-test/suite/innodb/r/import_bugs.result
+8
-0
mysql-test/suite/innodb/t/import_bugs.test
mysql-test/suite/innodb/t/import_bugs.test
+9
-0
storage/innobase/fsp/fsp0fsp.cc
storage/innobase/fsp/fsp0fsp.cc
+1
-12
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+1
-3
storage/myisam/mi_delete.c
storage/myisam/mi_delete.c
+8
-0
No files found.
mysql-test/suite/innodb/r/import_bugs.result
View file @
d9a5c5db
...
...
@@ -10,3 +10,11 @@ ALTER TABLE imp_t1 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (ROW_FORMAT mismatch)
DROP TABLE imp_t1, t1;
SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
#
# MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)' --echo # failed in dberr_t row_discard_tablespace_for_mysql
# (dict_table_t*, trx_t*)
CREATE TABLE t1 (c INT KEY) ENGINE=INNODB;
CREATE TABLE t2 (c INT KEY,FOREIGN KEY(c) REFERENCES t1 (c)) ENGINE=INNODB;
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
DROP TABLE t2, t1;
mysql-test/suite/innodb/t/import_bugs.test
View file @
d9a5c5db
...
...
@@ -18,3 +18,12 @@ DROP TABLE imp_t1, t1;
--
remove_file
$datadir
/
test
/
imp_t1
.
ibd
SET
GLOBAL
innodb_checksum_algorithm
=@
save_innodb_checksum_algorithm
;
--
echo
#
--
echo
# MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)' --echo # failed in dberr_t row_discard_tablespace_for_mysql
--
echo
# (dict_table_t*, trx_t*)
CREATE
TABLE
t1
(
c
INT
KEY
)
ENGINE
=
INNODB
;
CREATE
TABLE
t2
(
c
INT
KEY
,
FOREIGN
KEY
(
c
)
REFERENCES
t1
(
c
))
ENGINE
=
INNODB
;
--
error
ER_ROW_IS_REFERENCED_2
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
DROP
TABLE
t2
,
t1
;
storage/innobase/fsp/fsp0fsp.cc
View file @
d9a5c5db
...
...
@@ -1709,18 +1709,7 @@ fseg_create(fil_space_t *space, ulint byte_offset, mtr_t *mtr,
mtr
->
x_lock_space
(
space
);
ut_d
(
space
->
modify_check
(
*
mtr
));
if
(
block
)
{
ut_ad
(
block
->
page
.
id
().
space
()
==
space
->
id
);
if
(
!
space
->
full_crc32
())
{
fil_block_check_type
(
*
block
,
block
->
page
.
id
()
==
page_id_t
(
TRX_SYS_SPACE
,
TRX_SYS_PAGE_NO
)
?
FIL_PAGE_TYPE_TRX_SYS
:
FIL_PAGE_TYPE_SYS
,
mtr
);
}
}
ut_ad
(
!
block
||
block
->
page
.
id
().
space
()
==
space
->
id
);
if
(
!
has_done_reservation
&&
!
fsp_reserve_free_extents
(
&
n_reserved
,
space
,
2
,
...
...
storage/innobase/row/row0mysql.cc
View file @
d9a5c5db
...
...
@@ -2495,6 +2495,7 @@ dberr_t row_discard_tablespace_for_mysql(dict_table_t *table, trx_t *trx)
fts_optimize_add_table
(
table
);
}
trx
->
rollback
();
row_mysql_unlock_data_dictionary
(
trx
);
return
err
;
}
}
...
...
@@ -2508,10 +2509,7 @@ dberr_t row_discard_tablespace_for_mysql(dict_table_t *table, trx_t *trx)
err
=
row_discard_tablespace_foreign_key_checks
(
trx
,
table
);
if
(
err
!=
DB_SUCCESS
)
{
row_mysql_unlock_data_dictionary
(
trx
);
goto
rollback
;
}
/* Note: The following cannot be rolled back. Rollback would see the
UPDATE of SYS_INDEXES.TABLE_ID as two operations: DELETE and INSERT.
...
...
storage/myisam/mi_delete.c
View file @
d9a5c5db
...
...
@@ -767,6 +767,10 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
returns how many chars was removed or 0 on error
*/
#if defined(_MSC_VER) && defined(_M_X64) && _MSC_VER >= 1930
#pragma optimize("g", off)
#endif
static
uint
remove_key
(
MI_KEYDEF
*
keyinfo
,
uint
nod_flag
,
uchar
*
keypos
,
/* Where key starts */
uchar
*
lastkey
,
/* key to be removed */
...
...
@@ -891,3 +895,7 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
(
uint
)
(
page_end
-
start
-
s_length
));
DBUG_RETURN
((
uint
)
s_length
);
}
/* remove_key */
#if defined(_MSC_VER) && defined(_M_X64) && _MSC_VER >= 1930
#pragma optimize("",on)
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment