summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index e43f2c2e888..d6ce85f6a13 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1232,6 +1232,9 @@ void handler::print_error(int error, myf errflag)
textno=ER_DUP_KEY;
break;
}
+ case HA_ERR_NULL_IN_SPATIAL:
+ textno= ER_UNKNOWN_ERROR;
+ DBUG_VOID_RETURN;
case HA_ERR_FOUND_DUPP_UNIQUE:
textno=ER_DUP_UNIQUE;
break;
@@ -1345,7 +1348,8 @@ uint handler::get_dup_key(int error)
{
DBUG_ENTER("handler::get_dup_key");
table->file->errkey = (uint) -1;
- if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOUND_DUPP_UNIQUE)
+ if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOUND_DUPP_UNIQUE ||
+ error == HA_ERR_NULL_IN_SPATIAL)
info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK);
DBUG_RETURN(table->file->errkey);
}