mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #6516 (Server crash loading spatial data)
(after discussion with SerG) include/my_base.h: Handler error code added myisam/mi_write.c: New error code handled myisam/rt_index.c: check for zero length added myisam/sp_key.c: zero length check added mysql-test/r/gis-rtree.result: appropriate test result mysql-test/t/gis-rtree.test: test case sql/handler.cc: new error code handling added
This commit is contained in:
@@ -1083,6 +1083,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;
|
||||
@@ -1196,7 +1199,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user