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
af908e61
Commit
af908e61
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-merge fixes
parent
e051994b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
30 deletions
+15
-30
mysql-test/suite/ndb/r/ndb_charset.result
mysql-test/suite/ndb/r/ndb_charset.result
+4
-4
mysql-test/suite/ndb/r/ndb_index_unique.result
mysql-test/suite/ndb/r/ndb_index_unique.result
+7
-7
mysql-test/suite/ndb/r/ndb_update.result
mysql-test/suite/ndb/r/ndb_update.result
+3
-3
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+0
-1
storage/ndb/include/ndbapi/NdbDictionary.hpp
storage/ndb/include/ndbapi/NdbDictionary.hpp
+0
-5
storage/ndb/src/ndbapi/NdbDictionary.cpp
storage/ndb/src/ndbapi/NdbDictionary.cpp
+0
-9
storage/ndb/src/ndbapi/NdbOperationExec.cpp
storage/ndb/src/ndbapi/NdbOperationExec.cpp
+1
-1
No files found.
mysql-test/suite/ndb/r/ndb_charset.result
View file @
af908e61
...
@@ -112,9 +112,9 @@ unique key(a)
...
@@ -112,9 +112,9 @@ unique key(a)
) engine=ndb;
) engine=ndb;
insert into t1 values(1, 'aAa');
insert into t1 values(1, 'aAa');
insert into t1 values(2, 'aaa');
insert into t1 values(2, 'aaa');
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
aaa' for key 'a
'
insert into t1 values(3, 'AAA');
insert into t1 values(3, 'AAA');
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
AAA' for key 'a
'
select * from t1 order by p;
select * from t1 order by p;
p a
p a
1 aAa
1 aAa
...
@@ -138,9 +138,9 @@ unique key(a)
...
@@ -138,9 +138,9 @@ unique key(a)
) engine=ndb;
) engine=ndb;
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
insert into t1 values(99,'b');
insert into t1 values(99,'b');
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
b' for key 'a
'
insert into t1 values(99,'a ');
insert into t1 values(99,'a ');
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
a ' for key 'a
'
select a,length(a) from t1 order by a;
select a,length(a) from t1 order by a;
a length(a)
a length(a)
A 1
A 1
...
...
mysql-test/suite/ndb/r/ndb_index_unique.result
View file @
af908e61
...
@@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
...
@@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
a b c
a b c
3 4 6
3 4 6
insert into t1 values(8, 2, 3);
insert into t1 values(8, 2, 3);
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
2' for key 'ib
'
select * from t1 order by a;
select * from t1 order by a;
a b c
a b c
1 2 3
1 2 3
...
@@ -93,7 +93,7 @@ a b c
...
@@ -93,7 +93,7 @@ a b c
1 1 1
1 1 1
4 4 NULL
4 4 NULL
insert into t1 values(5,1,1);
insert into t1 values(5,1,1);
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
1-1' for key 'bc
'
drop table t1;
drop table t1;
CREATE TABLE t2 (
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
a int unsigned NOT NULL PRIMARY KEY,
...
@@ -116,7 +116,7 @@ select * from t2 where b = 4 order by a;
...
@@ -116,7 +116,7 @@ select * from t2 where b = 4 order by a;
a b c
a b c
3 4 6
3 4 6
insert into t2 values(8, 2, 3);
insert into t2 values(8, 2, 3);
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
2-3' for key 'b
'
select * from t2 order by a;
select * from t2 order by a;
a b c
a b c
1 2 3
1 2 3
...
@@ -139,7 +139,7 @@ a b c
...
@@ -139,7 +139,7 @@ a b c
8 2 3
8 2 3
create unique index bi using hash on t2(b);
create unique index bi using hash on t2(b);
insert into t2 values(9, 3, 1);
insert into t2 values(9, 3, 1);
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
3' for key 'bi
'
alter table t2 drop index bi;
alter table t2 drop index bi;
insert into t2 values(9, 3, 1);
insert into t2 values(9, 3, 1);
select * from t2 order by a;
select * from t2 order by a;
...
@@ -229,7 +229,7 @@ pk a
...
@@ -229,7 +229,7 @@ pk a
3 NULL
3 NULL
4 4
4 4
insert into t1 values (5,0);
insert into t1 values (5,0);
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
0' for key 'a
'
select * from t1 order by pk;
select * from t1 order by pk;
pk a
pk a
-1 NULL
-1 NULL
...
@@ -262,7 +262,7 @@ pk a b c
...
@@ -262,7 +262,7 @@ pk a b c
0 NULL 18 NULL
0 NULL 18 NULL
1 3 19 abc
1 3 19 abc
insert into t2 values(2,3,19,'abc');
insert into t2 values(2,3,19,'abc');
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
3-abc' for key 'si
'
select * from t2 order by pk;
select * from t2 order by pk;
pk a b c
pk a b c
-1 1 17 NULL
-1 1 17 NULL
...
@@ -682,7 +682,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
...
@@ -682,7 +682,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
engine=ndb charset=utf8;
engine=ndb charset=utf8;
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫dt∫d' for key 'b
'
select a, sha1(b) from t1;
select a, sha1(b) from t1;
a sha1(b)
a sha1(b)
1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
...
...
mysql-test/suite/ndb/r/ndb_update.result
View file @
af908e61
...
@@ -28,7 +28,7 @@ pk1 b c
...
@@ -28,7 +28,7 @@ pk1 b c
2 2 2
2 2 2
4 1 1
4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
2' for key 'c
'
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
select * from t1 order by pk1;
pk1 b c
pk1 b c
...
@@ -62,9 +62,9 @@ INSERT INTO t3 VALUES (2, 2);
...
@@ -62,9 +62,9 @@ INSERT INTO t3 VALUES (2, 2);
UPDATE t1 SET a = 1;
UPDATE t1 SET a = 1;
UPDATE t1 SET a = 1 ORDER BY a;
UPDATE t1 SET a = 1 ORDER BY a;
UPDATE t2 SET a = 1;
UPDATE t2 SET a = 1;
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
1-2' for key 'a
'
UPDATE t2 SET a = 1 ORDER BY a;
UPDATE t2 SET a = 1 ORDER BY a;
ERROR 23000: Duplicate entry '
' for key '*UNKNOWN*
'
ERROR 23000: Duplicate entry '
1-2' for key 'a
'
UPDATE t3 SET a = 1;
UPDATE t3 SET a = 1;
ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
UPDATE t3 SET a = 1 ORDER BY a;
UPDATE t3 SET a = 1 ORDER BY a;
...
...
sql/ha_ndbcluster.cc
View file @
af908e61
...
@@ -599,7 +599,6 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
...
@@ -599,7 +599,6 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
const
NDBINDEX
*
unique_index
=
const
NDBINDEX
*
unique_index
=
(
const
NDBINDEX
*
)
m_index
[
i
].
unique_index
;
(
const
NDBINDEX
*
)
m_index
[
i
].
unique_index
;
if
(
unique_index
&&
if
(
unique_index
&&
unique_index
->
getIndexTable
()
&&
(
uint
)
unique_index
->
getObjectId
()
==
error_data
)
(
uint
)
unique_index
->
getObjectId
()
==
error_data
)
{
{
dupkey
=
i
;
dupkey
=
i
;
...
...
storage/ndb/include/ndbapi/NdbDictionary.hpp
View file @
af908e61
...
@@ -1021,11 +1021,6 @@ public:
...
@@ -1021,11 +1021,6 @@ public:
*/
*/
const
char
*
getTable
()
const
;
const
char
*
getTable
()
const
;
/**
* Get the table representing the index
*/
const
Table
*
getIndexTable
()
const
;
/**
/**
* Get the number of columns in the index
* Get the number of columns in the index
*/
*/
...
...
storage/ndb/src/ndbapi/NdbDictionary.cpp
View file @
af908e61
...
@@ -792,15 +792,6 @@ NdbDictionary::Index::getTable() const {
...
@@ -792,15 +792,6 @@ NdbDictionary::Index::getTable() const {
return
m_impl
.
getTable
();
return
m_impl
.
getTable
();
}
}
const
NdbDictionary
::
Table
*
NdbDictionary
::
Index
::
getIndexTable
()
const
{
NdbTableImpl
*
t
=
m_impl
.
m_table
;
if
(
t
)
{
return
t
->
m_facade
;
}
return
0
;
}
unsigned
unsigned
NdbDictionary
::
Index
::
getNoOfColumns
()
const
{
NdbDictionary
::
Index
::
getNoOfColumns
()
const
{
return
m_impl
.
m_columns
.
size
();
return
m_impl
.
m_columns
.
size
();
...
...
storage/ndb/src/ndbapi/NdbOperationExec.cpp
View file @
af908e61
...
@@ -549,7 +549,7 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
...
@@ -549,7 +549,7 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
if
(
aSignal
->
getLength
()
==
TcKeyRef
::
SignalLength
)
if
(
aSignal
->
getLength
()
==
TcKeyRef
::
SignalLength
)
{
{
// Signal may contain additional error data
// Signal may contain additional error data
setErrorDetails
((
char
*
)
aSignal
->
readData
(
5
)
);
theError
.
details
=
(
char
*
)
aSignal
->
readData
(
5
);
}
}
theStatus
=
Finished
;
theStatus
=
Finished
;
...
...
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