Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf 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-10-01 16:36:26+05:00, holyfoot@stripped +3 -0
bug #21790 (UNKNOWN ERROR message in geometry)
We issued UNKNOWN ERROR initially in this place and forgot to
fix it when we implemented informative error message for this
mysql-test/r/gis-rtree.result@stripped, 2006-10-01 16:36:23+05:00, holyfoot@stripped +8 -0
test result
mysql-test/t/gis-rtree.test@stripped, 2006-10-01 16:36:23+05:00, holyfoot@stripped +12 -0
test case
sql/handler.cc@stripped, 2006-10-01 16:36:23+05:00, holyfoot@stripped +2 -2
let's issue informative error message here
# 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: holyfoot
# Host: deer.(none)
# Root: /home/hf/work/21790/my50-21790
--- 1.220/sql/handler.cc 2006-10-01 16:36:33 +05:00
+++ 1.221/sql/handler.cc 2006-10-01 16:36:33 +05:00
@@ -1788,8 +1788,8 @@ void handler::print_error(int error, myf
break;
}
case HA_ERR_NULL_IN_SPATIAL:
- textno= ER_UNKNOWN_ERROR;
- break;
+ my_error(ER_CANT_CREATE_GEOMETRY_OBJECT, MYF(0));
+ DBUG_VOID_RETURN;
case HA_ERR_FOUND_DUPP_UNIQUE:
textno=ER_DUP_UNIQUE;
break;
--- 1.18/mysql-test/r/gis-rtree.result 2006-10-01 16:36:33 +05:00
+++ 1.19/mysql-test/r/gis-rtree.result 2006-10-01 16:36:33 +05:00
@@ -862,3 +862,11 @@ CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
+CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
+INSERT INTO t1(foo) VALUES (NULL);
+ERROR 23000: Column 'foo' cannot be null
+INSERT INTO t1() VALUES ();
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+INSERT INTO t1(foo) VALUES ('');
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+DROP TABLE t1;
--- 1.17/mysql-test/t/gis-rtree.test 2006-10-01 16:36:33 +05:00
+++ 1.18/mysql-test/t/gis-rtree.test 2006-10-01 16:36:33 +05:00
@@ -232,3 +232,15 @@ CHECK TABLE t1 EXTENDED;
DROP TABLE t1;
# End of 4.1 tests
+
+#
+# bug #21790 (UNKNOWN ERROR on NULLs in RTree)
+#
+CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
+--error 1048
+INSERT INTO t1(foo) VALUES (NULL);
+--error 1416
+INSERT INTO t1() VALUES ();
+--error 1416
+INSERT INTO t1(foo) VALUES ('');
+DROP TABLE t1;
| Thread |
|---|
| • bk commit into 5.0 tree (holyfoot:1.2293) BUG#21790 | holyfoot | 1 Oct |