summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy15
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; }