diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2014-12-03 14:07:43 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2014-12-03 16:45:02 +0400 |
commit | ae8237995790f5e3d4769f08db5324791e39c197 (patch) | |
tree | 323ba0713ab244b6551b40eac81b7046e22a5c63 /sql/sql_yacc.yy | |
parent | cfb7ee1cba9416a817708d4e93458668729a2668 (diff) | |
download | mariadb-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_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 2b2c9c95766..3c526b59f5e 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1023,7 +1023,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); Currently there are 164 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 164 +%expect 165 /* Comments for TOKENS. @@ -1565,6 +1565,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token SQL_SMALL_RESULT %token SQL_SYM /* SQL-2003-R */ %token SQL_THREAD +%token REF_SYSTEM_ID_SYM %token SSL_SYM %token STARTING %token STARTS_SYM @@ -6315,7 +6316,7 @@ field_type: Lex->charset=&my_charset_bin; $$=MYSQL_TYPE_BLOB; } - | spatial_type + | spatial_type float_options srid_option { #ifdef HAVE_SPATIAL Lex->charset=&my_charset_bin; @@ -6430,6 +6431,16 @@ real_type: { $$=MYSQL_TYPE_DOUBLE; } ; +srid_option: + /* empty */ + { Lex->last_field->srid= 0; } + | + REF_SYSTEM_ID_SYM EQ NUM + { + Lex->last_field->srid=atoi($3.str); + } + ; + float_options: /* empty */ { Lex->dec=Lex->length= (char*)0; } |