summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 21:29:30 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 21:29:30 +0100
commit830c42a06a6d28e38d0aa3e53e90618e28d957ef (patch)
tree38266050a8af42ed9caf70c71680a548d17a930a /sql/handler.cc
parentbf442fcaae7772f00c04e180cee81304f288b31e (diff)
downloadmariadb-git-830c42a06a6d28e38d0aa3e53e90618e28d957ef.tar.gz
Backport of bug#38719 from 6.0 to 5.1
handler::get_dup_key used the called handler for the info call, but used table->file handler for errkey. Fixed by using table->file->info instead. mysql-test/r/partition_error.result: Bug#38719: Partitioning returns a different error code for a duplicate key error Added test for verification mysql-test/t/partition_error.test: Bug#38719: Partitioning returns a different error code for a duplicate key error Added test for verification
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 853ab29d38a..18c8e6c1f5a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -2932,7 +2932,7 @@ uint handler::get_dup_key(int error)
if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOREIGN_DUPLICATE_KEY ||
error == HA_ERR_FOUND_DUPP_UNIQUE || error == HA_ERR_NULL_IN_SPATIAL ||
error == HA_ERR_DROP_INDEX_FK)
- info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK);
+ table->file->info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK);
DBUG_RETURN(table->file->errkey);
}