Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-20 12:39:43+02:00, jonas@stripped +4 -0
ndb -
Add better error message if getting error in RESTORE
storage/ndb/include/mgmapi/ndbd_exit_codes.h@stripped, 2006-10-20 12:39:41+02:00,
jonas@stripped +2 -0
Add better error message for problems in RESTORE
storage/ndb/src/kernel/blocks/restore.cpp@stripped, 2006-10-20 12:39:41+02:00,
jonas@stripped +15 -3
Add better error message for problems in RESTORE
storage/ndb/src/kernel/blocks/restore.hpp@stripped, 2006-10-20 12:39:41+02:00,
jonas@stripped +2 -1
Add better error message for problems in RESTORE
storage/ndb/src/kernel/error/ndbd_exit_codes.c@stripped, 2006-10-20 12:39:41+02:00,
jonas@stripped +3 -1
Add better error message for problems in RESTORE
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-work
--- 1.8/storage/ndb/src/kernel/blocks/restore.cpp 2006-10-20 12:39:47 +02:00
+++ 1.9/storage/ndb/src/kernel/blocks/restore.cpp 2006-10-20 12:39:47 +02:00
@@ -242,7 +242,7 @@
break;
}
- open_file(signal, file_ptr, req->lcpNo);
+ open_file(signal, file_ptr);
return;
} while(0);
@@ -265,6 +265,7 @@
file_ptr.p->m_file_type = BackupFormat::LCP_FILE;
file_ptr.p->m_status = File::FIRST_READ;
+ file_ptr.p->m_lcp_no = req->lcpNo;
file_ptr.p->m_table_id = req->tableId;
file_ptr.p->m_fragment_id = req->fragmentId;
file_ptr.p->m_table_version = RNIL;
@@ -352,7 +353,7 @@
}
void
-Restore::open_file(Signal* signal, FilePtr file_ptr, Uint32 lcpNo)
+Restore::open_file(Signal* signal, FilePtr file_ptr)
{
FsOpenReq * req = (FsOpenReq *)signal->getDataPtrSend();
req->userReference = reference();
@@ -361,7 +362,7 @@
FsOpenReq::setVersion(req->fileNumber, 5);
FsOpenReq::setSuffix(req->fileNumber, FsOpenReq::S_DATA);
- FsOpenReq::v5_setLcpNo(req->fileNumber, lcpNo);
+ FsOpenReq::v5_setLcpNo(req->fileNumber, file_ptr.p->m_lcp_no);
FsOpenReq::v5_setTableId(req->fileNumber, file_ptr.p->m_table_id);
FsOpenReq::v5_setFragmentId(req->fileNumber, file_ptr.p->m_fragment_id);
sendSignal(NDBFS_REF, GSN_FSOPENREQ, signal, FsOpenReq::SignalLength, JBA);
@@ -1216,6 +1217,17 @@
Restore::parse_error(Signal* signal,
FilePtr file_ptr, Uint32 line, Uint32 extra)
{
+ char buf[255], name[100];
+ BaseString::snprintf(name, sizeof(name), "%u/T%dF%d",
+ file_ptr.p->m_lcp_no,
+ file_ptr.p->m_table_id,
+ file_ptr.p->m_fragment_id);
+
+ BaseString::snprintf(buf, sizeof(buf),
+ "Parse error in file: %s, extra: %d",
+ name, extra);
+
+ progError(line, NDBD_EXIT_INVALID_LCP_FILE, buf);
ndbrequire(false);
}
--- 1.5/storage/ndb/src/kernel/blocks/restore.hpp 2006-10-20 12:39:47 +02:00
+++ 1.6/storage/ndb/src/kernel/blocks/restore.hpp 2006-10-20 12:39:47 +02:00
@@ -116,6 +116,7 @@
Uint32 nextList;
Uint32 prevList;
Uint32 nextPool;
+ Uint32 m_lcp_no;
bool is_lcp() const { return m_file_type == BackupFormat::LCP_FILE;}
};
@@ -124,7 +125,7 @@
Uint32 init_file(const struct RestoreLcpReq*, FilePtr);
void release_file(FilePtr);
- void open_file(Signal*, FilePtr, Uint32 lcpNo);
+ void open_file(Signal*, FilePtr);
void read_file(Signal*, FilePtr);
void restore_next(Signal*, FilePtr);
void parse_file_header(Signal*, FilePtr, const Uint32*, Uint32 len);
--- 1.12/storage/ndb/include/mgmapi/ndbd_exit_codes.h 2006-10-20 12:39:47 +02:00
+++ 1.13/storage/ndb/include/mgmapi/ndbd_exit_codes.h 2006-10-20 12:39:47 +02:00
@@ -146,6 +146,8 @@
#define NDBD_EXIT_AFS_NO_SUCH_FILE 2815
#define NDBD_EXIT_AFS_READ_UNDERFLOW 2816
+#define NDBD_EXIT_INVALID_LCP_FILE 2352
+
const char *
ndbd_exit_message(int faultId, ndbd_exit_classification *cl);
const char *
--- 1.13/storage/ndb/src/kernel/error/ndbd_exit_codes.c 2006-10-20 12:39:47 +02:00
+++ 1.14/storage/ndb/src/kernel/error/ndbd_exit_codes.c 2006-10-20 12:39:47 +02:00
@@ -158,7 +158,9 @@
"System reports no more file system resources"},
{NDBD_EXIT_AFS_NO_SUCH_FILE , XFI, "File not found"},
{NDBD_EXIT_AFS_READ_UNDERFLOW , XFI, "Read underflow"},
-
+
+ {NDBD_EXIT_INVALID_LCP_FILE, XFI, "Invalid LCP" },
+
/* Sentinel */
{0, XUE,
"No message slogan found (please report a bug if you get this error code)"}
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2315) | jonas | 20 Oct |