summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/gluh.(none)>2006-12-11 15:32:07 +0400
committerunknown <gluh@mysql.com/gluh.(none)>2006-12-11 15:32:07 +0400
commit1c1c35d2b5c27172e3d9becd76c8fe01db118647 (patch)
tree7876c9f317876b6a9650ce0fb0639cdf220801f7 /mysql-test
parentc586037a45a8f88c66540a141f20ff67c0a73319 (diff)
parent63fce3a24e33407d58a17ec2946caa08e6c1b537 (diff)
downloadmariadb-git-1c1c35d2b5c27172e3d9becd76c8fe01db118647.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1-opt
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/gis.result6
-rw-r--r--mysql-test/std_data/bad_gis_data.dat1
-rw-r--r--mysql-test/t/gis.test11
3 files changed, 16 insertions, 2 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index f7066e7edca..ce2b5deadbd 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -671,3 +671,9 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def asbinary(g) 252 8192 0 Y 128 0 63
asbinary(g)
drop table t1;
+create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
+alter table t1 disable keys;
+load data infile '../../std_data/bad_gis_data.dat' into table t1;
+ERROR 01000: Data truncated; NULL supplied to NOT NULL column 'b' at row 1
+alter table t1 enable keys;
+drop table t1;
diff --git a/mysql-test/std_data/bad_gis_data.dat b/mysql-test/std_data/bad_gis_data.dat
new file mode 100644
index 00000000000..257cc5642cb
--- /dev/null
+++ b/mysql-test/std_data/bad_gis_data.dat
@@ -0,0 +1 @@
+foo
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index b66b97c2c41..1ae4f0ae62f 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -363,11 +363,18 @@ drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
-# End of 4.1 tests
-
--enable_metadata
create table t1 (g GEOMETRY);
select * from t1;
select asbinary(g) from t1;
--disable_metadata
drop table t1;
+
+create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
+alter table t1 disable keys;
+--error 1263
+load data infile '../../std_data/bad_gis_data.dat' into table t1;
+alter table t1 enable keys;
+drop table t1;
+
+# End of 4.1 tests