summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <hf@genie.(none)>2002-10-04 12:48:32 +0500
committerunknown <hf@genie.(none)>2002-10-04 12:48:32 +0500
commit77176c2dca23c755e4c70b267abefe1c65540608 (patch)
treeadd46b174f22d1ee3dc73c096580b356e08e7c4d /sql/sql_table.cc
parente0e1110efff35cedf43e8c672664bd32ea2268eb (diff)
downloadmariadb-git-77176c2dca23c755e4c70b267abefe1c65540608.tar.gz
Geometry field type implementation
sql/field.cc: Field_geom implementations sql/field.h: Necessary additions to Field_geom type sql/ha_myisam.cc: Field_geom works mostly like blob sql/sql_parse.cc: working with FIELD_TYPE_GEOM sql/sql_table.cc: specifying FIELD_TYPE_GEOMETRY flags
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 5a814daaa51..126e37ee3e8 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -351,6 +351,16 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
sql_field->unireg_check=Field::BLOB_FIELD;
blob_columns++;
break;
+ case FIELD_TYPE_GEOMETRY:
+ sql_field->pack_flag=FIELDFLAG_GEOM |
+ pack_length_to_packflag(sql_field->pack_length -
+ portable_sizeof_char_ptr);
+ if (sql_field->flags & BINARY_FLAG)
+ sql_field->pack_flag|=FIELDFLAG_BINARY;
+ sql_field->length=8; // Unireg field length
+ sql_field->unireg_check=Field::BLOB_FIELD;
+ blob_columns++;
+ break;
case FIELD_TYPE_VAR_STRING:
case FIELD_TYPE_STRING:
sql_field->pack_flag=0;