diff options
author | unknown <aelkin/andrei@mysql1000.(none)> | 2008-03-17 20:19:04 +0200 |
---|---|---|
committer | unknown <aelkin/andrei@mysql1000.(none)> | 2008-03-17 20:19:04 +0200 |
commit | 6cf64b26d8eedae3e744335736aee44975899c19 (patch) | |
tree | d424e9a685f78ce80f25c391a47eab54eb61a7c3 /sql/share | |
parent | 1836625fb4e42b1629b59a4f070d6849da2ee434 (diff) | |
download | mariadb-git-6cf64b26d8eedae3e744335736aee44975899c19.tar.gz |
Bug #18199 PURGE BINARY LOGS fails silently with missing logs;
Bug #18453 Warning/error message if there is a mismatch between ...
There were three problems:
1. the reported lack of warnings for the BEFORE syntax of PURGE;
2. the similar lack of warnings for the TO syntax;
3. incompatible behaviour between the two in that the latter blanked out
regardlessly of presence or lack the actual file corresponding to
an index record; the former version gave up at the first mismatch.
fixed with deploying the warning's generation and synronizing logics of
purge_logs() and purge_logs_before_date().
my_stat() is called in either of two branches of purge_logs() (responsible
for the TO syntax of PURGE) similarly to how it has behaved in the BEFORE syntax.
If there is no actual binlog file, my_stat returns NULL and my_delete is
not invoked.
A critical error is reported to the user if a file from the index
could not be retrieved info about or deleted with a system error code
different than ENOENT.
sql/log.cc:
generating warning in two functions.
refining logics to call my_stat() by purge_logs() as it happens
in purge_logs_before_date().
my_delete() is called only if my_stat() ensured existance of the file.
A critical error is reported to the user if a file from the index
could not be my_stat():ed or my_delete():d with an error different
than ENOENT.
sql/share/errmsg.txt:
new error message
mysql-test/include/show_binary_logs.inc:
a new macro - shortcut of show binary logs
mysql-test/r/binlog_index.result:
new results
mysql-test/t/binlog_index.test:
a regression test for the bugs
Diffstat (limited to 'sql/share')
-rw-r--r-- | sql/share/errmsg.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 9e6cf462113..516dba1cd08 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5641,3 +5641,5 @@ ER_NAME_BECOMES_EMPTY eng "Name '%-.64s' has become ''" ER_AMBIGUOUS_FIELD_TERM eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" +ER_LOG_PURGE_NO_FILE + eng "Being purged log %s was not found" |