diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2006-10-16 10:07:19 +0200 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2006-10-16 10:07:19 +0200 |
commit | 8a88e57c28c4020982fa5b2d9a03fd17149cbe3b (patch) | |
tree | 321c29c068b3a9984c08d48de5d5e2e7d9760c7e /sql/ha_ndbcluster.cc | |
parent | 0079ce3b2ca38f79fce8fa3779a627149a92d465 (diff) | |
parent | e4cc40f88c23ea3d6649c7ca19380696e413be5f (diff) | |
download | mariadb-git-8a88e57c28c4020982fa5b2d9a03fd17149cbe3b.tar.gz |
Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0
mysql-test/r/ndb_charset.result:
Auto merged
mysql-test/r/ndb_index_unique.result:
Auto merged
mysql-test/r/ndb_update.result:
Auto merged
sql/ha_ndbcluster.cc:
Merg
sql/handler.cc:
Merge
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5a9d1e50fd7..f41e47e1b5d 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -551,7 +551,14 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans) if (res == HA_ERR_FOUND_DUPP_KEY) { if (m_rows_to_insert == 1) - m_dupkey= table->s->primary_key; + { + /* + We can only distinguish between primary and non-primary + violations here, so we need to return MAX_KEY for non-primary + to signal that key is unknown + */ + m_dupkey= err.code == 630 ? table->s->primary_key : MAX_KEY; + } else { /* We are batching inserts, offending key is not available */ |