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
48d6d545
Commit
48d6d545
authored
Apr 23, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - post merge 4.1->5.0
parent
850211eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
78 deletions
+38
-78
ndb/src/kernel/blocks/ERROR_codes.txt
ndb/src/kernel/blocks/ERROR_codes.txt
+2
-1
ndb/src/ndbapi/ndberror.c
ndb/src/ndbapi/ndberror.c
+0
-1
ndb/test/ndbapi/testOIBasic.cpp
ndb/test/ndbapi/testOIBasic.cpp
+36
-76
No files found.
ndb/src/kernel/blocks/ERROR_codes.txt
View file @
48d6d545
...
...
@@ -10,7 +10,7 @@ Next DBTC 8035
Next CMVMI 9000
Next BACKUP 10022
Next DBUTIL 11002
Next DBTUX 1200
7
Next DBTUX 1200
8
Next SUMA 13001
TESTING NODE FAILURE, ARBITRATION
...
...
@@ -443,6 +443,7 @@ Test routing of signals:
Ordered index:
--------------
12007: Make next alloc node fail with no memory error
Dbdict:
-------
...
...
ndb/src/ndbapi/ndberror.c
View file @
48d6d545
...
...
@@ -184,7 +184,6 @@ ErrorBundle ErrorCodes[] = {
{
826
,
IS
,
"Too many tables and attributes (increase MaxNoOfAttributes or MaxNoOfTables)"
},
{
827
,
IS
,
"Out of memory in Ndb Kernel, table data (increase DataMemory)"
},
{
902
,
IS
,
"Out of memory in Ndb Kernel, ordered index data (increase DataMemory)"
},
{
902
,
IS
,
"Out of memory in Ndb Kernel, data part (increase DataMemory)"
},
{
903
,
IS
,
"Too many ordered indexes (increase MaxNoOfOrderedIndexes)"
},
{
904
,
IS
,
"Out of fragment records (increase MaxNoOfOrderedIndexes)"
},
{
905
,
IS
,
"Out of attribute records (increase MaxNoOfAttributes)"
},
...
...
ndb/test/ndbapi/testOIBasic.cpp
View file @
48d6d545
...
...
@@ -164,6 +164,16 @@ irandom(unsigned n)
return
i
;
}
static
bool
randompct
(
unsigned
pct
)
{
if
(
pct
==
0
)
return
false
;
if
(
pct
>=
100
)
return
true
;
return
urandom
(
100
)
<
pct
;
}
// log and error macros
static
NdbMutex
*
ndbout_mutex
=
NULL
;
...
...
@@ -1653,36 +1663,6 @@ createindex(Par par)
// data sets
static
unsigned
urandom
(
unsigned
n
)
{
if
(
n
==
0
)
return
0
;
unsigned
i
=
random
()
%
n
;
return
i
;
}
static
int
irandom
(
unsigned
n
)
{
if
(
n
==
0
)
return
0
;
int
i
=
random
()
%
n
;
if
(
random
()
&
0x1
)
i
=
-
i
;
return
i
;
}
static
bool
randompct
(
unsigned
pct
)
{
if
(
pct
==
0
)
return
false
;
if
(
pct
>=
100
)
return
true
;
return
urandom
(
100
)
<
pct
;
}
// Val - typed column value
struct
Val
{
...
...
@@ -2659,26 +2639,30 @@ Set::pending(unsigned i, unsigned mask) const
}
void
Set
::
notpending
(
unsigned
i
)
Set
::
notpending
(
unsigned
i
,
ExecType
et
)
{
assert
(
m_row
[
i
]
!=
0
);
Row
&
row
=
*
m_row
[
i
];
if
(
row
.
m_pending
==
Row
::
InsOp
)
{
row
.
m_exist
=
true
;
}
else
if
(
row
.
m_pending
==
Row
::
UpdOp
)
{
;
}
else
if
(
row
.
m_pending
==
Row
::
DelOp
)
{
row
.
m_exist
=
false
;
if
(
et
==
Commit
)
{
if
(
row
.
m_pending
==
Row
::
InsOp
)
row
.
m_exist
=
true
;
if
(
row
.
m_pending
==
Row
::
DelOp
)
row
.
m_exist
=
false
;
}
else
{
if
(
row
.
m_pending
==
Row
::
InsOp
)
row
.
m_exist
=
false
;
if
(
row
.
m_pending
==
Row
::
DelOp
)
row
.
m_exist
=
true
;
}
row
.
m_pending
=
Row
::
NoOp
;
}
void
Set
::
notpending
(
const
Lst
&
lst
)
Set
::
notpending
(
const
Lst
&
lst
,
ExecType
et
)
{
for
(
unsigned
j
=
0
;
j
<
lst
.
m_cnt
;
j
++
)
{
unsigned
i
=
lst
.
m_arr
[
j
];
notpending
(
i
);
notpending
(
i
,
et
);
}
}
...
...
@@ -2870,34 +2854,6 @@ Set::putval(unsigned i, bool force, unsigned n)
return
0
;
}
void
Set
::
notpending
(
unsigned
i
,
ExecType
et
)
{
assert
(
m_row
[
i
]
!=
0
);
Row
&
row
=
*
m_row
[
i
];
if
(
et
==
Commit
)
{
if
(
row
.
m_pending
==
Row
::
InsOp
)
row
.
m_exist
=
true
;
if
(
row
.
m_pending
==
Row
::
DelOp
)
row
.
m_exist
=
false
;
}
else
{
if
(
row
.
m_pending
==
Row
::
InsOp
)
row
.
m_exist
=
false
;
if
(
row
.
m_pending
==
Row
::
DelOp
)
row
.
m_exist
=
true
;
}
row
.
m_pending
=
Row
::
NoOp
;
}
void
Set
::
notpending
(
const
Lst
&
lst
,
ExecType
et
)
{
for
(
unsigned
j
=
0
;
j
<
lst
.
m_cnt
;
j
++
)
{
unsigned
i
=
lst
.
m_arr
[
j
];
notpending
(
i
,
et
);
}
}
int
Set
::
verify
(
Par
par
,
const
Set
&
set2
)
const
{
...
...
@@ -3511,6 +3467,7 @@ hashindexupdate(Par par, const ITab& itab)
CHK
(
con
.
startTransaction
()
==
0
);
Lst
lst
;
bool
deadlock
=
false
;
bool
nospace
=
false
;
for
(
unsigned
j
=
0
;
j
<
par
.
m_rows
;
j
++
)
{
unsigned
j2
=
!
par
.
m_randomkey
?
j
:
urandom
(
par
.
m_rows
);
unsigned
i
=
thrrow
(
par
,
j2
);
...
...
@@ -3528,7 +3485,7 @@ hashindexupdate(Par par, const ITab& itab)
lst
.
push
(
i
);
if
(
lst
.
cnt
()
==
par
.
m_batch
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"hashindexupdate: stop on deadlock [at 1]"
);
break
;
...
...
@@ -3544,9 +3501,9 @@ hashindexupdate(Par par, const ITab& itab)
}
if
(
!
deadlock
&&
lst
.
cnt
()
!=
0
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"hashindexupdate: stop on deadlock [at
1
]"
);
LL1
(
"hashindexupdate: stop on deadlock [at
2
]"
);
}
else
{
set
.
lock
();
set
.
notpending
(
lst
);
...
...
@@ -3567,6 +3524,7 @@ hashindexdelete(Par par, const ITab& itab)
CHK
(
con
.
startTransaction
()
==
0
);
Lst
lst
;
bool
deadlock
=
false
;
bool
nospace
=
false
;
for
(
unsigned
j
=
0
;
j
<
par
.
m_rows
;
j
++
)
{
unsigned
j2
=
!
par
.
m_randomkey
?
j
:
urandom
(
par
.
m_rows
);
unsigned
i
=
thrrow
(
par
,
j2
);
...
...
@@ -3581,7 +3539,7 @@ hashindexdelete(Par par, const ITab& itab)
lst
.
push
(
i
);
if
(
lst
.
cnt
()
==
par
.
m_batch
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"hashindexdelete: stop on deadlock [at 1]"
);
break
;
...
...
@@ -3596,7 +3554,7 @@ hashindexdelete(Par par, const ITab& itab)
}
if
(
!
deadlock
&&
lst
.
cnt
()
!=
0
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"hashindexdelete: stop on deadlock [at 2]"
);
}
else
{
...
...
@@ -3968,6 +3926,7 @@ scanupdatetable(Par par)
CHK
(
con2
.
startTransaction
()
==
0
);
Lst
lst
;
bool
deadlock
=
false
;
bool
nospace
=
false
;
while
(
1
)
{
int
ret
;
deadlock
=
par
.
m_deadlock
;
...
...
@@ -4003,7 +3962,7 @@ scanupdatetable(Par par)
set
.
unlock
();
if
(
lst
.
cnt
()
==
par
.
m_batch
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con2
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con2
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"scanupdatetable: stop on deadlock [at 2]"
);
goto
out
;
...
...
@@ -4020,7 +3979,7 @@ scanupdatetable(Par par)
CHK
((
ret
=
con
.
nextScanResult
(
false
))
==
0
||
ret
==
1
||
ret
==
2
);
if
(
ret
==
2
&&
lst
.
cnt
()
!=
0
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con2
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con2
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"scanupdatetable: stop on deadlock [at 3]"
);
goto
out
;
...
...
@@ -4067,6 +4026,7 @@ scanupdateindex(Par par, const ITab& itab, const BSet& bset)
CHK
(
con2
.
startTransaction
()
==
0
);
Lst
lst
;
bool
deadlock
=
false
;
bool
nospace
=
false
;
while
(
1
)
{
int
ret
;
deadlock
=
par
.
m_deadlock
;
...
...
@@ -4102,7 +4062,7 @@ scanupdateindex(Par par, const ITab& itab, const BSet& bset)
set
.
unlock
();
if
(
lst
.
cnt
()
==
par
.
m_batch
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con2
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con2
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"scanupdateindex: stop on deadlock [at 2]"
);
goto
out
;
...
...
@@ -4119,7 +4079,7 @@ scanupdateindex(Par par, const ITab& itab, const BSet& bset)
CHK
((
ret
=
con
.
nextScanResult
(
false
))
==
0
||
ret
==
1
||
ret
==
2
);
if
(
ret
==
2
&&
lst
.
cnt
()
!=
0
)
{
deadlock
=
par
.
m_deadlock
;
CHK
(
con2
.
execute
(
Commit
,
deadlock
)
==
0
);
CHK
(
con2
.
execute
(
Commit
,
deadlock
,
nospace
)
==
0
);
if
(
deadlock
)
{
LL1
(
"scanupdateindex: stop on deadlock [at 3]"
);
goto
out
;
...
...
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