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
151af6b4
Commit
151af6b4
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
a05e44b8
Changes
4
Show 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 @
151af6b4
...
@@ -146,6 +146,8 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
...
@@ -146,6 +146,8 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_AFS_NO_SUCH_FILE 2815
#define NDBD_EXIT_AFS_NO_SUCH_FILE 2815
#define NDBD_EXIT_AFS_READ_UNDERFLOW 2816
#define NDBD_EXIT_AFS_READ_UNDERFLOW 2816
#define NDBD_EXIT_INVALID_LCP_FILE 2352
const
char
*
const
char
*
ndbd_exit_message
(
int
faultId
,
ndbd_exit_classification
*
cl
);
ndbd_exit_message
(
int
faultId
,
ndbd_exit_classification
*
cl
);
const
char
*
const
char
*
...
...
storage/ndb/src/kernel/blocks/restore.cpp
View file @
151af6b4
...
@@ -242,7 +242,7 @@ Restore::execRESTORE_LCP_REQ(Signal* signal){
...
@@ -242,7 +242,7 @@ Restore::execRESTORE_LCP_REQ(Signal* signal){
break
;
break
;
}
}
open_file
(
signal
,
file_ptr
,
req
->
lcpNo
);
open_file
(
signal
,
file_ptr
);
return
;
return
;
}
while
(
0
);
}
while
(
0
);
...
@@ -265,6 +265,7 @@ Restore::init_file(const RestoreLcpReq* req, FilePtr file_ptr)
...
@@ -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_file_type
=
BackupFormat
::
LCP_FILE
;
file_ptr
.
p
->
m_status
=
File
::
FIRST_READ
;
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_table_id
=
req
->
tableId
;
file_ptr
.
p
->
m_fragment_id
=
req
->
fragmentId
;
file_ptr
.
p
->
m_fragment_id
=
req
->
fragmentId
;
file_ptr
.
p
->
m_table_version
=
RNIL
;
file_ptr
.
p
->
m_table_version
=
RNIL
;
...
@@ -352,7 +353,7 @@ Restore::release_file(FilePtr file_ptr)
...
@@ -352,7 +353,7 @@ Restore::release_file(FilePtr file_ptr)
}
}
void
void
Restore
::
open_file
(
Signal
*
signal
,
FilePtr
file_ptr
,
Uint32
lcpNo
)
Restore
::
open_file
(
Signal
*
signal
,
FilePtr
file_ptr
)
{
{
FsOpenReq
*
req
=
(
FsOpenReq
*
)
signal
->
getDataPtrSend
();
FsOpenReq
*
req
=
(
FsOpenReq
*
)
signal
->
getDataPtrSend
();
req
->
userReference
=
reference
();
req
->
userReference
=
reference
();
...
@@ -361,7 +362,7 @@ Restore::open_file(Signal* signal, FilePtr file_ptr, Uint32 lcpNo)
...
@@ -361,7 +362,7 @@ Restore::open_file(Signal* signal, FilePtr file_ptr, Uint32 lcpNo)
FsOpenReq
::
setVersion
(
req
->
fileNumber
,
5
);
FsOpenReq
::
setVersion
(
req
->
fileNumber
,
5
);
FsOpenReq
::
setSuffix
(
req
->
fileNumber
,
FsOpenReq
::
S_DATA
);
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_setTableId
(
req
->
fileNumber
,
file_ptr
.
p
->
m_table_id
);
FsOpenReq
::
v5_setFragmentId
(
req
->
fileNumber
,
file_ptr
.
p
->
m_fragment_id
);
FsOpenReq
::
v5_setFragmentId
(
req
->
fileNumber
,
file_ptr
.
p
->
m_fragment_id
);
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
FsOpenReq
::
SignalLength
,
JBA
);
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
FsOpenReq
::
SignalLength
,
JBA
);
...
@@ -1216,6 +1217,17 @@ void
...
@@ -1216,6 +1217,17 @@ void
Restore
::
parse_error
(
Signal
*
signal
,
Restore
::
parse_error
(
Signal
*
signal
,
FilePtr
file_ptr
,
Uint32
line
,
Uint32
extra
)
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
);
ndbrequire
(
false
);
}
}
...
...
storage/ndb/src/kernel/blocks/restore.hpp
View file @
151af6b4
...
@@ -116,6 +116,7 @@ private:
...
@@ -116,6 +116,7 @@ private:
Uint32
nextList
;
Uint32
nextList
;
Uint32
prevList
;
Uint32
prevList
;
Uint32
nextPool
;
Uint32
nextPool
;
Uint32
m_lcp_no
;
bool
is_lcp
()
const
{
return
m_file_type
==
BackupFormat
::
LCP_FILE
;}
bool
is_lcp
()
const
{
return
m_file_type
==
BackupFormat
::
LCP_FILE
;}
};
};
...
@@ -124,7 +125,7 @@ private:
...
@@ -124,7 +125,7 @@ private:
Uint32
init_file
(
const
struct
RestoreLcpReq
*
,
FilePtr
);
Uint32
init_file
(
const
struct
RestoreLcpReq
*
,
FilePtr
);
void
release_file
(
FilePtr
);
void
release_file
(
FilePtr
);
void
open_file
(
Signal
*
,
FilePtr
,
Uint32
lcpNo
);
void
open_file
(
Signal
*
,
FilePtr
);
void
read_file
(
Signal
*
,
FilePtr
);
void
read_file
(
Signal
*
,
FilePtr
);
void
restore_next
(
Signal
*
,
FilePtr
);
void
restore_next
(
Signal
*
,
FilePtr
);
void
parse_file_header
(
Signal
*
,
FilePtr
,
const
Uint32
*
,
Uint32
len
);
void
parse_file_header
(
Signal
*
,
FilePtr
,
const
Uint32
*
,
Uint32
len
);
...
...
storage/ndb/src/kernel/error/ndbd_exit_codes.c
View file @
151af6b4
...
@@ -159,6 +159,8 @@ static const ErrStruct errArray[] =
...
@@ -159,6 +159,8 @@ static const ErrStruct errArray[] =
{
NDBD_EXIT_AFS_NO_SUCH_FILE
,
XFI
,
"File not found"
},
{
NDBD_EXIT_AFS_NO_SUCH_FILE
,
XFI
,
"File not found"
},
{
NDBD_EXIT_AFS_READ_UNDERFLOW
,
XFI
,
"Read underflow"
},
{
NDBD_EXIT_AFS_READ_UNDERFLOW
,
XFI
,
"Read underflow"
},
{
NDBD_EXIT_INVALID_LCP_FILE
,
XFI
,
"Invalid LCP"
},
/* Sentinel */
/* Sentinel */
{
0
,
XUE
,
{
0
,
XUE
,
"No message slogan found (please report a bug if you get this error code)"
}
"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