mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
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:
commit
b19aabd81a
1 changed files with 8 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue