Below is the list of changes that have just been committed into a local
5.0 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-30 15:57:43+01:00, mskold@stripped +2 -0
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
MERGE: 1.2281.4.2
mysql-test/r/ndb_update.result@stripped, 2006-11-30 15:57:35+01:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.10.1.2
sql/ha_ndbcluster.cc@stripped, 2006-11-30 15:57:35+01:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.285.1.2
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mskold
# Host: linux.site
# Root: /windows/Linux_space/MySQL/mysql-5.0-ndb/RESYNC
--- 1.287/sql/ha_ndbcluster.cc 2006-11-30 15:57:57 +01:00
+++ 1.288/sql/ha_ndbcluster.cc 2006-11-30 15:57:57 +01:00
@@ -2387,6 +2387,21 @@ int ha_ndbcluster::update_row(const byte
uint i;
DBUG_ENTER("update_row");
+ /*
+ * 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);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
{
--- 1.11/mysql-test/r/ndb_update.result 2006-11-30 15:57:57 +01:00
+++ 1.12/mysql-test/r/ndb_update.result 2006-11-30 15:57:57 +01:00
@@ -17,8 +17,17 @@ pk1 b c
0 0 0
2 2 2
4 1 1
+UPDATE t1 set pk1 = 4 where pk1 = 2;
+ERROR 23000: Duplicate entry '4' for key 1
+UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
+select * from t1 order by pk1;
+pk1 b c
+0 0 0
+2 2 2
+4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '' for key 0
+UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
pk1 b c
0 0 0
| Thread |
|---|
| • bk commit into 5.0 tree (mskold:1.2306) | Martin Skold | 30 Nov |