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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d78158f4
Commit
d78158f4
authored
Jul 22, 2008
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
bb827398
6334196b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
43 deletions
+95
-43
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/disabled.def
+1
-1
sql/log.cc
sql/log.cc
+94
-42
No files found.
mysql-test/suite/rpl/t/disabled.def
View file @
d78158f4
...
...
@@ -12,4 +12,4 @@
rpl_redirect : Failure is sporadic and and the test is superfluous (mats)
rpl_innodb_bug28430 : Failure on Solaris Bug #36793
rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild
sql/log.cc
View file @
d78158f4
...
...
@@ -3070,6 +3070,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
int
ret
=
0
;
bool
exit_loop
=
0
;
LOG_INFO
log_info
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"purge_logs"
);
DBUG_PRINT
(
"info"
,(
"to_log= %s"
,
to_log
));
...
...
@@ -3096,9 +3097,12 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
It's not fatal if we can't stat a log file that does not exist;
If we could not stat, we won't delete.
*/
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
}
sql_print_information
(
"Failed to execute my_stat on file '%s'"
,
log_info
.
log_file_name
);
my_errno
=
0
;
...
...
@@ -3108,13 +3112,24 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
/*
Other than ENOENT are fatal
*/
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
else
{
sql_print_information
(
"Failed to delete log file '%s'; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
error
=
LOG_INFO_FATAL
;
goto
err
;
}
...
...
@@ -3131,27 +3146,42 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
{
if
(
my_errno
==
ENOENT
)
{
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
}
sql_print_information
(
"Failed to delete file '%s'"
,
log_info
.
log_file_name
);
my_errno
=
0
;
}
else
{
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with deleting %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with deleting %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
else
{
sql_print_information
(
"Failed to delete file '%s'; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
if
(
my_errno
==
EMFILE
)
{
DBUG_PRINT
(
"info"
,
(
"my_errno: %d, set ret = LOG_INFO_EMFILE"
,
my_errno
));
error
=
LOG_INFO_EMFILE
;
goto
err
;
}
error
=
LOG_INFO_FATAL
;
goto
err
;
...
...
@@ -3204,7 +3234,7 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
int
error
;
LOG_INFO
log_info
;
MY_STAT
stat_area
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"purge_logs_before_date"
);
pthread_mutex_lock
(
&
LOCK_index
);
...
...
@@ -3226,10 +3256,13 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
{
/*
It's not fatal if we can't stat a log file that does not exist.
*/
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
*/
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
}
sql_print_information
(
"Failed to execute my_stat on file '%s'"
,
log_info
.
log_file_name
);
my_errno
=
0
;
...
...
@@ -3239,13 +3272,21 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
/*
Other than ENOENT are fatal
*/
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
else
{
sql_print_information
(
"Failed to delete log file '%s'"
,
log_info
.
log_file_name
);
}
error
=
LOG_INFO_FATAL
;
goto
err
;
}
...
...
@@ -3259,22 +3300,33 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
if
(
my_errno
==
ENOENT
)
{
/* It's not fatal even if we can't delete a log file */
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_LOG_PURGE_NO_FILE
,
ER
(
ER_LOG_PURGE_NO_FILE
),
log_info
.
log_file_name
);
}
sql_print_information
(
"Failed to delete file '%s'"
,
log_info
.
log_file_name
);
my_errno
=
0
;
}
else
{
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with deleting %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_BINLOG_PURGE_FATAL_ERR
,
"a problem with deleting %s; "
"consider examining correspondence "
"of your binlog index file "
"to the actual binlog files"
,
log_info
.
log_file_name
);
}
else
{
sql_print_information
(
"Failed to delete log file '%s'"
,
log_info
.
log_file_name
);
}
error
=
LOG_INFO_FATAL
;
goto
err
;
}
...
...
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