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
89537699
Commit
89537699
authored
Nov 25, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
e80bd82e
870c718b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
67 deletions
+50
-67
ndb/src/common/logger/LogHandler.cpp
ndb/src/common/logger/LogHandler.cpp
+3
-4
ndb/src/common/logger/Logger.cpp
ndb/src/common/logger/Logger.cpp
+6
-3
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+17
-16
ndb/src/mgmsrv/InitConfigFileParser.cpp
ndb/src/mgmsrv/InitConfigFileParser.cpp
+24
-44
No files found.
ndb/src/common/logger/LogHandler.cpp
View file @
89537699
...
...
@@ -117,10 +117,9 @@ LogHandler::parseParams(const BaseString &_params) {
_params
.
split
(
v_args
,
","
);
for
(
size_t
i
=
0
;
i
<
v_args
.
size
();
i
++
)
{
Vector
<
BaseString
>
v_param_value
;
v_args
[
i
].
split
(
v_param_value
,
"="
,
2
);
if
(
v_param_value
.
size
()
==
2
&&
!
setParam
(
v_param_value
[
0
],
v_param_value
[
1
]))
if
(
v_args
[
i
].
split
(
v_param_value
,
"="
,
2
)
!=
2
)
ret
=
false
;
else
if
(
!
setParam
(
v_param_value
[
0
],
v_param_value
[
1
]))
ret
=
false
;
}
...
...
ndb/src/common/logger/Logger.cpp
View file @
89537699
...
...
@@ -169,10 +169,13 @@ Logger::addHandler(const BaseString &logstring) {
size_t
i
;
Vector
<
BaseString
>
logdest
;
Vector
<
LogHandler
*>
loghandlers
;
DBUG_ENTER
(
"Logger::addHandler"
);
logstring
.
split
(
logdest
,
";"
);
for
(
i
=
0
;
i
<
logdest
.
size
();
i
++
)
{
DBUG_PRINT
(
"info"
,(
"adding: %s"
,
logdest
[
i
]));
Vector
<
BaseString
>
v_type_args
;
logdest
[
i
].
split
(
v_type_args
,
":"
,
2
);
...
...
@@ -191,16 +194,16 @@ Logger::addHandler(const BaseString &logstring) {
handler
=
new
ConsoleLogHandler
();
if
(
handler
==
NULL
)
return
false
;
DBUG_RETURN
(
false
)
;
if
(
!
handler
->
parseParams
(
params
))
return
false
;
DBUG_RETURN
(
false
)
;
loghandlers
.
push_back
(
handler
);
}
for
(
i
=
0
;
i
<
loghandlers
.
size
();
i
++
)
addHandler
(
loghandlers
[
i
]);
return
true
;
/* @todo handle errors */
DBUG_RETURN
(
true
)
;
/* @todo handle errors */
}
bool
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
89537699
...
...
@@ -8573,13 +8573,11 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
/**
* Used for scan take over
*/
{
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
}
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
/**
* !idx uses 1 - (MAX_PARALLEL_SCANS_PER_FRAG - 1) = 1-11
* idx uses from MAX_PARALLEL_SCANS_PER_FRAG - MAX = 12-42)
...
...
@@ -8587,11 +8585,11 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
Uint32
start
=
(
idx
?
MAX_PARALLEL_SCANS_PER_FRAG
:
1
);
Uint32
stop
=
(
idx
?
MAX_PARALLEL_INDEX_SCANS_PER_FRAG
:
MAX_PARALLEL_SCANS_PER_FRAG
-
1
);
stop
+=
start
;
Uint32
free
=
fragp
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
Uint32
free
=
tFragP
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
if
(
free
==
Fragrecord
::
ScanNumberMask
::
NotFound
||
free
>=
stop
){
jam
();
if
(
scanPrio
==
0
){
jam
();
return
ScanFragRef
::
ZTOO_MANY_ACTIVE_SCAN_ERROR
;
...
...
@@ -8607,10 +8605,9 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
return
ZOK
;
}
scanptr
.
p
->
scanNumber
=
free
;
fragp
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
tFragP
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
LocalDLList
<
ScanRecord
>
active
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
active
.
add
(
scanptr
);
if
(
scanptr
.
p
->
scanKeyinfoFlag
){
...
...
@@ -8693,8 +8690,12 @@ void Dblqh::finishScanrec(Signal* signal)
LocalDLList
<
ScanRecord
>
scans
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
scans
.
release
(
scanptr
);
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
scanptr
.
p
->
fragPtrI
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
const
Uint32
scanNumber
=
scanptr
.
p
->
scanNumber
;
ndbrequire
(
!
fragp
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ndbrequire
(
!
tFragP
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ScanRecordPtr
restart
;
/**
...
...
@@ -8702,13 +8703,13 @@ void Dblqh::finishScanrec(Signal* signal)
*/
if
(
scanNumber
==
NR_ScanNo
||
!
queue
.
first
(
restart
)){
jam
();
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
}
if
(
ERROR_INSERTED
(
5034
)){
jam
();
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
}
...
...
ndb/src/mgmsrv/InitConfigFileParser.cpp
View file @
89537699
...
...
@@ -213,48 +213,41 @@ InitConfigFileParser::parseConfig(FILE * file) {
// Parse Name-Value Pair
//****************************************************************************
bool
InitConfigFileParser
::
parseNameValuePair
(
Context
&
ctx
,
const
char
*
line
)
{
char
tmpLine
[
MAX_LINE_LENGTH
];
char
fname
[
MAX_LINE_LENGTH
],
rest
[
MAX_LINE_LENGTH
];
char
*
t
;
const
char
*
separator_list
[]
=
{
":"
,
"="
,
0
};
const
char
*
separator
=
0
;
bool
InitConfigFileParser
::
parseNameValuePair
(
Context
&
ctx
,
const
char
*
line
)
{
if
(
ctx
.
m_currentSection
==
NULL
){
ctx
.
reportError
(
"Value specified outside section"
);
return
false
;
}
strncpy
(
tmpLine
,
line
,
MAX_LINE_LENGTH
);
// *************************************
// Check if a separator exists in line
// Split string at first occurrence of
// '=' or ':'
// *************************************
for
(
int
i
=
0
;
separator_list
[
i
]
!=
0
;
i
++
)
{
if
(
strchr
(
tmpLine
,
separator_list
[
i
][
0
]))
{
separator
=
separator_list
[
i
];
break
;
}
}
if
(
separator
==
0
)
{
Vector
<
BaseString
>
tmp_string_split
;
if
(
BaseString
(
line
).
split
(
tmp_string_split
,
BaseString
(
"=:"
),
2
)
!=
2
)
{
ctx
.
reportError
(
"Parse error"
);
return
false
;
}
// *******************************************
// Get pointer to substring before separator
// *******************************************
t
=
strtok
(
tmpLine
,
separator
);
// *****************************************
// Count number of tokens before separator
// *****************************************
if
(
sscanf
(
t
,
"%120s%120s"
,
fname
,
rest
)
!=
1
)
{
ctx
.
reportError
(
"Multiple names before
\'
%c
\'
"
,
separator
[
0
]);
return
false
;
// *************************************
// Remove leading and trailing chars
// *************************************
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
tmp_string_split
[
i
].
trim
(
"
\r\n
\t
"
);
}
// *************************************
// First in split is fname
// *************************************
const
char
*
fname
=
tmp_string_split
[
0
].
c_str
();
if
(
!
ctx
.
m_currentInfo
->
contains
(
fname
))
{
ctx
.
reportError
(
"[%s] Unknown parameter: %s"
,
ctx
.
fname
,
fname
);
return
false
;
...
...
@@ -273,24 +266,11 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) {
}
}
// ******************************************
// Get pointer to substring after separator
// ******************************************
t
=
strtok
(
NULL
,
"
\0
"
);
if
(
t
==
NULL
)
{
ctx
.
reportError
(
"No value for parameter"
);
return
false
;
}
// ******************************************
// Remove prefix and postfix spaces and tabs
// *******************************************
trim
(
t
);
// ***********************
// Store name-value pair
// ***********************
return
storeNameValuePair
(
ctx
,
fname
,
t
);
return
storeNameValuePair
(
ctx
,
fname
,
tmp_string_split
[
1
].
c_str
());
}
...
...
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