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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
fc6f839b
Commit
fc6f839b
authored
Dec 07, 2007
by
mskold/marty@mysql.com/quadfish.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#21072 Duplicate key error in NDB references wrong key: Post-review fixes
parent
27c02506
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
8 deletions
+1
-8
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+1
-5
ndb/src/ndbapi/NdbTransaction.cpp
ndb/src/ndbapi/NdbTransaction.cpp
+0
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+0
-2
No files found.
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
fc6f839b
...
...
@@ -5162,7 +5162,6 @@ void Dbtc::execLQHKEYREF(Signal* signal)
TcIndexData
*
indexData
=
c_theIndexes
.
getPtr
(
currentIndexId
);
indexId
=
indexData
->
indexId
;
regApiPtr
->
errorData
=
indexId
;
ndbout_c
(
"LQHKEYREF, found index %u"
,
indexId
);
const
Uint32
opType
=
regTcPtr
->
operation
;
if
(
errCode
==
ZALREADYEXIST
)
errCode
=
terrorCode
=
ZNOTUNIQUE
;
...
...
@@ -5246,7 +5245,6 @@ void Dbtc::execLQHKEYREF(Signal* signal)
jam
();
regApiPtr
->
lqhkeyreqrec
--
;
// Compensate for extra during read
tcKeyRef
->
connectPtr
=
indexOp
;
ndbout_c
(
"TCKEYREF, sending index %u"
,
indexId
);
tcKeyRef
->
errorData
=
indexId
;
EXECUTE_DIRECT
(
DBTC
,
GSN_TCKEYREF
,
signal
,
TcKeyRef
::
SignalLength
);
apiConnectptr
.
i
=
save
;
...
...
@@ -5254,7 +5252,6 @@ void Dbtc::execLQHKEYREF(Signal* signal)
}
else
{
jam
();
tcKeyRef
->
connectPtr
=
clientData
;
ndbout_c
(
"TCKEYREF, sending index %u"
,
indexId
);
tcKeyRef
->
errorData
=
indexId
;
sendSignal
(
regApiPtr
->
ndbapiBlockref
,
GSN_TCKEYREF
,
signal
,
TcKeyRef
::
SignalLength
,
JBB
);
...
...
@@ -12234,7 +12231,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
// tcIndxRef->errorData = ??; Where to find indexId
tcIndxRef
->
errorData
=
regApiPtr
->
errorData
;
sendSignal
(
regApiPtr
->
ndbapiBlockref
,
GSN_TCINDXREF
,
signal
,
TcKeyRef
::
SignalLength
,
JBB
);
return
;
...
...
@@ -13030,7 +13027,6 @@ void Dbtc::insertIntoIndexTable(Signal* signal,
}
regApiPtr
->
currSavePointId
=
currSavePointId
;
ndbout_c
(
"TCKEYREQ, saving index %u"
,
indexData
->
indexId
);
tcConnectptr
.
p
->
currentIndexId
=
indexData
->
indexId
;
// *********** KEYINFO ***********
...
...
ndb/src/ndbapi/NdbTransaction.cpp
View file @
fc6f839b
...
...
@@ -1769,7 +1769,6 @@ transactions.
theError
.
code
=
aSignal
->
readData
(
4
);
// Override any previous errors
if
(
aSignal
->
getLength
()
==
TcRollbackRep
::
SignalLength
)
{
DBUG_PRINT
(
"info"
,
(
"Found error data %u"
,
aSignal
->
readData
(
5
)));
// Signal may contain additional error data
theError
.
details
=
(
char
*
)
aSignal
->
readData
(
5
);
}
...
...
sql/ha_ndbcluster.cc
View file @
fc6f839b
...
...
@@ -543,7 +543,6 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
uint
error_data
=
(
uint
)
err
.
details
;
uint
dupkey
=
MAX_KEY
;
DBUG_PRINT
(
"info"
,
(
"HA_ERR_FOUND_DUPP_KEY, index table %u"
,
error_data
));
for
(
uint
i
=
0
;
i
<
MAX_KEY
;
i
++
)
{
if
(
m_index
[
i
].
type
==
UNIQUE_INDEX
||
...
...
@@ -555,7 +554,6 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
unique_index
->
getIndexTable
()
&&
(
uint
)
unique_index
->
getIndexTable
()
->
getTableId
()
==
error_data
)
{
DBUG_PRINT
(
"info"
,
(
"Found violated key %u"
,
i
));
dupkey
=
i
;
break
;
}
...
...
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