1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Sergei Petrunia
2023-04-14 17:40:41 +03:00
376 changed files with 13245 additions and 7395 deletions

View File

@@ -1817,6 +1817,11 @@ static void cleanup()
my_free_open_file_info();
load_processor.destroy();
mysql_server_end();
if (opt_flashback)
{
delete_dynamic(&binlog_events);
delete_dynamic(&events_in_stmt);
}
DBUG_VOID_RETURN;
}
@@ -1904,11 +1909,11 @@ static void extend_main_gtid_event_filter(Gtid_event_filter *new_filter)
}
}
static void die()
static void die(int err)
{
cleanup();
my_end(MY_DONT_FREE_DBUG);
exit(1);
exit(err);
}
@@ -1939,7 +1944,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
l_time.time_type != MYSQL_TIMESTAMP_DATETIME || status.warnings)
{
error("Incorrect date and time argument: %s", str);
die();
die(1);
}
/*
Note that Feb 30th, Apr 31st cause no error messages and are mapped to
@@ -2110,7 +2115,7 @@ get_one_option(const struct my_option *opt, const char *argument, const char *fi
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
die();
die(1);
}
/* Specification of protocol via CLI trumps implicit overrides */
@@ -2139,7 +2144,7 @@ get_one_option(const struct my_option *opt, const char *argument, const char *fi
opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
die();
die(1);
}
opt_base64_output_mode= (enum_base64_output_mode)(val - 1);
break;
@@ -2289,7 +2294,7 @@ static int parse_args(int *argc, char*** argv)
if ((ho_error=handle_options(argc, argv, my_options, get_one_option)))
{
die();
die(ho_error);
}
if (debug_info_flag)
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
@@ -2322,7 +2327,7 @@ static int parse_args(int *argc, char*** argv)
quit in error. Note that any specific error messages will have
already been written.
*/
die();
die(1);
}
extend_main_gtid_event_filter(position_gtid_filter);
@@ -3278,6 +3283,12 @@ int main(int argc, char** argv)
my_set_max_open_files(open_files_limit);
if (opt_flashback && opt_raw_mode)
{
error("The --raw mode is not allowed with --flashback mode");
die(1);
}
if (opt_flashback)
{
my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &binlog_events,
@@ -3293,7 +3304,7 @@ int main(int argc, char** argv)
if (!remote_opt)
{
error("The --raw mode only works with --read-from-remote-server");
die();
die(1);
}
if (one_database)
warning("The --database option is ignored in raw mode");
@@ -3315,7 +3326,7 @@ int main(int argc, char** argv)
O_WRONLY | O_BINARY, MYF(MY_WME))))
{
error("Could not create log file '%s'", result_file_name);
die();
die(1);
}
}
else
@@ -3404,7 +3415,7 @@ int main(int argc, char** argv)
/* Set delimiter back to semicolon */
if (retval != ERROR_STOP)
{
if (!stop_event_string.is_empty())
if (!stop_event_string.is_empty() && result_file)
fprintf(result_file, "%s", stop_event_string.ptr());
if (!opt_raw_mode && opt_flashback)
fprintf(result_file, "DELIMITER ;\n");