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
1c75becb
Commit
1c75becb
authored
Nov 17, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl#2126 - read_multi_range ndb part
parent
2a44929c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
243 additions
and
81 deletions
+243
-81
ndb/include/ndbapi/NdbConnection.hpp
ndb/include/ndbapi/NdbConnection.hpp
+4
-0
ndb/include/ndbapi/NdbOperation.hpp
ndb/include/ndbapi/NdbOperation.hpp
+12
-2
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+1
-15
ndb/src/ndbapi/NdbOperationExec.cpp
ndb/src/ndbapi/NdbOperationExec.cpp
+3
-2
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+211
-62
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+12
-0
No files found.
ndb/include/ndbapi/NdbConnection.hpp
View file @
1c75becb
...
...
@@ -430,6 +430,10 @@ public:
*/
const
NdbOperation
*
getNextCompletedOperation
(
const
NdbOperation
*
op
)
const
;
const
NdbOperation
*
getFirstDefinedOperation
()
const
{
return
theFirstOpInList
;}
const
NdbOperation
*
getLastDefinedOperation
()
const
{
return
theLastOpInList
;}
/** @} *********************************************************************/
/**
...
...
ndb/include/ndbapi/NdbOperation.hpp
View file @
1c75becb
...
...
@@ -718,6 +718,7 @@ public:
};
LockMode
getLockMode
()
const
{
return
theLockMode
;
}
void
setAbortOption
(
Int8
ao
)
{
m_abortOption
=
ao
;
}
/**
* Set/get distribution/partition key
...
...
@@ -746,10 +747,13 @@ protected:
void
initInterpreter
();
void
next
(
NdbOperation
*
);
// Set next pointer
NdbOperation
*
next
();
// Get next pointer
public:
const
NdbOperation
*
next
()
const
;
protected:
enum
OperationStatus
{
enum
OperationStatus
{
Init
,
OperationDefined
,
TupleKeyDefined
,
...
...
@@ -995,6 +999,12 @@ NdbOperation::next()
return
theNext
;
}
inline
const
NdbOperation
*
NdbOperation
::
next
()
const
{
return
theNext
;
}
/******************************************************************************
OperationStatus Status();
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
1c75becb
...
...
@@ -232,21 +232,6 @@ Remark: Handle time-out on a transaction object.
void
NdbConnection
::
handleExecuteCompletion
()
{
if
(
theCompletionStatus
==
CompletedFailure
)
{
NdbOperation
*
tOpTemp
=
theFirstExecOpInList
;
while
(
tOpTemp
!=
NULL
)
{
/*****************************************************************************
* Ensure that all executing operations report failed for each
* read attribute when failure occurs.
* We do not want any operations to report both failure and
* success on different read attributes.
****************************************************************************/
tOpTemp
->
handleFailedAI_ElemLen
();
tOpTemp
=
tOpTemp
->
next
();
}
//while
theReturnStatus
=
ReturnFailure
;
}
//if
/***************************************************************************
* Move the NdbOperation objects from the list of executing
* operations to list of completed
...
...
@@ -1512,6 +1497,7 @@ transactions.
/**********************************************************************/
theCompletionStatus
=
CompletedFailure
;
theCommitStatus
=
Aborted
;
theReturnStatus
=
ReturnFailure
;
return
0
;
}
else
{
#ifdef NDB_NO_DROPPED_SIGNAL
...
...
ndb/src/ndbapi/NdbOperationExec.cpp
View file @
1c75becb
...
...
@@ -543,10 +543,11 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
theStatus
=
Finished
;
// blobs want this
if
(
m_abortOption
!=
IgnoreError
)
{
theNdbCon
->
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
}
theError
.
code
=
aSignal
->
readData
(
4
);
theNdbCon
->
setOperationErrorCodeAbort
(
aSignal
->
readData
(
4
),
m_abortOption
);
theNdbCon
->
setOperationErrorCodeAbort
(
aSignal
->
readData
(
4
),
ao
);
if
(
theOperationType
!=
ReadRequest
||
!
theSimpleIndicator
)
// not simple read
return
theNdbCon
->
OpCompleteFailure
(
ao
,
m_abortOption
!=
IgnoreError
);
...
...
sql/ha_ndbcluster.cc
View file @
1c75becb
This diff is collapsed.
Click to expand it.
sql/ha_ndbcluster.h
View file @
1c75becb
...
...
@@ -111,6 +111,14 @@ class ha_ndbcluster: public handler
byte
*
buf
);
int
read_range_next
();
/**
* Multi range stuff
*/
int
read_multi_range_first
(
key_multi_range
**
found_range_p
,
key_multi_range
*
ranges
,
uint
range_count
,
bool
sorted
,
handler_buffer
*
buffer
);
int
read_multi_range_next
(
void
);
bool
get_error_message
(
int
error
,
String
*
buf
);
void
info
(
uint
);
int
extra
(
enum
ha_extra_function
operation
);
...
...
@@ -257,6 +265,10 @@ class ha_ndbcluster: public handler
uint32
m_blobs_buffer_size
;
uint
m_dupkey
;
bool
m_disable_multi_read
;
byte
*
m_multi_range_result_ptr
;
const
NdbOperation
*
m_current_multi_operation
;
void
set_rec_per_key
();
void
records_update
();
void
no_uncommitted_rows_execute_failure
();
...
...
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