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
de307026
Commit
de307026
authored
May 08, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#20535
set null bits on delete+insert
parent
73f24392
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
0 deletions
+103
-0
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+10
-0
storage/ndb/test/ndbapi/testBasic.cpp
storage/ndb/test/ndbapi/testBasic.cpp
+89
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
de307026
...
@@ -1198,9 +1198,19 @@ int Dbtup::handleInsertReq(Signal* signal,
...
@@ -1198,9 +1198,19 @@ int Dbtup::handleInsertReq(Signal* signal,
if
(
!
prevOp
->
is_first_operation
())
if
(
!
prevOp
->
is_first_operation
())
org
=
(
Tuple_header
*
)
c_undo_buffer
.
get_ptr
(
&
prevOp
->
m_copy_tuple_location
);
org
=
(
Tuple_header
*
)
c_undo_buffer
.
get_ptr
(
&
prevOp
->
m_copy_tuple_location
);
if
(
regTabPtr
->
need_expand
())
if
(
regTabPtr
->
need_expand
())
{
expand_tuple
(
req_struct
,
sizes
,
org
,
regTabPtr
,
!
disk_insert
);
expand_tuple
(
req_struct
,
sizes
,
org
,
regTabPtr
,
!
disk_insert
);
memset
(
req_struct
->
m_disk_ptr
->
m_null_bits
+
regTabPtr
->
m_offsets
[
DD
].
m_null_offset
,
0xFF
,
4
*
regTabPtr
->
m_offsets
[
DD
].
m_null_words
);
}
else
else
{
memcpy
(
dst
,
org
,
4
*
regTabPtr
->
m_offsets
[
MM
].
m_fix_header_size
);
memcpy
(
dst
,
org
,
4
*
regTabPtr
->
m_offsets
[
MM
].
m_fix_header_size
);
}
memset
(
tuple_ptr
->
m_null_bits
+
regTabPtr
->
m_offsets
[
MM
].
m_null_offset
,
0xFF
,
4
*
regTabPtr
->
m_offsets
[
MM
].
m_null_words
);
}
}
if
(
disk_insert
)
if
(
disk_insert
)
...
...
storage/ndb/test/ndbapi/testBasic.cpp
View file @
de307026
...
@@ -1398,6 +1398,91 @@ runBug27756(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -1398,6 +1398,91 @@ runBug27756(NDBT_Context* ctx, NDBT_Step* step)
template
class
Vector
<
Uint64
>;
template
class
Vector
<
Uint64
>;
int
runBug20535
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Uint32
i
;
Ndb
*
pNdb
=
GETNDB
(
step
);
const
NdbDictionary
::
Table
*
tab
=
ctx
->
getTab
();
NdbDictionary
::
Dictionary
*
dict
=
pNdb
->
getDictionary
();
bool
null
=
false
;
for
(
i
=
0
;
i
<
tab
->
getNoOfColumns
();
i
++
)
{
if
(
tab
->
getColumn
(
i
)
->
getNullable
())
{
null
=
true
;
break
;
}
}
if
(
!
null
)
return
NDBT_OK
;
HugoTransactions
hugoTrans
(
*
tab
);
hugoTrans
.
loadTable
(
pNdb
,
1
);
NdbTransaction
*
pTrans
=
pNdb
->
startTransaction
();
NdbOperation
*
pOp
=
pTrans
->
getNdbOperation
(
tab
->
getName
());
pOp
->
deleteTuple
();
hugoTrans
.
equalForRow
(
pOp
,
0
);
if
(
pTrans
->
execute
(
NoCommit
)
!=
0
)
return
NDBT_FAILED
;
pOp
=
pTrans
->
getNdbOperation
(
tab
->
getName
());
pOp
->
insertTuple
();
hugoTrans
.
equalForRow
(
pOp
,
0
);
for
(
i
=
0
;
i
<
tab
->
getNoOfColumns
();
i
++
)
{
if
(
!
tab
->
getColumn
(
i
)
->
getPrimaryKey
()
&&
!
tab
->
getColumn
(
i
)
->
getNullable
())
{
hugoTrans
.
setValueForAttr
(
pOp
,
i
,
0
,
1
);
}
}
if
(
pTrans
->
execute
(
Commit
)
!=
0
)
return
NDBT_FAILED
;
pTrans
->
close
();
pTrans
=
pNdb
->
startTransaction
();
pOp
=
pTrans
->
getNdbOperation
(
tab
->
getName
());
pOp
->
readTuple
();
hugoTrans
.
equalForRow
(
pOp
,
0
);
Vector
<
NdbRecAttr
*>
values
;
for
(
i
=
0
;
i
<
tab
->
getNoOfColumns
();
i
++
)
{
if
(
!
tab
->
getColumn
(
i
)
->
getPrimaryKey
()
&&
tab
->
getColumn
(
i
)
->
getNullable
())
{
values
.
push_back
(
pOp
->
getValue
(
i
));
}
}
if
(
pTrans
->
execute
(
Commit
)
!=
0
)
return
NDBT_FAILED
;
null
=
true
;
for
(
i
=
0
;
i
<
values
.
size
();
i
++
)
{
if
(
!
values
[
i
]
->
isNULL
())
{
null
=
false
;
ndbout_c
(
"column %s is not NULL"
,
values
[
i
]
->
getColumn
()
->
getName
());
}
}
pTrans
->
close
();
if
(
null
)
return
NDBT_OK
;
else
return
NDBT_FAILED
;
}
template
class
Vector
<
NdbRecAttr
*
>;
NDBT_TESTSUITE
(
testBasic
);
NDBT_TESTSUITE
(
testBasic
);
TESTCASE
(
"PkInsert"
,
TESTCASE
(
"PkInsert"
,
"Verify that we can insert and delete from this table using PK"
"Verify that we can insert and delete from this table using PK"
...
@@ -1676,6 +1761,10 @@ TESTCASE("Bug27756",
...
@@ -1676,6 +1761,10 @@ TESTCASE("Bug27756",
"Verify what happens when we fill the db"
){
"Verify what happens when we fill the db"
){
STEP
(
runBug27756
);
STEP
(
runBug27756
);
}
}
TESTCASE
(
"Bug20535"
,
"Verify what happens when we fill the db"
){
STEP
(
runBug20535
);
}
NDBT_TESTSUITE_END
(
testBasic
);
NDBT_TESTSUITE_END
(
testBasic
);
#if 0
#if 0
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
de307026
...
@@ -243,6 +243,10 @@ max-time: 500
...
@@ -243,6 +243,10 @@ max-time: 500
cmd: testBasic
cmd: testBasic
args: -n Bug28073
args: -n Bug28073
max-time: 500
cmd: testBasic
args: -n Bug20535
max-time: 500
max-time: 500
cmd: testIndex
cmd: testIndex
args: -n Bug25059 -r 3000 T1
args: -n Bug25059 -r 3000 T1
...
...
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