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
2a4de6fc
Commit
2a4de6fc
authored
Nov 30, 2006
by
mskold/marty@linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1
parents
6db1610c
af324d9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
mysql-test/t/ndb_update.test
mysql-test/t/ndb_update.test
+1
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+15
-0
No files found.
mysql-test/t/ndb_update.test
View file @
2a4de6fc
...
@@ -29,6 +29,7 @@ UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
...
@@ -29,6 +29,7 @@ UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
select
*
from
t1
order
by
pk1
;
select
*
from
t1
order
by
pk1
;
--
error
1062
--
error
1062
UPDATE
t1
set
pk1
=
1
,
c
=
2
where
pk1
=
4
;
UPDATE
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
;
UPDATE
t1
set
pk1
=
pk1
+
10
;
UPDATE
t1
set
pk1
=
pk1
+
10
;
select
*
from
t1
order
by
pk1
;
select
*
from
t1
order
by
pk1
;
...
...
sql/ha_ndbcluster.cc
View file @
2a4de6fc
...
@@ -2758,6 +2758,21 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
...
@@ -2758,6 +2758,21 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
DBUG_ENTER
(
"update_row"
);
DBUG_ENTER
(
"update_row"
);
m_write_op
=
TRUE
;
m_write_op
=
TRUE
;
/*
* If IGNORE the ignore constraint violations on primary and unique keys
*/
if
(
m_ignore_dup_key
)
{
int
peek_res
=
peek_indexed_rows
(
new_data
);
if
(
!
peek_res
)
{
DBUG_RETURN
(
HA_ERR_FOUND_DUPP_KEY
);
}
if
(
peek_res
!=
HA_ERR_KEY_NOT_FOUND
)
DBUG_RETURN
(
peek_res
);
}
statistic_increment
(
thd
->
status_var
.
ha_update_count
,
&
LOCK_status
);
statistic_increment
(
thd
->
status_var
.
ha_update_count
,
&
LOCK_status
);
if
(
table
->
timestamp_field_type
&
TIMESTAMP_AUTO_SET_ON_UPDATE
)
if
(
table
->
timestamp_field_type
&
TIMESTAMP_AUTO_SET_ON_UPDATE
)
{
{
...
...
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