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
0261eac5
Commit
0261eac5
authored
Jan 12, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
428b057e
017d1b86
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
7 deletions
+81
-7
cmake/pcre.cmake
cmake/pcre.cmake
+1
-0
mysql-test/main/alter_table.result
mysql-test/main/alter_table.result
+18
-0
mysql-test/main/alter_table.test
mysql-test/main/alter_table.test
+22
-0
sql/lock.cc
sql/lock.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+3
-1
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+35
-3
storage/innobase/mtr/mtr0mtr.cc
storage/innobase/mtr/mtr0mtr.cc
+1
-2
No files found.
cmake/pcre.cmake
View file @
0261eac5
...
...
@@ -48,6 +48,7 @@ MACRO(BUNDLE_PCRE2)
URL_MD5 8c1699a725d4b28410adf4b964ebbcb7
INSTALL_COMMAND
""
CMAKE_ARGS
"-DCMAKE_WARN_DEPRECATED=FALSE"
"-DPCRE2_BUILD_TESTS=OFF"
"-DPCRE2_BUILD_PCRE2GREP=OFF"
"-DBUILD_SHARED_LIBS=OFF"
...
...
mysql-test/main/alter_table.result
View file @
0261eac5
...
...
@@ -3415,5 +3415,23 @@ ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITH
delete from t1 where a = 11;
drop table t1;
#
# MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
# Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
#
SET @max_session_mem_used_save= @@max_session_mem_used;
CREATE TABLE t1 (a INT);
SELECT * FROM t1;
a
ALTER TABLE x MODIFY xx INT;
ERROR 42S02: Table 'test.x' doesn't exist
SET SESSION max_session_mem_used= 8192;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
Warnings:
Note 1054 Unknown column 'b' in 't1'
SET SESSION max_session_mem_used = @max_session_mem_used_save;
UNLOCK TABLES;
DROP TABLE t1;
#
# End of 10.5 tests
#
mysql-test/main/alter_table.test
View file @
0261eac5
...
...
@@ -2661,6 +2661,28 @@ delete from t1 where a = 11;
# cleanup
drop
table
t1
;
--
echo
#
--
echo
# MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
--
echo
# Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
--
echo
#
SET
@
max_session_mem_used_save
=
@@
max_session_mem_used
;
CREATE
TABLE
t1
(
a
INT
);
SELECT
*
FROM
t1
;
--
error
ER_NO_SUCH_TABLE
ALTER
TABLE
x
MODIFY
xx
INT
;
SET
SESSION
max_session_mem_used
=
8192
;
LOCK
TABLE
t1
WRITE
;
ALTER
TABLE
t1
CHANGE
COLUMN
IF
EXISTS
b
c
INT
;
SET
SESSION
max_session_mem_used
=
@
max_session_mem_used_save
;
UNLOCK
TABLES
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
sql/lock.cc
View file @
0261eac5
...
...
@@ -356,7 +356,7 @@ bool mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock, uint flags)
end:
THD_STAGE_INFO
(
thd
,
org_stage
);
if
(
thd
->
killed
)
if
(
thd
->
killed
&&
!
thd
->
get_stmt_da
()
->
is_ok
()
)
{
thd
->
send_kill_message
();
if
(
!
rc
)
...
...
sql/sql_base.cc
View file @
0261eac5
...
...
@@ -2616,7 +2616,9 @@ void Locked_tables_list::mark_table_for_reopen(THD *thd, TABLE *table)
bool
Locked_tables_list
::
reopen_tables
(
THD
*
thd
,
bool
need_reopen
)
{
Open_table_context
ot_ctx
(
thd
,
MYSQL_OPEN_REOPEN
);
bool
is_ok
=
thd
->
get_stmt_da
()
->
is_ok
();
Open_table_context
ot_ctx
(
thd
,
!
is_ok
?
MYSQL_OPEN_REOPEN
:
MYSQL_OPEN_IGNORE_KILLED
|
MYSQL_OPEN_REOPEN
);
uint
reopen_count
=
0
;
MYSQL_LOCK
*
lock
;
MYSQL_LOCK
*
merged_lock
;
...
...
storage/innobase/log/log0recv.cc
View file @
0261eac5
...
...
@@ -3059,6 +3059,32 @@ inline fil_space_t *fil_system_t::find(const char *path) const
return
nullptr
;
}
/** Thread-safe function which sorts flush_list by oldest_modification */
static
void
log_sort_flush_list
()
{
mysql_mutex_lock
(
&
buf_pool
.
flush_list_mutex
);
const
size_t
size
=
UT_LIST_GET_LEN
(
buf_pool
.
flush_list
);
std
::
unique_ptr
<
buf_page_t
*
[]
>
list
(
new
buf_page_t
*
[
size
]);
size_t
idx
=
0
;
for
(
buf_page_t
*
p
=
UT_LIST_GET_FIRST
(
buf_pool
.
flush_list
);
p
;
p
=
UT_LIST_GET_NEXT
(
list
,
p
))
list
.
get
()[
idx
++
]
=
p
;
std
::
sort
(
list
.
get
(),
list
.
get
()
+
size
,
[](
const
buf_page_t
*
lhs
,
const
buf_page_t
*
rhs
)
{
return
rhs
->
oldest_modification
()
<
lhs
->
oldest_modification
();
});
UT_LIST_INIT
(
buf_pool
.
flush_list
,
&
buf_page_t
::
list
);
for
(
size_t
i
=
0
;
i
<
size
;
i
++
)
UT_LIST_ADD_LAST
(
buf_pool
.
flush_list
,
list
[
i
]);
mysql_mutex_unlock
(
&
buf_pool
.
flush_list_mutex
);
}
/** Apply buffered log to persistent data pages.
@param last_batch whether it is possible to write more redo log */
void
recv_sys_t
::
apply
(
bool
last_batch
)
...
...
@@ -3254,9 +3280,15 @@ void recv_sys_t::apply(bool last_batch)
mysql_mutex_assert_not_owner
(
&
log_sys
.
mutex
);
mysql_mutex_unlock
(
&
mutex
);
/* Instead of flushing, last_batch could sort the buf_pool.flush_list
in ascending order of buf_page_t::oldest_modification. */
buf_flush_sync_batch
(
recovered_lsn
);
if
(
last_batch
&&
srv_operation
!=
SRV_OPERATION_RESTORE
&&
srv_operation
!=
SRV_OPERATION_RESTORE_EXPORT
)
log_sort_flush_list
();
else
{
/* Instead of flushing, last_batch could sort the buf_pool.flush_list
in ascending order of buf_page_t::oldest_modification. */
buf_flush_sync_batch
(
recovered_lsn
);
}
if
(
!
last_batch
)
{
...
...
storage/innobase/mtr/mtr0mtr.cc
View file @
0261eac5
/*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 202
1
, MariaDB Corporation.
Copyright (c) 2017, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -1373,7 +1373,6 @@ void mtr_t::modify(const buf_block_t &block)
{
/* This must be PageConverter::update_page() in IMPORT TABLESPACE. */
ut_ad
(
!
block
.
page
.
in_LRU_list
);
ut_ad
(
!
buf_pool
.
is_uncompressed
(
&
block
));
return
;
}
...
...
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