Commit 2c0208a4 authored by mskold/marty@linux.site's avatar mskold/marty@linux.site

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

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1
parents e6be42e1 e7f69b42
......@@ -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 */
......
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