summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2014-12-03 14:07:43 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2014-12-03 16:45:02 +0400
commitae8237995790f5e3d4769f08db5324791e39c197 (patch)
tree323ba0713ab244b6551b40eac81b7046e22a5c63 /sql/sql_show.cc
parentcfb7ee1cba9416a817708d4e93458668729a2668 (diff)
downloadmariadb-git-mdev-60-merge.tar.gz
MDEV-60 Support for Spatial Reference systems for the GIS data.mdev-60-merge
The GEOMETRY field metadata is stored in the FRM file. SRID for a spatial column now can be stored, it was added to the CREATE TABLE syntax, so the AddGeometryData() stored procedure is now possible. Script adding the required Add/DropGeometryColumn sp-s added.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 0541cbcc300..5a4c689db4c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -396,23 +396,23 @@ static int get_geometry_column_record(THD *thd, TABLE_LIST *tables,
/*F_TABLE_NAME*/
table->field[2]->store(table_name->str, table_name->length, cs);
/*G_TABLE_CATALOG*/
- table->field[3]->store(STRING_WITH_LEN("def"), cs);
+ table->field[4]->store(STRING_WITH_LEN("def"), cs);
/*G_TABLE_SCHEMA*/
- table->field[4]->store(db_name->str, db_name->length, cs);
+ table->field[5]->store(db_name->str, db_name->length, cs);
/*G_TABLE_NAME*/
- table->field[5]->store(table_name->str, table_name->length, cs);
+ table->field[6]->store(table_name->str, table_name->length, cs);
/*G_GEOMETRY_COLUMN*/
- table->field[6]->store(field->field_name, strlen(field->field_name), cs);
+ table->field[7]->store(field->field_name, strlen(field->field_name), cs);
/*STORAGE_TYPE*/
- table->field[7]->store(1LL, TRUE); /*Always 1 (binary implementation)*/
+ table->field[8]->store(1LL, TRUE); /*Always 1 (binary implementation)*/
/*GEOMETRY_TYPE*/
- table->field[8]->store((longlong) (fg->get_geometry_type()), TRUE);
+ table->field[9]->store((longlong) (fg->get_geometry_type()), TRUE);
/*COORD_DIMENSION*/
- table->field[9]->store(2LL, TRUE);
+ table->field[10]->store(2LL, TRUE);
/*MAX_PPR*/
- table->field[10]->set_null();
+ table->field[11]->set_null();
/*SRID*/
- table->field[11]->store((longlong) (fg->get_srid()), TRUE);
+ table->field[12]->store((longlong) (fg->get_srid()), TRUE);
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
@@ -5554,7 +5554,7 @@ bool store_schema_params(THD *thd, TABLE *table, TABLE *proc_table,
field= make_field(&share, (uchar*) 0, field_def->length,
(uchar*) "", 0, field_def->pack_flag,
field_def->sql_type, field_def->charset,
- field_def->geom_type, Field::NONE,
+ field_def->geom_type, field_def->srid, Field::NONE,
field_def->interval, "");
field->table= &tbl;
@@ -5607,7 +5607,7 @@ bool store_schema_params(THD *thd, TABLE *table, TABLE *proc_table,
field= make_field(&share, (uchar*) 0, field_def->length,
(uchar*) "", 0, field_def->pack_flag,
field_def->sql_type, field_def->charset,
- field_def->geom_type, Field::NONE,
+ field_def->geom_type, field_def->srid, Field::NONE,
field_def->interval, spvar->name.str);
field->table= &tbl;
@@ -5706,7 +5706,7 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
field= make_field(&share, (uchar*) 0, field_def->length,
(uchar*) "", 0, field_def->pack_flag,
field_def->sql_type, field_def->charset,
- field_def->geom_type, Field::NONE,
+ field_def->geom_type, field_def->srid, Field::NONE,
field_def->interval, "");
field->table= &tbl;