diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-12-06 21:45:57 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-12-06 21:45:57 +0400 |
commit | fa115a0f2cb76106471bb3da0deae805cced557e (patch) | |
tree | f13904c0c168668e3c0cec9d60b89555b49c58ae /mysql-test/r/gis.result | |
parent | 0184996b991dbb0d27e8a709894db0109f539a8d (diff) | |
download | mariadb-git-fa115a0f2cb76106471bb3da0deae805cced557e.tar.gz |
bug #22372 (LOAD DATA crashes the table with the geometry field)
The problem is that the GEOMETRY NOT NULL can't automatically set
any value as a default one. We always tried to complete LOAD DATA
command even if there's not enough data in file. That doesn't work
for GEOMETRY NOT NULL. Now Field_*::reset() returns an error sign
and it's checked in mysql_load()
mysql-test/r/gis.result:
test result
mysql-test/t/gis.test:
testcase
sql/field.cc:
reset() now returns error sign
sql/field.h:
Field_*::reset() now returns error sign if the field can't be reset
sql/sql_load.cc:
check if field can't be reset and return error if it's so
Diffstat (limited to 'mysql-test/r/gis.result')
-rw-r--r-- | mysql-test/r/gis.result | 6 |
1 files changed, 6 insertions, 0 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; |