summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <ram@mysql.r18.ru>2003-02-26 20:25:48 +0400
committerunknown <ram@mysql.r18.ru>2003-02-26 20:25:48 +0400
commit9b7ebb928ca407c5a6ec19d89f7b95f43b601222 (patch)
treefdab876dd3d590d72bcc4999871c2cf77c42518e /sql/sql_table.cc
parent29a99fa0bee7136d10214d84aa3b484168b60c46 (diff)
downloadmariadb-git-9b7ebb928ca407c5a6ec19d89f7b95f43b601222.tar.gz
All segments of SPATIAL keys MUST be NOT NULL.
Allow NULL geometry fields. include/mysqld_error.h: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/czech/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/danish/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/dutch/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/english/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/estonian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/french/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/german/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/greek/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/hungarian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/italian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/japanese/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/korean/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/norwegian-ny/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/norwegian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/polish/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/portuguese/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/romanian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/russian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/serbian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/slovak/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/spanish/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/swedish/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL" sql/share/ukrainian/errmsg.txt: new error message: "All parts of a SPATIAL KEY must be NOT NULL"
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 699818b19fd..a8428d4f3da 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -478,11 +478,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
blob_columns++;
break;
case FIELD_TYPE_GEOMETRY:
- if (!(sql_field->flags & NOT_NULL_FLAG))
- {
- my_error(ER_BAD_NULL_ERROR, MYF(0), sql_field->field_name);
- DBUG_RETURN(-1);
- }
sql_field->pack_flag=FIELDFLAG_GEOM |
pack_length_to_packflag(sql_field->pack_length -
portable_sizeof_char_ptr);
@@ -741,6 +736,11 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
MYF(0),column->field_name);
DBUG_RETURN(-1);
}
+ if (key->type == Key::SPATIAL)
+ {
+ my_error(ER_SPATIAL_CANT_HAVE_NULL, MYF(0));
+ DBUG_RETURN(-1);
+ }
key_info->flags|= HA_NULL_PART_KEY;
}
if (MTYP_TYPENR(sql_field->unireg_check) == Field::NEXT_NUMBER)