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
9cc1e8c2
Commit
9cc1e8c2
authored
Apr 30, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
bbd07704
3962f18b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
23 deletions
+46
-23
storage/ndb/include/kernel/signaldata/TupCommit.hpp
storage/ndb/include/kernel/signaldata/TupCommit.hpp
+2
-1
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+1
-0
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+9
-5
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
+15
-2
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+0
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
+19
-14
No files found.
storage/ndb/include/kernel/signaldata/TupCommit.hpp
View file @
9cc1e8c2
...
...
@@ -35,7 +35,7 @@ class TupCommitReq {
friend
bool
printTUPCOMMITREQ
(
FILE
*
output
,
const
Uint32
*
theData
,
Uint32
len
,
Uint16
receiverBlockNo
);
public:
STATIC_CONST
(
SignalLength
=
3
);
STATIC_CONST
(
SignalLength
=
4
);
private:
...
...
@@ -45,6 +45,7 @@ private:
Uint32
opPtr
;
Uint32
gci
;
Uint32
hashValue
;
Uint32
diskpage
;
};
#endif
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
9cc1e8c2
...
...
@@ -6379,6 +6379,7 @@ void Dblqh::commitContinueAfterBlockedLab(Signal* signal)
tupCommitReq
->
opPtr
=
sig0
;
tupCommitReq
->
gci
=
regTcPtr
.
p
->
gci
;
tupCommitReq
->
hashValue
=
regTcPtr
.
p
->
hashValue
;
tupCommitReq
->
diskpage
=
RNIL
;
EXECUTE_DIRECT
(
tup
,
GSN_TUP_COMMITREQ
,
signal
,
TupCommitReq
::
SignalLength
);
...
...
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
View file @
9cc1e8c2
...
...
@@ -2208,7 +2208,8 @@ private:
#endif
void
checkDetachedTriggers
(
KeyReqStruct
*
req_struct
,
Operationrec
*
regOperPtr
,
Tablerec
*
regTablePtr
);
Tablerec
*
regTablePtr
,
bool
disk
);
void
fireImmediateTriggers
(
KeyReqStruct
*
req_struct
,
DLList
<
TupTriggerData
>&
triggerList
,
...
...
@@ -2220,7 +2221,8 @@ private:
void
fireDetachedTriggers
(
KeyReqStruct
*
req_struct
,
DLList
<
TupTriggerData
>&
triggerList
,
Operationrec
*
regOperPtr
);
Operationrec
*
regOperPtr
,
bool
disk
);
void
executeTriggers
(
KeyReqStruct
*
req_struct
,
DLList
<
TupTriggerData
>&
triggerList
,
...
...
@@ -2228,7 +2230,8 @@ private:
void
executeTrigger
(
KeyReqStruct
*
req_struct
,
TupTriggerData
*
trigPtr
,
Operationrec
*
regOperPtr
);
Operationrec
*
regOperPtr
,
bool
disk
=
true
);
bool
readTriggerInfo
(
TupTriggerData
*
trigPtr
,
Operationrec
*
regOperPtr
,
...
...
@@ -2239,8 +2242,9 @@ private:
Uint32
*
afterBuffer
,
Uint32
&
noAfterWords
,
Uint32
*
beforeBuffer
,
Uint32
&
noBeforeWords
);
Uint32
&
noBeforeWords
,
bool
disk
);
void
sendTrigAttrInfo
(
Signal
*
signal
,
Uint32
*
data
,
Uint32
dataLen
,
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
View file @
9cc1e8c2
...
...
@@ -356,6 +356,7 @@ Dbtup::disk_page_commit_callback(Signal* signal,
tupCommitReq
->
opPtr
=
opPtrI
;
tupCommitReq
->
hashValue
=
hash_value
;
tupCommitReq
->
gci
=
gci
;
tupCommitReq
->
diskpage
=
page_id
;
regOperPtr
.
p
->
op_struct
.
m_load_diskpage_on_commit
=
0
;
regOperPtr
.
p
->
m_commit_disk_callback_page
=
page_id
;
...
...
@@ -386,14 +387,15 @@ Dbtup::disk_page_log_buffer_callback(Signal* signal,
c_operation_pool
.
getPtr
(
regOperPtr
,
opPtrI
);
c_lqh
->
get_op_info
(
regOperPtr
.
p
->
userpointer
,
&
hash_value
,
&
gci
);
Uint32
page
=
regOperPtr
.
p
->
m_commit_disk_callback_page
;
TupCommitReq
*
const
tupCommitReq
=
(
TupCommitReq
*
)
signal
->
getDataPtr
();
tupCommitReq
->
opPtr
=
opPtrI
;
tupCommitReq
->
hashValue
=
hash_value
;
tupCommitReq
->
gci
=
gci
;
tupCommitReq
->
diskpage
=
page
;
Uint32
page
=
regOperPtr
.
p
->
m_commit_disk_callback_page
;
ndbassert
(
regOperPtr
.
p
->
op_struct
.
m_load_diskpage_on_commit
==
0
);
regOperPtr
.
p
->
op_struct
.
m_wait_log_buffer
=
0
;
m_global_page_pool
.
getPtr
(
m_pgman
.
m_ptr
,
page
);
...
...
@@ -478,7 +480,16 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
req_struct
.
signal
=
signal
;
req_struct
.
hash_value
=
hash_value
;
req_struct
.
gci
=
gci
;
regOperPtr
.
p
->
m_commit_disk_callback_page
=
tupCommitReq
->
diskpage
;
#ifdef VM_TRACE
if
(
tupCommitReq
->
diskpage
==
RNIL
)
{
m_pgman
.
m_ptr
.
setNull
();
req_struct
.
m_disk_page_ptr
.
setNull
();
}
#endif
ptrCheckGuard
(
regTabPtr
,
no_of_tablerec
,
tablerec
);
PagePtr
page
;
...
...
@@ -626,8 +637,10 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
/**
* Perform "real" commit
*/
Uint32
disk
=
regOperPtr
.
p
->
m_commit_disk_callback_page
;
set_change_mask_info
(
&
req_struct
,
regOperPtr
.
p
);
checkDetachedTriggers
(
&
req_struct
,
regOperPtr
.
p
,
regTabPtr
.
p
);
checkDetachedTriggers
(
&
req_struct
,
regOperPtr
.
p
,
regTabPtr
.
p
,
disk
!=
RNIL
);
if
(
regOperPtr
.
p
->
op_struct
.
op_type
!=
ZDELETE
)
{
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
9cc1e8c2
...
...
@@ -24,7 +24,6 @@
#include "AttributeOffset.hpp"
#include <AttributeHeader.hpp>
#include <Interpreter.hpp>
#include <signaldata/TupCommit.hpp>
#include <signaldata/TupKey.hpp>
#include <signaldata/AttrInfo.hpp>
#include <NdbSqlUtil.hpp>
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
View file @
9cc1e8c2
...
...
@@ -457,7 +457,8 @@ void Dbtup::checkDeferredTriggers(Signal* signal,
/* ---------------------------------------------------------------- */
void
Dbtup
::
checkDetachedTriggers
(
KeyReqStruct
*
req_struct
,
Operationrec
*
regOperPtr
,
Tablerec
*
regTablePtr
)
Tablerec
*
regTablePtr
,
bool
disk
)
{
Uint32
save_type
=
regOperPtr
->
op_struct
.
op_type
;
Tuple_header
*
save_ptr
=
req_struct
->
m_tuple_ptr
;
...
...
@@ -503,7 +504,7 @@ void Dbtup::checkDetachedTriggers(KeyReqStruct *req_struct,
// If any fired immediate insert trigger then fetch after tuple
fireDetachedTriggers
(
req_struct
,
regTablePtr
->
subscriptionInsertTriggers
,
regOperPtr
);
regOperPtr
,
disk
);
break
;
case
(
ZDELETE
):
jam
();
...
...
@@ -517,7 +518,7 @@ void Dbtup::checkDetachedTriggers(KeyReqStruct *req_struct,
// FIRETRIGORD with the before tuple
fireDetachedTriggers
(
req_struct
,
regTablePtr
->
subscriptionDeleteTriggers
,
regOperPtr
);
regOperPtr
,
disk
);
break
;
case
(
ZUPDATE
):
jam
();
...
...
@@ -531,7 +532,7 @@ void Dbtup::checkDetachedTriggers(KeyReqStruct *req_struct,
// and send two FIRETRIGORD one with before tuple and one with after tuple
fireDetachedTriggers
(
req_struct
,
regTablePtr
->
subscriptionUpdateTriggers
,
regOperPtr
);
regOperPtr
,
disk
);
break
;
default:
ndbrequire
(
false
);
...
...
@@ -589,7 +590,8 @@ Dbtup::fireDeferredTriggers(Signal* signal,
void
Dbtup
::
fireDetachedTriggers
(
KeyReqStruct
*
req_struct
,
DLList
<
TupTriggerData
>&
triggerList
,
Operationrec
*
const
regOperPtr
)
Operationrec
*
const
regOperPtr
,
bool
disk
)
{
TriggerPtr
trigPtr
;
...
...
@@ -610,7 +612,8 @@ Dbtup::fireDetachedTriggers(KeyReqStruct *req_struct,
jam
();
executeTrigger
(
req_struct
,
trigPtr
.
p
,
regOperPtr
);
regOperPtr
,
disk
);
}
triggerList
.
next
(
trigPtr
);
}
...
...
@@ -634,7 +637,8 @@ void Dbtup::executeTriggers(KeyReqStruct *req_struct,
void
Dbtup
::
executeTrigger
(
KeyReqStruct
*
req_struct
,
TupTriggerData
*
const
trigPtr
,
Operationrec
*
const
regOperPtr
)
Operationrec
*
const
regOperPtr
,
bool
disk
)
{
/**
* The block below does not work together with GREP.
...
...
@@ -701,7 +705,8 @@ void Dbtup::executeTrigger(KeyReqStruct *req_struct,
afterBuffer
,
noAfterWords
,
beforeBuffer
,
noBeforeWords
))
{
noBeforeWords
,
disk
))
{
jam
();
return
;
}
...
...
@@ -804,9 +809,9 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
Uint32
*
const
afterBuffer
,
Uint32
&
noAfterWords
,
Uint32
*
const
beforeBuffer
,
Uint32
&
noBeforeWords
)
Uint32
&
noBeforeWords
,
bool
disk
)
{
//XXX this will not work with varsize attributes...
noAfterWords
=
0
;
noBeforeWords
=
0
;
Uint32
readBuffer
[
MAX_ATTRIBUTES_IN_TABLE
];
...
...
@@ -839,8 +844,8 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
c_undo_buffer
.
get_ptr
(
&
req_struct
->
prevOpPtr
.
p
->
m_copy_tuple_location
);
}
if
(
regTabPtr
->
need_expand
())
prepare_read
(
req_struct
,
regTabPtr
,
true
);
if
(
regTabPtr
->
need_expand
(
disk
))
prepare_read
(
req_struct
,
regTabPtr
,
disk
);
int
ret
=
readAttributes
(
req_struct
,
&
tableDescriptor
[
regTabPtr
->
readKeyArray
].
tabDescr
,
...
...
@@ -935,8 +940,8 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
req_struct
->
m_tuple_ptr
=
(
Tuple_header
*
)
ptr
;
}
if
(
regTabPtr
->
need_expand
(
))
// no disk
prepare_read
(
req_struct
,
regTabPtr
,
true
);
if
(
regTabPtr
->
need_expand
(
disk
))
prepare_read
(
req_struct
,
regTabPtr
,
disk
);
int
ret
=
readAttributes
(
req_struct
,
&
readBuffer
[
0
],
...
...
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