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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d54d43b6
Commit
d54d43b6
authored
Oct 20, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
Add better error message if getting error in RESTORE
parent
4df13366
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
storage/ndb/include/mgmapi/ndbd_exit_codes.h
storage/ndb/include/mgmapi/ndbd_exit_codes.h
+2
-0
storage/ndb/src/kernel/blocks/restore.cpp
storage/ndb/src/kernel/blocks/restore.cpp
+15
-3
storage/ndb/src/kernel/blocks/restore.hpp
storage/ndb/src/kernel/blocks/restore.hpp
+2
-1
storage/ndb/src/kernel/error/ndbd_exit_codes.c
storage/ndb/src/kernel/error/ndbd_exit_codes.c
+3
-1
No files found.
storage/ndb/include/mgmapi/ndbd_exit_codes.h
View file @
d54d43b6
...
...
@@ -146,6 +146,8 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#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
*
...
...
storage/ndb/src/kernel/blocks/restore.cpp
View file @
d54d43b6
...
...
@@ -242,7 +242,7 @@ Restore::execRESTORE_LCP_REQ(Signal* signal){
break
;
}
open_file
(
signal
,
file_ptr
,
req
->
lcpNo
);
open_file
(
signal
,
file_ptr
);
return
;
}
while
(
0
);
...
...
@@ -265,6 +265,7 @@ Restore::init_file(const RestoreLcpReq* req, FilePtr file_ptr)
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 @@ Restore::release_file(FilePtr file_ptr)
}
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 @@ Restore::open_file(Signal* signal, FilePtr file_ptr, Uint32 lcpNo)
FsOpenReq
::
setVersion
(
req
->
fileNumber
,
5
);
FsOpenReq
::
setSuffix
(
req
->
fileNumber
,
FsOpenReq
::
S_DATA
);
FsOpenReq
::
v5_setLcpNo
(
req
->
fileNumber
,
lcpN
o
);
FsOpenReq
::
v5_setLcpNo
(
req
->
fileNumber
,
file_ptr
.
p
->
m_lcp_n
o
);
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 @@ void
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
);
}
...
...
storage/ndb/src/kernel/blocks/restore.hpp
View file @
d54d43b6
...
...
@@ -116,6 +116,7 @@ private:
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 @@ private:
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
);
...
...
storage/ndb/src/kernel/error/ndbd_exit_codes.c
View file @
d54d43b6
...
...
@@ -158,7 +158,9 @@ static const ErrStruct errArray[] =
"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)"
}
...
...
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