Below is the list of changes that have just been committed into a local
5.0 repository of hartmut. When hartmut does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-07-19 15:20:30+02:00, hartmut@stripped +1 -0
Don't return a key id for non-PK unique key violations
as the information is not available from the NDBAPI
error object. Always returning the id of the primary
key was obviously wrong here for non-unique keys.
(see Bug #21072)
sql/ha_ndbcluster.cc@stripped, 2006-07-19 15:20:23+02:00, hartmut@stripped +5 -1
Don't return a key id for non-PK unique key violations
as the information is not available from the NDBAPI
error object. Always returning the id of the primary
key was obviously wrong here for non-unique keys.
(see Bug #21072)
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: hartmut
# Host: linux.site
# Root: /home/hartmut/projects/mysql/dev/5.0
--- 1.273/sql/ha_ndbcluster.cc 2006-07-19 15:20:39 +02:00
+++ 1.274/sql/ha_ndbcluster.cc 2006-07-19 15:20:39 +02:00
@@ -545,7 +545,11 @@
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 -1 for non-primary
+ m_dupkey= err.code == 630 ? table->s->primary_key : (uint) -1;
+ }
else
{
/* We are batching inserts, offending key is not available */
| Thread |
|---|
| • bk commit into 5.0 tree (hartmut:1.2227) BUG#21072 | 'Hartmut Holzgraefe' | 19 Jul |