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
9d63b63e
Commit
9d63b63e
authored
May 20, 2020
by
Sujatha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into 10.5
parents
5ece2155
ce1c6dab
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
1 deletion
+134
-1
mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
+45
-0
mysql-test/suite/binlog/t/binlog_no_uniqfile_crash.test
mysql-test/suite/binlog/t/binlog_no_uniqfile_crash.test
+83
-0
mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
+1
-0
mysql-test/suite/rpl/include/rpl_binlog_errors.inc
mysql-test/suite/rpl/include/rpl_binlog_errors.inc
+1
-0
mysql-test/suite/rpl/r/rpl_binlog_errors.result
mysql-test/suite/rpl/r/rpl_binlog_errors.result
+1
-0
sql/log.cc
sql/log.cc
+3
-1
No files found.
mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
0 → 100644
View file @
9d63b63e
call mtr.add_suppression("Next log extension: 2147483647. Remaining log filename extensions: 0");
call mtr.add_suppression("Log filename extension number exhausted:.");
call mtr.add_suppression("Can't generate a unique log-filename");
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to generate new file name.");
call mtr.add_suppression("Could not use master-bin for logging");
"Test case verifies creation of binary log with max entension value."
RESET MASTER TO 2147483647;
show binary logs;
Log_name File_size
master-bin.2147483647 #
FOUND 1 /Next log extension: 2147483647. Remaining log filename extensions: 0./ in mysqld.1.err
CREATE DATABASE db1;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.2147483647 # Gtid # # GTID #-#-#
master-bin.2147483647 # Query # # CREATE DATABASE db1
RESET MASTER TO 2147483648;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
FOUND 1 /Turning logging off for the whole duration of the MariaDB server process/ in mysqld.1.err
"Following CREATE DATABSE db2 command will not be present in binary log"
"as binary log got closed due to ER_NO_UNIQUE_LOGFILE error."
CREATE DATABASE db2;
"RESET MASTER command fails to generate a new binary log"
"log-bin will be disabled and server needs to be restarted to"
"re-enable the binary log."
SHOW BINARY LOGS;
ERROR HY000: You are not using binary logging
# restart
show binary logs;
Log_name File_size
master-bin.000001 #
SHOW DATABASES LIKE 'db%';
Database (db%)
db1
db2
include/show_binlog_events.inc
DROP DATABASE db1;
DROP DATABASE db2;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP DATABASE db1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP DATABASE db2
mysql-test/suite/binlog/t/binlog_no_uniqfile_crash.test
0 → 100644
View file @
9d63b63e
# ==== Purpose ====
#
# Test verifies that when RESET MASTER TO # command is supplied with binlog
# extension number greater than 2147483647 the command should report
# appropriate error and binary log should be disabled. It should not result in
# a crash.
#
# ==== Implementation ====
#
# Steps:
# 0 - Verify case with max binary log extension. Max value is '2147483647'
# 1 - Confirm that SHOW BINARY LOGS displays a binary log with '2147483647'
# 2 - Verify that events are successfully written into max extension file.
# 3 - Try to create a binary log with extension greater than max allowed
# value '2147483648', verify ER_NO_UNIQUE_LOGFILE error is reported.
# 4 - Execute CREATE DATABASE db2 statement and verify server dosn't crash.
# 5 - Execute SHOW BINARY LOG command and verify that it reports
# ER_NO_BINARY_LOGGING error.
# 6 - Restart the server and verify that databse 'db2' exists and it it not
# present in the binary log.
#
# ==== References ====
#
# MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from
# _my_b_write on CREATE after RESET MASTER
#
--
source
include
/
have_log_bin
.
inc
call
mtr
.
add_suppression
(
"Next log extension: 2147483647. Remaining log filename extensions: 0"
);
call
mtr
.
add_suppression
(
"Log filename extension number exhausted:."
);
call
mtr
.
add_suppression
(
"Can't generate a unique log-filename"
);
call
mtr
.
add_suppression
(
"MYSQL_BIN_LOG::open failed to generate new file name."
);
call
mtr
.
add_suppression
(
"Could not use master-bin for logging"
);
--
echo
"Test case verifies creation of binary log with max entension value."
RESET
MASTER
TO
2147483647
;
--
source
include
/
show_binary_logs
.
inc
# Check error log for correct messages.
let
$log_error_
=
`SELECT @@GLOBAL.log_error`
;
if
(
!
$log_error_
)
{
# MySQL Server on windows is started with --console and thus
# does not know the location of its .err log, use default location
let
$log_error_
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
;
}
--
let
SEARCH_FILE
=
$log_error_
--
let
SEARCH_PATTERN
=
Next
log
extension
:
2147483647.
Remaining
log
filename
extensions
:
0.
--
source
include
/
search_pattern_in_file
.
inc
CREATE
DATABASE
db1
;
--
source
include
/
show_binlog_events
.
inc
--
error
ER_NO_UNIQUE_LOGFILE
RESET
MASTER
TO
2147483648
;
--
let
SEARCH_FILE
=
$log_error_
--
let
SEARCH_PATTERN
=
Turning
logging
off
for
the
whole
duration
of
the
MariaDB
server
process
--
source
include
/
search_pattern_in_file
.
inc
--
echo
"Following CREATE DATABSE db2 command will not be present in binary log"
--
echo
"as binary log got closed due to ER_NO_UNIQUE_LOGFILE error."
CREATE
DATABASE
db2
;
--
echo
"RESET MASTER command fails to generate a new binary log"
--
echo
"log-bin will be disabled and server needs to be restarted to"
--
echo
"re-enable the binary log."
--
error
ER_NO_BINARY_LOGGING
SHOW
BINARY
LOGS
;
--
source
include
/
restart_mysqld
.
inc
--
source
include
/
show_binary_logs
.
inc
SHOW
DATABASES
LIKE
'db%'
;
--
source
include
/
show_binlog_events
.
inc
# Cleanup
DROP
DATABASE
db1
;
DROP
DATABASE
db2
;
--
source
include
/
show_binlog_events
.
inc
mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
View file @
9d63b63e
...
...
@@ -9,6 +9,7 @@ connection master;
call mtr.add_suppression("Can't generate a unique log-filename");
call mtr.add_suppression("Writing one row to the row-based binary log failed.*");
call mtr.add_suppression("Error writing file .*");
call mtr.add_suppression("Could not use master-bin for logging");
SET @old_debug= @@global.debug_dbug;
SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data';
SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data';
...
...
mysql-test/suite/rpl/include/rpl_binlog_errors.inc
View file @
9d63b63e
...
...
@@ -49,6 +49,7 @@
call
mtr
.
add_suppression
(
"Can't generate a unique log-filename"
);
call
mtr
.
add_suppression
(
"Writing one row to the row-based binary log failed.*"
);
call
mtr
.
add_suppression
(
"Error writing file .*"
);
call
mtr
.
add_suppression
(
"Could not use master-bin for logging"
);
SET
@
old_debug
=
@@
global
.
debug_dbug
;
...
...
mysql-test/suite/rpl/r/rpl_binlog_errors.result
View file @
9d63b63e
...
...
@@ -9,6 +9,7 @@ connection master;
call mtr.add_suppression("Can't generate a unique log-filename");
call mtr.add_suppression("Writing one row to the row-based binary log failed.*");
call mtr.add_suppression("Error writing file .*");
call mtr.add_suppression("Could not use master-bin for logging");
SET @old_debug= @@global.debug_dbug;
SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data';
SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data';
...
...
sql/log.cc
View file @
9d63b63e
...
...
@@ -3614,6 +3614,8 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
LOG_BIN
,
io_cache_type_arg
))
{
sql_print_error
(
"MYSQL_BIN_LOG::open failed to generate new file name."
);
if
(
!
is_relay_log
)
goto
err
;
DBUG_RETURN
(
1
);
}
...
...
@@ -3978,7 +3980,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
purge_index_entry
(
NULL
,
NULL
,
need_mutex
);
close_purge_index_file
();
#endif
sql_print_error
(
fatal_log_error
,
name
,
tmp_errno
);
sql_print_error
(
fatal_log_error
,
(
name
)
?
name
:
log_
name
,
tmp_errno
);
if
(
new_xid_list_entry
)
delete
new_xid_list_entry
;
if
(
file
>=
0
)
...
...
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