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
c8e309a6
Commit
c8e309a6
authored
Oct 26, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.6 into 10.7
parents
2897ef09
58fe6b47
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
1 deletion
+58
-1
mysql-test/suite/innodb/r/innodb-alter-debug.result
mysql-test/suite/innodb/r/innodb-alter-debug.result
+10
-0
mysql-test/suite/innodb/t/innodb-alter-debug.test
mysql-test/suite/innodb/t/innodb-alter-debug.test
+12
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+33
-1
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+2
-0
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+1
-0
No files found.
mysql-test/suite/innodb/r/innodb-alter-debug.result
View file @
c8e309a6
...
...
@@ -132,4 +132,14 @@ ALTER TABLE t1 RENAME KEY idx TO idx1, ALGORITHM=COPY;
disconnect con1;
connection default;
DROP TABLE t1;
#
# MDEV-26903 Assertion ctx->trx->state == TRX_STATE_ACTIVE on DROP INDEX
#
CREATE TABLE t1(a INT PRIMARY KEY, b INT, INDEX(b)) ENGINE=InnoDB;
SET @save_dbug=@@debug_dbug;
SET debug_dbug='+d,innodb_table_deadlock';
ALTER TABLE t1 DROP INDEX b, ALGORITHM=INPLACE;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET debug_dbug=@save_dbug;
DROP TABLE t1;
# End of 10.6 tests
mysql-test/suite/innodb/t/innodb-alter-debug.test
View file @
c8e309a6
...
...
@@ -177,6 +177,18 @@ disconnect con1;
connection
default
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-26903 Assertion ctx->trx->state == TRX_STATE_ACTIVE on DROP INDEX
--
echo
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
INT
,
INDEX
(
b
))
ENGINE
=
InnoDB
;
SET
@
save_dbug
=@@
debug_dbug
;
SET
debug_dbug
=
'+d,innodb_table_deadlock'
;
--
error
ER_LOCK_DEADLOCK
ALTER
TABLE
t1
DROP
INDEX
b
,
ALGORITHM
=
INPLACE
;
SET
debug_dbug
=@
save_dbug
;
DROP
TABLE
t1
;
--
echo
# End of 10.6 tests
# Wait till all disconnects are completed
...
...
storage/innobase/handler/ha_innodb.cc
View file @
c8e309a6
...
...
@@ -150,6 +150,11 @@ void close_thread_tables(THD* thd);
#include "wsrep_sst.h"
#endif
/* WITH_WSREP */
#ifdef HAVE_URING
/** The Linux kernel version if io_uring() is considered unsafe */
static
const
char
*
io_uring_may_be_unsafe
;
#endif
#define INSIDE_HA_INNOBASE_CC
#define EQ_CURRENT_THD(thd) ((thd) == current_thd)
...
...
@@ -4041,6 +4046,14 @@ static int innodb_init_params()
cases, we ignore the setting of innodb_use_native_aio. */
srv_use_native_aio
=
FALSE
;
#endif
#ifdef HAVE_URING
if
(
srv_use_native_aio
&&
io_uring_may_be_unsafe
)
{
sql_print_warning
(
"innodb_use_native_aio may cause "
"hangs with this kernel %s; see "
"https://jira.mariadb.org/browse/MDEV-26674"
,
io_uring_may_be_unsafe
);
}
#endif
#ifndef _WIN32
ut_ad
(
srv_file_flush_method
<=
SRV_O_DIRECT_NO_FSYNC
);
...
...
@@ -19401,10 +19414,29 @@ static MYSQL_SYSVAR_STR(version, innodb_version_str,
PLUGIN_VAR_NOCMDOPT
|
PLUGIN_VAR_READONLY
,
"InnoDB version"
,
NULL
,
NULL
,
INNODB_VERSION_STR
);
#ifdef HAVE_URING
# include <sys/utsname.h>
static
utsname
uname_for_io_uring
;
#endif
static
bool
innodb_use_native_aio_default
()
{
#ifdef HAVE_URING
utsname
&
u
=
uname_for_io_uring
;
if
(
!
uname
(
&
u
)
&&
u
.
release
[
0
]
==
'5'
&&
u
.
release
[
1
]
==
'.'
&&
u
.
release
[
2
]
==
'1'
&&
u
.
release
[
3
]
>
'0'
&&
u
.
release
[
3
]
<
'6'
)
{
io_uring_may_be_unsafe
=
u
.
release
;
return
false
;
/* working around io_uring hangs (MDEV-26674) */
}
#endif
return
true
;
}
static
MYSQL_SYSVAR_BOOL
(
use_native_aio
,
srv_use_native_aio
,
PLUGIN_VAR_NOCMDARG
|
PLUGIN_VAR_READONLY
,
"Use native AIO if supported on this platform."
,
NULL
,
NULL
,
TRUE
);
NULL
,
NULL
,
innodb_use_native_aio_default
()
);
#ifdef HAVE_LIBNUMA
static
MYSQL_SYSVAR_BOOL
(
numa_interleave
,
srv_numa_interleave
,
...
...
storage/innobase/handler/handler0alter.cc
View file @
c8e309a6
...
...
@@ -8678,6 +8678,8 @@ inline bool rollback_inplace_alter_table(Alter_inplace_info *ha_alter_info,
/* If we have not started a transaction yet,
(almost) nothing has been or needs to be done. */
dict_sys
.
lock
(
SRW_LOCK_CALL
);
else
if
(
ctx
->
trx
->
state
==
TRX_STATE_NOT_STARTED
)
goto
free_and_exit
;
else
if
(
ctx
->
new_table
)
{
ut_ad
(
ctx
->
trx
->
state
==
TRX_STATE_ACTIVE
);
...
...
storage/innobase/lock/lock0lock.cc
View file @
c8e309a6
...
...
@@ -3433,6 +3433,7 @@ lock_table_other_has_incompatible(
static
dberr_t
lock_table_low
(
dict_table_t
*
table
,
lock_mode
mode
,
que_thr_t
*
thr
,
trx_t
*
trx
)
{
DBUG_EXECUTE_IF
(
"innodb_table_deadlock"
,
return
DB_DEADLOCK
;);
lock_t
*
wait_for
=
lock_table_other_has_incompatible
(
trx
,
LOCK_WAIT
,
table
,
mode
);
dberr_t
err
=
DB_SUCCESS
;
...
...
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