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
12995559
Commit
12995559
authored
Dec 19, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
476ff092
eaa4968f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
9 deletions
+70
-9
client/mysql_upgrade.c
client/mysql_upgrade.c
+6
-1
mysql-test/main/mysql_upgrade_file_leak.result
mysql-test/main/mysql_upgrade_file_leak.result
+4
-0
mysql-test/main/mysql_upgrade_file_leak.test
mysql-test/main/mysql_upgrade_file_leak.test
+24
-0
mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
+7
-0
mysql-test/suite/rpl/r/rpl_gtid_basic.result
mysql-test/suite/rpl/r/rpl_gtid_basic.result
+7
-0
mysql-test/suite/rpl/t/rpl_gtid_basic.test
mysql-test/suite/rpl/t/rpl_gtid_basic.test
+7
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+3
-3
sql/rpl_parallel.cc
sql/rpl_parallel.cc
+5
-4
sql/slave.cc
sql/slave.cc
+7
-1
No files found.
client/mysql_upgrade.c
View file @
12995559
...
...
@@ -1462,7 +1462,12 @@ int main(int argc, char **argv)
open_mysql_upgrade_file
();
if
(
opt_check_upgrade
)
exit
(
upgrade_already_done
(
0
)
==
0
);
{
int
upgrade_needed
=
upgrade_already_done
(
0
);
free_used_memory
();
my_end
(
my_end_arg
);
exit
(
upgrade_needed
==
0
);
}
/* Find mysqlcheck */
find_tool
(
mysqlcheck_path
,
IF_WIN
(
"mariadb-check.exe"
,
"mariadb-check"
),
self_name
);
...
...
mysql-test/main/mysql_upgrade_file_leak.result
0 → 100644
View file @
12995559
Running mysql_upgrade with --check-if-upgrade-is-needed
Checking for absence of temporary files by mysql_upgrade
No temporary files found
End of 10.4 tests
mysql-test/main/mysql_upgrade_file_leak.test
0 → 100644
View file @
12995559
--
source
include
/
mysql_upgrade_preparation
.
inc
#
# MDEV-31925 mysqld_upgrade --check-if-upgrade-is-needed leaks files
#
# Run mysql_upgrade with --check-if-upgrade-is-needed
--
echo
Running
mysql_upgrade
with
--
check
-
if
-
upgrade
-
is
-
needed
--
exec
$MYSQL_UPGRADE
--
check
-
if
-
upgrade
-
is
-
needed
2
>&
1
# Check if temporary files related to mysql_upgrade are cleared
--
echo
Checking
for
absence
of
temporary
files
by
mysql_upgrade
--
perl
# Use the temporary directory path from the MySQL configuration
my
$tmpdir
=
"
$ENV
{
MYSQL_TMP_DIR
}
"
;
die
"Test failed: Found temporary file left by mysql_upgrade
\n
"
if
(
glob
(
"
$tmpdir
/mysql_upgrade-*"
));
print
"No temporary files found
\n
"
;
EOF
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
remove_file
$MYSQLD_DATADIR
/
mysql_upgrade_info
--
echo
End
of
10.4
tests
mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
View file @
12995559
...
...
@@ -182,6 +182,13 @@ BINLOG_GTID_POS('master-bin.000001',18446744073709551616)
NULL
Warnings:
Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated
SET sql_log_bin= 0;
CREATE TABLE t1 AS SELECT MASTER_POS_WAIT(@binlog_file, 4, 0);
SELECT BINLOG_GTID_POS(@binlog_file, 4);
BINLOG_GTID_POS(@binlog_file, 4)
NULL
DROP TABLE t1;
SET sql_log_bin= 1;
*** Some tests of @@GLOBAL.gtid_binlog_state ***
connection server_2;
include/sync_with_master_gtid.inc
...
...
mysql-test/suite/rpl/r/rpl_gtid_basic.result
View file @
12995559
...
...
@@ -182,6 +182,13 @@ BINLOG_GTID_POS('master-bin.000001',18446744073709551616)
NULL
Warnings:
Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated
SET sql_log_bin= 0;
CREATE TABLE t1 AS SELECT MASTER_POS_WAIT(@binlog_file, 4, 0);
SELECT BINLOG_GTID_POS(@binlog_file, 4);
BINLOG_GTID_POS(@binlog_file, 4)
NULL
DROP TABLE t1;
SET sql_log_bin= 1;
*** Some tests of @@GLOBAL.gtid_binlog_state ***
connection server_2;
include/sync_with_master_gtid.inc
...
...
mysql-test/suite/rpl/t/rpl_gtid_basic.test
View file @
12995559
...
...
@@ -162,6 +162,13 @@ eval SELECT BINLOG_GTID_POS('$valid_binlog_name',0);
eval
SELECT
BINLOG_GTID_POS
(
'$valid_binlog_name'
,
18446744073709551615
);
eval
SELECT
BINLOG_GTID_POS
(
'$valid_binlog_name'
,
18446744073709551616
);
# MDEV-33045: Server crashes in Item_func_binlog_gtid_pos::val_str / Binary_string::c_ptr_safe
SET
sql_log_bin
=
0
;
CREATE
TABLE
t1
AS
SELECT
MASTER_POS_WAIT
(
@
binlog_file
,
4
,
0
);
SELECT
BINLOG_GTID_POS
(
@
binlog_file
,
4
);
DROP
TABLE
t1
;
SET
sql_log_bin
=
1
;
--
echo
***
Some
tests
of
@@
GLOBAL
.
gtid_binlog_state
***
--
connection
server_2
...
...
sql/item_strfunc.cc
View file @
12995559
...
...
@@ -3213,12 +3213,12 @@ String *Item_func_binlog_gtid_pos::val_str(String *str)
String
name_str
,
*
name
;
longlong
pos
;
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
)
goto
err
;
name
=
args
[
0
]
->
val_str
(
&
name_str
);
pos
=
args
[
1
]
->
val_int
();
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
)
goto
err
;
if
(
pos
<
0
||
pos
>
UINT_MAX32
)
goto
err
;
...
...
sql/rpl_parallel.cc
View file @
12995559
...
...
@@ -862,8 +862,7 @@ retry_event_group(rpl_group_info *rgi, rpl_parallel_thread *rpt,
thd
->
wait_for_commit_ptr
->
unregister_wait_for_prior_commit
();
DBUG_EXECUTE_IF
(
"inject_mdev8031"
,
{
/* Simulate that we get deadlock killed at this exact point. */
rgi
->
killed_for_retry
=
rpl_group_info
::
RETRY_KILL_KILLED
;
thd
->
set_killed
(
KILL_CONNECTION
);
slave_background_kill_request
(
thd
);
});
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF
(
"rpl_parallel_simulate_wait_at_retry"
,
{
...
...
@@ -2567,8 +2566,10 @@ rpl_parallel::stop_during_until()
bool
rpl_parallel
::
workers_idle
(
Relay_log_info
*
rli
)
{
return
rli
->
last_inuse_relaylog
->
queued_count
==
rli
->
last_inuse_relaylog
->
dequeued_count
;
mysql_mutex_assert_owner
(
&
rli
->
data_lock
);
return
!
rli
->
last_inuse_relaylog
||
rli
->
last_inuse_relaylog
->
queued_count
==
rli
->
last_inuse_relaylog
->
dequeued_count
;
}
...
...
sql/slave.cc
View file @
12995559
...
...
@@ -5426,19 +5426,25 @@ pthread_handler_t handle_slave_sql(void *arg)
}
else
rli
->
gtid_skip_flag
=
GTID_SKIP_NOT
;
mysql_mutex_lock
(
&
rli
->
data_lock
);
if
(
init_relay_log_pos
(
rli
,
rli
->
group_relay_log_name
,
rli
->
group_relay_log_pos
,
1
/*need data lock*/
,
&
errmsg
,
0
/*need data lock*/
,
&
errmsg
,
1
/*look for a description_event*/
))
{
rli
->
report
(
ERROR_LEVEL
,
ER_SLAVE_FATAL_ERROR
,
NULL
,
"Error initializing relay log position: %s"
,
errmsg
);
mysql_mutex_unlock
(
&
rli
->
data_lock
);
goto
err_before_start
;
}
rli
->
reset_inuse_relaylog
();
if
(
rli
->
alloc_inuse_relaylog
(
rli
->
group_relay_log_name
))
{
mysql_mutex_unlock
(
&
rli
->
data_lock
);
goto
err_before_start
;
}
mysql_mutex_unlock
(
&
rli
->
data_lock
);
strcpy
(
rli
->
future_event_master_log_name
,
rli
->
group_master_log_name
);
THD_CHECK_SENTRY
(
thd
);
...
...
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