Commit b19aabd8 authored by unknown's avatar unknown

Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1


mysql-test/r/ndb_charset.result:
  Usin g local, will re-generate.
mysql-test/r/ndb_index_unique.result:
  Using local, will re-generate
mysql-test/r/ndb_update.result:
  Using local, will re-generate
sql/ha_ndbcluster.cc:
  Merge
sql/handler.cc:
  Merge
parents ef9e4ab6 8a88e57c
...@@ -561,7 +561,14 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans) ...@@ -561,7 +561,14 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
if (res == HA_ERR_FOUND_DUPP_KEY) if (res == HA_ERR_FOUND_DUPP_KEY)
{ {
if (m_rows_to_insert == 1) if (m_rows_to_insert == 1)
m_dupkey= table_share->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_share->primary_key : MAX_KEY;
}
else else
{ {
/* We are batching inserts, offending key is not available */ /* We are batching inserts, offending key is not available */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment