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
02ae961b
Commit
02ae961b
authored
Jan 11, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
parents
9a43b648
cecb618c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
39 deletions
+49
-39
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+3
-3
ndb/src/kernel/blocks/backup/Backup.cpp
ndb/src/kernel/blocks/backup/Backup.cpp
+5
-1
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+27
-30
ndb/src/kernel/blocks/suma/Suma.cpp
ndb/src/kernel/blocks/suma/Suma.cpp
+4
-3
ndb/src/mgmsrv/InitConfigFileParser.cpp
ndb/src/mgmsrv/InitConfigFileParser.cpp
+10
-2
No files found.
mysql-test/ndb/ndb_config_2_node.ini
View file @
02ae961b
...
...
@@ -9,13 +9,13 @@ DataDir= CHOOSE_FILESYSTEM
MaxNoOfOrderedIndexes
=
CHOOSE_MaxNoOfOrderedIndexes
[ndbd]
HostName
=
CHOOSE_HOSTNAME_1
HostName
=
CHOOSE_HOSTNAME_1
# hostname is a valid network adress
[ndbd]
HostName
=
CHOOSE_HOSTNAME_2
HostName
=
CHOOSE_HOSTNAME_2
# hostname is a valid network adress
[ndb_mgmd]
DataDir
=
CHOOSE_FILESYSTEM
DataDir
=
CHOOSE_FILESYSTEM
#
PortNumber
=
CHOOSE_PORT_MGM
[mysqld]
...
...
ndb/src/kernel/blocks/backup/Backup.cpp
View file @
02ae961b
...
...
@@ -992,7 +992,11 @@ Backup::execUTIL_SEQUENCE_CONF(Signal* signal)
}
//if
ndbrequire
(
ptr
.
p
->
masterData
.
state
.
getState
()
==
DEFINING
);
ptr
.
p
->
backupId
=
conf
->
sequenceValue
[
0
];
{
Uint64
backupId
;
memcpy
(
&
backupId
,
conf
->
sequenceValue
,
8
);
ptr
.
p
->
backupId
=
(
Uint32
)
backupId
;
}
ptr
.
p
->
backupKey
[
0
]
=
(
getOwnNodeId
()
<<
16
)
|
(
ptr
.
p
->
backupId
&
0xFFFF
);
ptr
.
p
->
backupKey
[
1
]
=
NdbTick_CurrentMillisecond
();
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
02ae961b
...
...
@@ -27,6 +27,14 @@
#include <NdbThread.h>
#include <signaldata/FsOpenReq.hpp>
// use this to test broken pread code
//#define HAVE_BROKEN_PREAD
#ifdef HAVE_BROKEN_PREAD
#undef HAVE_PWRITE
#undef HAVE_PREAD
#endif
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#else
// For readv and writev
...
...
@@ -379,9 +387,12 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
if
(
dwSFP
!=
offset
)
{
return
GetLastError
();
}
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
lseek
(
theFd
,
offset
,
SEEK_SET
);
if
(
return_value
!=
offset
)
{
#elif ! defined(HAVE_PREAD)
off_t
seek_val
;
while
((
seek_val
=
lseek
(
theFd
,
offset
,
SEEK_SET
))
==
(
off_t
)
-
1
&&
errno
==
EINTR
);
if
(
seek_val
==
(
off_t
)
-
1
)
{
return
errno
;
}
#endif
...
...
@@ -400,10 +411,10 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
return
GetLastError
();
}
bytes_read
=
dwBytesRead
;
#elif
defined NDB_OSE || defined NDB_SOFTOSE
#elif
! defined(HAVE_PREAD)
return_value
=
::
read
(
theFd
,
buf
,
size
);
#else // UNIX
return_value
=
my_pread
(
theFd
,
buf
,
size
,
offset
,
0
);
return_value
=
::
pread
(
theFd
,
buf
,
size
,
offset
);
#endif
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
...
@@ -453,7 +464,7 @@ AsyncFile::readReq( Request * request)
void
AsyncFile
::
readvReq
(
Request
*
request
)
{
#if
defined NDB_OSE || defined NDB_SOFTOSE
#if
! defined(HAVE_PREAD)
readReq
(
request
);
return
;
#elif defined NDB_WIN32
...
...
@@ -483,7 +494,7 @@ AsyncFile::readvReq( Request * request)
int
AsyncFile
::
extendfile
(
Request
*
request
)
{
#if
defined NDB_OSE || defined NDB_SOFTOSE
#if
! defined(HAVE_PWRITE)
// Find max size of this file in this request
int
maxOffset
=
0
;
int
maxSize
=
0
;
...
...
@@ -592,27 +603,13 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
if
(
dwSFP
!=
offset
)
{
return
GetLastError
();
}
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
lseek
(
theFd
,
offset
,
SEEK_SET
);
if
(
return_value
!=
offset
)
{
DEBUG
(
ndbout_c
(
"AsyncFile::writeReq, err1: return_value=%d, offset=%d
\n
"
,
return_value
,
chunk_offset
));
PRINT_ERRORANDFLAGS
(
0
);
if
(
errno
==
78
)
{
// Could not write beyond end of file, try to extend file
DEBUG
(
ndbout_c
(
"AsyncFile::writeReq, Extend. file! filename=
\"
%s
\"
\n
"
,
theFileName
.
c_str
()));
return_value
=
extendfile
(
request
);
if
(
return_value
==
-
1
)
{
return
errno
;
}
return_value
=
lseek
(
theFd
,
offset
,
SEEK_SET
);
if
(
return_value
!=
offset
)
{
return
errno
;
}
}
else
{
return
errno
;
}
#elif ! defined(HAVE_PWRITE)
off_t
seek_val
;
while
((
seek_val
=
lseek
(
theFd
,
offset
,
SEEK_SET
))
==
(
off_t
)
-
1
&&
errno
==
EINTR
);
if
(
seek_val
==
(
off_t
)
-
1
)
{
return
errno
;
}
#endif
...
...
@@ -634,10 +631,10 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
DEBUG
(
ndbout_c
(
"Warning partial write %d != %d"
,
bytes_written
,
bytes_to_write
));
}
#elif
defined NDB_OSE || defined NDB_SOFTOSE
#elif
! defined(HAVE_PWRITE)
return_value
=
::
write
(
theFd
,
buf
,
bytes_to_write
);
#else // UNIX
return_value
=
my_pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
,
0
);
return_value
=
::
pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
);
#endif
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
...
ndb/src/kernel/blocks/suma/Suma.cpp
View file @
02ae961b
...
...
@@ -824,7 +824,8 @@ Suma::execUTIL_SEQUENCE_CONF(Signal* signal)
return
;
}
Uint32
subId
=
conf
->
sequenceValue
[
0
];
Uint64
subId
;
memcpy
(
&
subId
,
conf
->
sequenceValue
,
8
);
Uint32
subData
=
conf
->
senderData
;
SubscriberPtr
subbPtr
;
...
...
@@ -832,8 +833,8 @@ Suma::execUTIL_SEQUENCE_CONF(Signal* signal)
CreateSubscriptionIdConf
*
subconf
=
(
CreateSubscriptionIdConf
*
)
conf
;
subconf
->
subscriptionId
=
subId
;
subconf
->
subscriptionKey
=
(
getOwnNodeId
()
<<
16
)
|
(
subId
&
0xFFFF
);
subconf
->
subscriptionId
=
(
Uint32
)
subId
;
subconf
->
subscriptionKey
=
(
getOwnNodeId
()
<<
16
)
|
(
Uint32
)(
subId
&
0xFFFF
);
subconf
->
subscriberData
=
subbPtr
.
p
->
m_senderData
;
sendSignal
(
subbPtr
.
p
->
m_subscriberRef
,
GSN_CREATE_SUBID_CONF
,
signal
,
...
...
ndb/src/mgmsrv/InitConfigFileParser.cpp
View file @
02ae961b
...
...
@@ -228,13 +228,21 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line)
Vector
<
BaseString
>
tmp_string_split
;
if
(
BaseString
(
line
).
split
(
tmp_string_split
,
BaseString
(
"=:"
),
2
)
!=
2
)
"=:"
,
2
)
!=
2
)
{
ctx
.
reportError
(
"Parse error"
);
return
false
;
}
// *************************************
// Remove all after #
// *************************************
Vector
<
BaseString
>
tmp_string_split2
;
tmp_string_split
[
1
].
split
(
tmp_string_split2
,
"#"
,
2
);
tmp_string_split
[
1
]
=
tmp_string_split2
[
0
];
// *************************************
// Remove leading and trailing chars
// *************************************
...
...
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