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
a25410c3
Commit
a25410c3
authored
Nov 29, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#24303 Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk
parent
3d2c0d14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
mysql-test/r/ndb_update.result
mysql-test/r/ndb_update.result
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+9
-0
No files found.
mysql-test/r/ndb_update.result
View file @
a25410c3
...
...
@@ -18,7 +18,7 @@ pk1 b c
2 2 2
4 1 1
UPDATE t1 set pk1 = 4 where pk1 = 2;
ERROR 23000: Duplicate entry '4' for key
1
ERROR 23000: Duplicate entry '4' for key
'PRIMARY'
UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
select * from t1 order by pk1;
pk1 b c
...
...
sql/ha_ndbcluster.cc
View file @
a25410c3
...
...
@@ -3835,6 +3835,15 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
DBUG_PRINT
(
"info"
,
(
"HA_EXTRA_IGNORE_DUP_KEY"
));
DBUG_PRINT
(
"info"
,
(
"Ignoring duplicate key"
));
m_ignore_dup_key
=
TRUE
;
if
(
table_share
->
primary_key
!=
MAX_KEY
)
{
/*
Table has a primary key
We need to read all fields for UPDATE IGNORE of pk
since this is implemented as delete+insert
*/
bitmap_set_all
(
table
->
read_set
);
}
break
;
case
HA_EXTRA_NO_IGNORE_DUP_KEY
:
DBUG_PRINT
(
"info"
,
(
"HA_EXTRA_NO_IGNORE_DUP_KEY"
));
...
...
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