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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6fb6a105
Commit
6fb6a105
authored
Jun 29, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
parents
f3d8d602
42dfb7a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
18 deletions
+41
-18
storage/ndb/src/kernel/blocks/backup/Backup.cpp
storage/ndb/src/kernel/blocks/backup/Backup.cpp
+34
-17
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+7
-1
No files found.
storage/ndb/src/kernel/blocks/backup/Backup.cpp
View file @
6fb6a105
...
@@ -3932,19 +3932,37 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
...
@@ -3932,19 +3932,37 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
FsAppendReq
::
SignalLength
,
JBA
);
FsAppendReq
::
SignalLength
,
JBA
);
return
;
return
;
}
//if
}
//if
filePtr
.
p
->
fileRunning
=
0
;
#ifdef DEBUG_ABORT
filePtr
.
p
->
fileClosing
=
1
;
Uint32
running
=
filePtr
.
p
->
fileRunning
;
Uint32
closing
=
filePtr
.
p
->
fileClosing
;
FsCloseReq
*
req
=
(
FsCloseReq
*
)
signal
->
getDataPtrSend
();
#endif
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
if
(
!
filePtr
.
p
->
fileClosing
)
req
->
userReference
=
reference
();
{
req
->
fileFlag
=
0
;
filePtr
.
p
->
fileRunning
=
0
;
filePtr
.
p
->
fileClosing
=
1
;
FsCloseReq
*
req
=
(
FsCloseReq
*
)
signal
->
getDataPtrSend
();
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
req
->
userReference
=
reference
();
req
->
fileFlag
=
0
;
#ifdef DEBUG_ABORT
ndbout_c
(
"***** a FSCLOSEREQ filePtr.i = %u run=%d cl=%d"
,
filePtr
.
i
,
running
,
closing
);
#endif
sendSignal
(
NDBFS_REF
,
GSN_FSCLOSEREQ
,
signal
,
FsCloseReq
::
SignalLength
,
JBA
);
}
else
{
#ifdef DEBUG_ABORT
#ifdef DEBUG_ABORT
ndbout_c
(
"***** a FSCLOSEREQ filePtr.i = %u"
,
filePtr
.
i
);
ndbout_c
(
"***** a NOT SENDING FSCLOSEREQ filePtr.i = %u run=%d cl=%d"
,
filePtr
.
i
,
running
,
closing
);
#endif
#endif
sendSignal
(
NDBFS_REF
,
GSN_FSCLOSEREQ
,
signal
,
FsCloseReq
::
SignalLength
,
JBA
);
}
}
}
...
@@ -4195,9 +4213,7 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
...
@@ -4195,9 +4213,7 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
jam
();
jam
();
continue
;
continue
;
}
//if
}
//if
filePtr
.
p
->
fileClosing
=
1
;
if
(
filePtr
.
p
->
fileRunning
==
1
){
if
(
filePtr
.
p
->
fileRunning
==
1
){
jam
();
jam
();
#ifdef DEBUG_ABORT
#ifdef DEBUG_ABORT
...
@@ -4206,7 +4222,10 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
...
@@ -4206,7 +4222,10 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
}
else
{
}
else
{
jam
();
jam
();
filePtr
.
p
->
fileClosing
=
1
;
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
checkFile
(
sig
,
filePtr
);
// make sure we write everything before closing
FsCloseReq
*
req
=
(
FsCloseReq
*
)
sig
->
getDataPtrSend
();
FsCloseReq
*
req
=
(
FsCloseReq
*
)
sig
->
getDataPtrSend
();
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
req
->
userPointer
=
filePtr
.
i
;
...
@@ -4668,7 +4687,6 @@ Backup::execLCP_PREPARE_REQ(Signal* signal)
...
@@ -4668,7 +4687,6 @@ Backup::execLCP_PREPARE_REQ(Signal* signal)
jam
();
jam
();
BackupFilePtr
filePtr
;
BackupFilePtr
filePtr
;
c_backupFilePool
.
getPtr
(
filePtr
,
ptr
.
p
->
dataFilePtr
);
c_backupFilePool
.
getPtr
(
filePtr
,
ptr
.
p
->
dataFilePtr
);
filePtr
.
p
->
fileClosing
=
1
;
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
}
}
...
@@ -4760,7 +4778,6 @@ Backup::execEND_LCPREQ(Signal* signal)
...
@@ -4760,7 +4778,6 @@ Backup::execEND_LCPREQ(Signal* signal)
BackupFilePtr
filePtr
;
BackupFilePtr
filePtr
;
c_backupFilePool
.
getPtr
(
filePtr
,
ptr
.
p
->
dataFilePtr
);
c_backupFilePool
.
getPtr
(
filePtr
,
ptr
.
p
->
dataFilePtr
);
filePtr
.
p
->
fileClosing
=
1
;
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
filePtr
.
p
->
operation
.
dataBuffer
.
eof
();
return
;
return
;
}
}
...
...
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
6fb6a105
...
@@ -228,6 +228,7 @@ AsyncFile::run()
...
@@ -228,6 +228,7 @@ AsyncFile::run()
endReq
();
endReq
();
return
;
return
;
default:
default:
DEBUG
(
ndbout_c
(
"Invalid Request"
));
abort
();
abort
();
break
;
break
;
}
//switch
}
//switch
...
@@ -676,6 +677,7 @@ AsyncFile::extendfile(Request* request) {
...
@@ -676,6 +677,7 @@ AsyncFile::extendfile(Request* request) {
return
0
;
return
0
;
#else
#else
request
=
request
;
request
=
request
;
DEBUG
(
ndbout_c
(
"no pwrite"
));
abort
();
abort
();
return
-
1
;
return
-
1
;
#endif
#endif
...
@@ -792,6 +794,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
...
@@ -792,6 +794,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
bytes_written
=
return_value
;
bytes_written
=
return_value
;
if
(
bytes_written
==
0
){
if
(
bytes_written
==
0
){
DEBUG
(
ndbout_c
(
"no bytes written"
));
abort
();
abort
();
}
}
...
@@ -830,8 +833,10 @@ AsyncFile::closeReq(Request * request)
...
@@ -830,8 +833,10 @@ AsyncFile::closeReq(Request * request)
#else
#else
if
(
-
1
==
::
close
(
theFd
))
{
if
(
-
1
==
::
close
(
theFd
))
{
#ifndef DBUG_OFF
#ifndef DBUG_OFF
if
(
theFd
==
-
1
)
if
(
theFd
==
-
1
)
{
DEBUG
(
ndbout_c
(
"close on fd = -1"
));
abort
();
abort
();
}
#endif
#endif
request
->
error
=
errno
;
request
->
error
=
errno
;
}
}
...
@@ -899,6 +904,7 @@ AsyncFile::appendReq(Request * request){
...
@@ -899,6 +904,7 @@ AsyncFile::appendReq(Request * request){
return
;
return
;
}
}
if
(
n
==
0
){
if
(
n
==
0
){
DEBUG
(
ndbout_c
(
"append with n=0"
));
abort
();
abort
();
}
}
size
-=
n
;
size
-=
n
;
...
...
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