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
c0eba6c9
Commit
c0eba6c9
authored
Oct 20, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NDB dbtux compile fix for sol9x86
parent
7af65592
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
30 deletions
+62
-30
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+4
-4
ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
+1
-1
ndb/test/ndbapi/testOIBasic.cpp
ndb/test/ndbapi/testOIBasic.cpp
+57
-25
No files found.
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
View file @
c0eba6c9
...
...
@@ -240,7 +240,7 @@ private:
struct
TreeNode
{
TupLoc
m_link
[
3
];
// link to 0-left child 1-right child 2-parent
unsigned
m_side
:
2
;
// we are 0-left child 1-right child 2-root
int
m_balance
:
2
;
// balance -1, 0, +1
unsigned
m_balance
:
2
;
// balance -1, 0, +1 plus 1 for Solaris CC
unsigned
pad1
:
4
;
Uint8
m_occup
;
// current number of entries
Uint32
m_nodeScan
;
// list of scans at this node
...
...
@@ -927,7 +927,7 @@ Dbtux::TreeEnt::cmp(const TreeEnt ent) const
inline
Dbtux
::
TreeNode
::
TreeNode
()
:
m_side
(
2
),
m_balance
(
0
),
m_balance
(
0
+
1
),
pad1
(
0
),
m_occup
(
0
),
m_nodeScan
(
RNIL
)
...
...
@@ -1156,7 +1156,7 @@ Dbtux::NodeHandle::getOccup()
inline
int
Dbtux
::
NodeHandle
::
getBalance
()
{
return
m_node
->
m_balance
;
return
(
int
)
m_node
->
m_balance
-
1
;
}
inline
Uint32
...
...
@@ -1191,7 +1191,7 @@ inline void
Dbtux
::
NodeHandle
::
setBalance
(
int
b
)
{
ndbrequire
(
abs
(
b
)
<=
1
);
m_node
->
m_balance
=
b
;
m_node
->
m_balance
=
(
unsigned
)(
b
+
1
)
;
}
inline
void
...
...
ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
View file @
c0eba6c9
...
...
@@ -283,7 +283,7 @@ operator<<(NdbOut& out, const Dbtux::TreeNode& node)
out
<<
" [up "
<<
node
.
m_link
[
2
]
<<
"]"
;
out
<<
" [side "
<<
dec
<<
node
.
m_side
<<
"]"
;
out
<<
" [occup "
<<
dec
<<
node
.
m_occup
<<
"]"
;
out
<<
" [balance "
<<
dec
<<
(
int
)
node
.
m_balance
<<
"]"
;
out
<<
" [balance "
<<
dec
<<
(
int
)
node
.
m_balance
-
1
<<
"]"
;
out
<<
" [nodeScan "
<<
hex
<<
node
.
m_nodeScan
<<
"]"
;
out
<<
"]"
;
return
out
;
...
...
ndb/test/ndbapi/testOIBasic.cpp
View file @
c0eba6c9
...
...
@@ -40,18 +40,20 @@ struct Opt {
bool
m_core
;
const
char
*
m_csname
;
CHARSET_INFO
*
m_cs
;
int
m_die
;
bool
m_dups
;
NdbDictionary
::
Object
::
FragmentType
m_fragtype
;
unsigned
m_subsubloop
;
const
char
*
m_index
;
unsigned
m_loop
;
bool
m_nologging
;
bool
m_msglock
;
bool
m_nologging
;
bool
m_noverify
;
unsigned
m_pctnull
;
unsigned
m_rows
;
unsigned
m_samples
;
unsigned
m_scan
rd
;
unsigned
m_scan
ex
;
unsigned
m_scan
bat
;
unsigned
m_scan
par
;
unsigned
m_seed
;
unsigned
m_subloop
;
const
char
*
m_table
;
...
...
@@ -64,22 +66,24 @@ struct Opt {
m_core
(
false
),
m_csname
(
"latin1_bin"
),
m_cs
(
0
),
m_die
(
0
),
m_dups
(
false
),
m_fragtype
(
NdbDictionary
::
Object
::
FragUndefined
),
m_subsubloop
(
4
),
m_index
(
0
),
m_loop
(
1
),
m_nologging
(
false
),
m_msglock
(
true
),
m_nologging
(
false
),
m_noverify
(
false
),
m_pctnull
(
10
),
m_rows
(
1000
),
m_samples
(
0
),
m_scan
rd
(
24
0
),
m_scan
ex
(
24
0
),
m_scan
bat
(
0
),
m_scan
par
(
0
),
m_seed
(
0
),
m_subloop
(
4
),
m_table
(
0
),
m_threads
(
6
),
// table + 5 indexes
m_threads
(
10
),
m_v
(
1
)
{
}
};
...
...
@@ -100,16 +104,18 @@ printhelp()
<<
" -case abc only given test cases (letters a-z)"
<<
endl
<<
" -core core dump on error ["
<<
d
.
m_core
<<
"]"
<<
endl
<<
" -csname S charset (collation) of non-pk char column ["
<<
d
.
m_csname
<<
"]"
<<
endl
<<
" -die nnn exit immediately on NDB error code nnn"
<<
endl
<<
" -dups allow duplicate tuples from index scan ["
<<
d
.
m_dups
<<
"]"
<<
endl
<<
" -fragtype T fragment type single/small/medium/large"
<<
endl
<<
" -index xyz only given index numbers (digits 1-9)"
<<
endl
<<
" -loop N loop count full suite 0=forever ["
<<
d
.
m_loop
<<
"]"
<<
endl
<<
" -nologging create tables in no-logging mode"
<<
endl
<<
" -noverify skip index verifications"
<<
endl
<<
" -pctnull N pct NULL values in nullable column ["
<<
d
.
m_pctnull
<<
"]"
<<
endl
<<
" -rows N rows per thread ["
<<
d
.
m_rows
<<
"]"
<<
endl
<<
" -samples N samples for some timings (0=all) ["
<<
d
.
m_samples
<<
"]"
<<
endl
<<
" -scan
rd N scan read parallelism ["
<<
d
.
m_scanrd
<<
"]"
<<
endl
<<
" -scan
ex N scan exclusive parallelism ["
<<
d
.
m_scanex
<<
"]"
<<
endl
<<
" -scan
bat N scan batch per fragment (ignored by ndb api) ["
<<
d
.
m_scanbat
<<
"]"
<<
endl
<<
" -scan
par N scan parallelism ["
<<
d
.
m_scanpar
<<
"]"
<<
endl
<<
" -seed N srandom seed 0=loop number["
<<
d
.
m_seed
<<
"]"
<<
endl
<<
" -subloop N subtest loop count ["
<<
d
.
m_subloop
<<
"]"
<<
endl
<<
" -table xyz only given table numbers (digits 1-9)"
<<
endl
...
...
@@ -695,8 +701,8 @@ struct Con {
int
setBound
(
int
num
,
int
type
,
const
void
*
value
);
int
execute
(
ExecType
t
);
int
execute
(
ExecType
t
,
bool
&
deadlock
);
int
openScanRead
(
unsigned
parallelism
);
int
openScanExclusive
(
unsigned
parallelism
);
int
openScanRead
(
unsigned
scanbat
,
unsigned
scanpar
);
int
openScanExclusive
(
unsigned
scanbat
,
unsigned
scanpar
);
int
executeScan
();
int
nextScanResult
(
bool
fetchAllowed
);
int
nextScanResult
(
bool
fetchAllowed
,
bool
&
deadlock
);
...
...
@@ -822,18 +828,20 @@ Con::execute(ExecType t, bool& deadlock)
}
int
Con
::
openScanRead
(
unsigned
parallelism
)
Con
::
openScanRead
(
unsigned
scanbat
,
unsigned
scanpar
)
{
assert
(
m_tx
!=
0
&&
m_op
!=
0
);
CHKCON
((
m_resultset
=
m_scanop
->
readTuples
(
parallelism
))
!=
0
,
*
this
);
NdbOperation
::
LockMode
lm
=
NdbOperation
::
LM_Read
;
CHKCON
((
m_resultset
=
m_scanop
->
readTuples
(
lm
,
scanbat
,
scanpar
))
!=
0
,
*
this
);
return
0
;
}
int
Con
::
openScanExclusive
(
unsigned
parallelism
)
Con
::
openScanExclusive
(
unsigned
scanbat
,
unsigned
scanpar
)
{
assert
(
m_tx
!=
0
&&
m_op
!=
0
);
CHKCON
((
m_resultset
=
m_scanop
->
readTuplesExclusive
(
parallelism
))
!=
0
,
*
this
);
NdbOperation
::
LockMode
lm
=
NdbOperation
::
LM_Exclusive
;
CHKCON
((
m_resultset
=
m_scanop
->
readTuples
(
lm
,
scanbat
,
scanpar
))
!=
0
,
*
this
);
return
0
;
}
...
...
@@ -900,27 +908,37 @@ Con::printerror(NdbOut& out)
m_errtype
=
ErrOther
;
unsigned
any
=
0
;
int
code
;
int
die
=
0
;
if
(
m_ndb
)
{
if
((
code
=
m_ndb
->
getNdbError
().
code
)
!=
0
)
{
LL0
(
++
any
<<
" ndb: error "
<<
m_ndb
->
getNdbError
());
die
+=
(
code
==
g_opt
.
m_die
);
}
if
(
m_dic
&&
(
code
=
m_dic
->
getNdbError
().
code
)
!=
0
)
{
LL0
(
++
any
<<
" dic: error "
<<
m_dic
->
getNdbError
());
die
+=
(
code
==
g_opt
.
m_die
);
}
if
(
m_tx
)
{
if
((
code
=
m_tx
->
getNdbError
().
code
)
!=
0
)
{
LL0
(
++
any
<<
" con: error "
<<
m_tx
->
getNdbError
());
die
+=
(
code
==
g_opt
.
m_die
);
if
(
code
==
266
||
code
==
274
||
code
==
296
||
code
==
297
||
code
==
499
)
m_errtype
=
ErrDeadlock
;
}
if
(
m_op
&&
m_op
->
getNdbError
().
code
!=
0
)
{
LL0
(
++
any
<<
" op : error "
<<
m_op
->
getNdbError
());
die
+=
(
code
==
g_opt
.
m_die
);
}
}
}
if
(
!
any
)
{
LL0
(
"failed but no NDB error code"
);
}
if
(
die
)
{
if
(
g_opt
.
m_core
)
abort
();
exit
(
1
);
}
}
// dictionary operations
...
...
@@ -2290,7 +2308,7 @@ scanreadtable(Par par)
Set
set2
(
tab
,
set
.
m_rows
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
tab
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
rd
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
set2
.
getval
(
par
);
CHK
(
con
.
executeScan
()
==
0
);
while
(
1
)
{
...
...
@@ -2318,7 +2336,7 @@ scanreadtablefast(Par par, unsigned countcheck)
LL3
(
"scanfast "
<<
tab
.
m_name
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
tab
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
rd
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
// get 1st column
NdbRecAttr
*
rec
;
CHK
(
con
.
getValue
((
Uint32
)
0
,
rec
)
==
0
);
...
...
@@ -2350,7 +2368,7 @@ scanreadindex(Par par, const ITab& itab, const BSet& bset)
Set
set2
(
tab
,
set
.
m_rows
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
itab
,
tab
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
rd
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
CHK
(
bset
.
setbnd
(
par
)
==
0
);
set2
.
getval
(
par
);
CHK
(
con
.
executeScan
()
==
0
);
...
...
@@ -2381,7 +2399,7 @@ scanreadindexfast(Par par, const ITab& itab, const BSet& bset, unsigned countche
LL4
(
bset
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
itab
,
tab
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
rd
)
==
0
);
CHK
(
con
.
openScanRead
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
CHK
(
bset
.
setbnd
(
par
)
==
0
);
// get 1st column
NdbRecAttr
*
rec
;
...
...
@@ -2500,7 +2518,7 @@ scanupdatetable(Par par)
Set
set2
(
tab
,
set
.
m_rows
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
tab
)
==
0
);
CHK
(
con
.
openScanExclusive
(
par
.
m_scan
ex
)
==
0
);
CHK
(
con
.
openScanExclusive
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
set2
.
getval
(
par
);
CHK
(
con
.
executeScan
()
==
0
);
unsigned
count
=
0
;
...
...
@@ -2579,7 +2597,7 @@ scanupdateindex(Par par, const ITab& itab, const BSet& bset)
Set
set2
(
tab
,
set
.
m_rows
);
CHK
(
con
.
startTransaction
()
==
0
);
CHK
(
con
.
getNdbScanOperation
(
itab
,
tab
)
==
0
);
CHK
(
con
.
openScanExclusive
(
par
.
m_scan
ex
)
==
0
);
CHK
(
con
.
openScanExclusive
(
par
.
m_scan
bat
,
par
.
m_scanpar
)
==
0
);
CHK
(
bset
.
setbnd
(
par
)
==
0
);
set2
.
getval
(
par
);
CHK
(
con
.
executeScan
()
==
0
);
...
...
@@ -2685,6 +2703,8 @@ scanupdateall(Par par)
static
int
readverify
(
Par
par
)
{
if
(
par
.
m_noverify
)
return
0
;
par
.
m_verify
=
true
;
CHK
(
pkread
(
par
)
==
0
);
CHK
(
scanreadall
(
par
)
==
0
);
...
...
@@ -2694,6 +2714,8 @@ readverify(Par par)
static
int
readverifyfull
(
Par
par
)
{
if
(
par
.
m_noverify
)
return
0
;
par
.
m_verify
=
true
;
if
(
par
.
m_no
==
0
)
CHK
(
scanreadtable
(
par
)
==
0
);
...
...
@@ -3342,6 +3364,12 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535)
continue
;
}
}
if
(
strcmp
(
arg
,
"-die"
)
==
0
)
{
if
(
++
argv
,
--
argc
>
0
)
{
g_opt
.
m_die
=
atoi
(
argv
[
0
]);
continue
;
}
}
if
(
strcmp
(
arg
,
"-dups"
)
==
0
)
{
g_opt
.
m_dups
=
true
;
continue
;
...
...
@@ -3382,6 +3410,10 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535)
g_opt
.
m_nologging
=
true
;
continue
;
}
if
(
strcmp
(
arg
,
"-noverify"
)
==
0
)
{
g_opt
.
m_noverify
=
true
;
continue
;
}
if
(
strcmp
(
arg
,
"-pctnull"
)
==
0
)
{
if
(
++
argv
,
--
argc
>
0
)
{
g_opt
.
m_pctnull
=
atoi
(
argv
[
0
]);
...
...
@@ -3400,15 +3432,15 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535)
continue
;
}
}
if
(
strcmp
(
arg
,
"-scan
rd
"
)
==
0
)
{
if
(
strcmp
(
arg
,
"-scan
bat
"
)
==
0
)
{
if
(
++
argv
,
--
argc
>
0
)
{
g_opt
.
m_scan
rd
=
atoi
(
argv
[
0
]);
g_opt
.
m_scan
bat
=
atoi
(
argv
[
0
]);
continue
;
}
}
if
(
strcmp
(
arg
,
"-scan
ex
"
)
==
0
)
{
if
(
strcmp
(
arg
,
"-scan
par
"
)
==
0
)
{
if
(
++
argv
,
--
argc
>
0
)
{
g_opt
.
m_scan
ex
=
atoi
(
argv
[
0
]);
g_opt
.
m_scan
par
=
atoi
(
argv
[
0
]);
continue
;
}
}
...
...
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