summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <dli@dev3-76.dev.cn.tlan>2006-10-13 12:48:05 +0800
committerunknown <dli@dev3-76.dev.cn.tlan>2006-10-13 12:48:05 +0800
commit3def506b9db15adfecb2d7745f505e4131089692 (patch)
tree20505554637f19fe6fde8813a69d4207b4f66237 /mysys
parent994ce8f209e1aebcb1fc4874119bebfd3bbd0013 (diff)
downloadmariadb-git-3def506b9db15adfecb2d7745f505e4131089692.tar.gz
ndb - fixed for BUG#15021, binlog_index table become inconsistent if errors during purge of binlogs.
if EMFILE error occured while purging binary logs, stop purging logs and report error message to user. mysys/my_open.c: report EMFILE error when opening file failed. sql/log.cc: report EMFILE error when purging logs, and stop purging logs when EMFILE error occured. sql/log.h: added LOG_INFO_EMFILE error number. sql/share/errmsg.txt: added EMFILE error message for purging binary logs. sql/sql_repl.cc: added EMFILE error message. sql/table.cc: report EMFILE error.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_open.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c
index ab2f7c9ff27..a023a5ebe63 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -167,9 +167,17 @@ File my_register_filename(File fd, const char *FileName, enum file_type
else
my_errno=errno;
DBUG_PRINT("error",("Got error %d on open",my_errno));
- if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
- my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG),
+ if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) {
+ if (my_errno == EMFILE) {
+ DBUG_PRINT("error",("print err: %d",EE_OUT_OF_FILERESOURCES));
+ my_error(EE_OUT_OF_FILERESOURCES, MYF(ME_BELL+ME_WAITTANG),
FileName, my_errno);
+ } else {
+ DBUG_PRINT("error",("print err: %d",error_message_number));
+ my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG),
+ FileName, my_errno);
+ }
+ }
return(fd);
}