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
This commit is contained in:
unknown 2006-10-16 10:42:04 +02:00
commit b19aabd81a

View file

@ -561,7 +561,14 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
if (res == HA_ERR_FOUND_DUPP_KEY)
{
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
{
/* We are batching inserts, offending key is not available */