Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c732ed83
Commit
c732ed83
authored
Feb 28, 2002
by
bar@gw.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@work.mysql.com:/home/bk/mysql-4.1
into gw.udmsearch.izhnet.ru:/usr/home/bar/mysql-4.1
parents
99e897e6
1c0a5fd4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
8 deletions
+55
-8
sql/gen_lex_hash.cc
sql/gen_lex_hash.cc
+1
-1
sql/lex.h
sql/lex.h
+9
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+45
-5
No files found.
sql/gen_lex_hash.cc
View file @
c732ed83
...
...
@@ -30,7 +30,7 @@ bool opt_search=0;
int
opt_verbose
=
0
;
ulong
opt_count
=
100000
;
#define max_allowed_array
8
000 // Don't generate bigger arrays than this
#define max_allowed_array
16
000 // Don't generate bigger arrays than this
#define max_symbol 32767 // Use this for 'not found'
#define how_much_for_plus 8 // 2-8
#define type_count 1 // 1-5
...
...
sql/lex.h
View file @
c732ed83
...
...
@@ -159,7 +159,7 @@ static SYMBOL symbols[] = {
{
"FULL"
,
SYM
(
FULL
),
0
,
0
},
{
"FULLTEXT"
,
SYM
(
FULLTEXT_SYM
),
0
,
0
},
{
"FUNCTION"
,
SYM
(
UDF_SYM
),
0
,
0
},
{
"GEOM
"
,
SYM
(
GEOM
_SYM
),
0
,
0
},
{
"GEOM
ETRY"
,
SYM
(
GEOMETRY
_SYM
),
0
,
0
},
{
"GLOBAL"
,
SYM
(
GLOBAL_SYM
),
0
,
0
},
{
"GRANT"
,
SYM
(
GRANT
),
0
,
0
},
{
"GRANTS"
,
SYM
(
GRANTS
),
0
,
0
},
...
...
@@ -453,7 +453,8 @@ static SYMBOL sql_functions[] = {
{
"GEOMETRYCOLLECTION"
,
SYM
(
GEOMETRYCOLLECTION
),
0
,
0
},
{
"GEOMETRYN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_geometryn
)},
{
"GEOMETRYTYPE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_geometry_type
)},
{
"GEOMFROMTEXT"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_geometry_from_text
)},
{
"GEOMCOLLFROMTEXT"
,
SYM
(
GEOMCOLLFROMTEXT
),
0
,
0
},
{
"GEOMFROMTEXT"
,
SYM
(
GEOMFROMTEXT
),
0
,
0
},
{
"GLENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_glength
)},
{
"GREATEST"
,
SYM
(
GREATEST_SYM
),
0
,
0
},
{
"GROUP_UNIQUE_USERS"
,
SYM
(
GROUP_UNIQUE_USERS
),
0
,
0
},
...
...
@@ -471,6 +472,7 @@ static SYMBOL sql_functions[] = {
{
"LCASE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_lcase
)},
{
"LEAST"
,
SYM
(
LEAST_SYM
),
0
,
0
},
{
"LENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_length
)},
{
"LINEFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINESTRING"
,
SYM
(
LINESTRING
),
0
,
0
},
{
"LOAD_FILE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_load_file
)},
{
"LOCATE"
,
SYM
(
LOCATE
),
0
,
0
},
...
...
@@ -487,6 +489,9 @@ static SYMBOL sql_functions[] = {
{
"MID"
,
SYM
(
SUBSTRING
),
0
,
0
},
/* unireg function */
{
"MIN"
,
SYM
(
MIN_SYM
),
0
,
0
},
{
"MOD"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_mod
)},
{
"MLINEFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MPOLYFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MULTILINESTRING"
,
SYM
(
MULTILINESTRING
),
0
,
0
},
{
"MULTIPOINT"
,
SYM
(
MULTIPOINT
),
0
,
0
},
{
"MULTIPOLYGON"
,
SYM
(
MULTIPOLYGON
),
0
,
0
},
...
...
@@ -504,7 +509,9 @@ static SYMBOL sql_functions[] = {
{
"PERIOD_DIFF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_period_diff
)},
{
"PI"
,
SYM
(
FUNC_ARG0
),
0
,
CREATE_FUNC
(
create_func_pi
)},
{
"POINT"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_point
)},
{
"POINTFROMTEXT"
,
SYM
(
POINTFROMTEXT
),
0
,
0
},
{
"POINTN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pointn
)},
{
"POLYFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYGON"
,
SYM
(
POLYGON
),
0
,
0
},
{
"POSITION"
,
SYM
(
POSITION_SYM
),
0
,
0
},
{
"POW"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
...
...
sql/sql_yacc.yy
View file @
c732ed83
...
...
@@ -349,7 +349,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token ENUM
%token FAST_SYM
%token FLOAT_SYM
%token GEOM_SYM
%token GEOM
ETRY
_SYM
%token INT_SYM
%token LIMIT
%token LONGBLOB
...
...
@@ -407,6 +407,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token FORMAT_SYM
%token FOR_SYM
%token FROM_UNIXTIME
%token GEOMCOLLFROMTEXT
%token GEOMFROMTEXT
%token GEOMETRYCOLLECTION
%token GROUP_UNIQUE_USERS
%token HOUR_MINUTE_SYM
...
...
@@ -419,6 +421,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token INTERVAL_SYM
%token LAST_INSERT_ID
%token LEFT
%token LINEFROMTEXT
%token LINESTRING
%token LOCATE
%token MAKE_SET_SYM
...
...
@@ -427,11 +430,16 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token MODE_SYM
%token MODIFY_SYM
%token MONTH_SYM
%token MLINEFROMTEXT
%token MPOINTFROMTEXT
%token MPOLYFROMTEXT
%token MULTILINESTRING
%token MULTIPOINT
%token MULTIPOLYGON
%token NOW_SYM
%token PASSWORD
%token POINTFROMTEXT
%token POLYFROMTEXT
%token POLYGON
%token POSITION_SYM
%token PROCEDURE
...
...
@@ -966,7 +974,7 @@ type:
$$=FIELD_TYPE_TINY_BLOB; }
| BLOB_SYM { Lex->type|=BINARY_FLAG;
$$=FIELD_TYPE_BLOB; }
| GEOM_SYM { Lex->type|=BINARY_FLAG;
| GEOM
ETRY
_SYM { Lex->type|=BINARY_FLAG;
$$=FIELD_TYPE_GEOMETRY; }
| MEDIUMBLOB { Lex->type|=BINARY_FLAG;
$$=FIELD_TYPE_MEDIUM_BLOB; }
...
...
@@ -1722,6 +1730,10 @@ simple_expr:
}
| FIELD_FUNC '(' expr ',' expr_list ')'
{ $$= new Item_func_field($3, *$5); }
| GEOMFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| GEOMFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| GEOMETRYCOLLECTION '(' expr_list ')'
{ $$= new Item_func_spatial_collection(* $3,
Geometry::wkbGeometryCollection,
...
...
@@ -1757,10 +1769,18 @@ simple_expr:
{ $$= new Item_func_locate($5,$3); }
| LOCATE '(' expr ',' expr ',' expr ')'
{ $$= new Item_func_locate($5,$3,$7); }
| GREATEST_SYM '(' expr ',' expr_list ')'
| GEOMCOLLFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| GEOMCOLLFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| GREATEST_SYM '(' expr ',' expr_list ')'
{ $5->push_front($3); $$= new Item_func_max(*$5); }
| LEAST_SYM '(' expr ',' expr_list ')'
{ $5->push_front($3); $$= new Item_func_min(*$5); }
| LINEFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| LINEFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MINUTE_SYM '(' expr ')'
{ $$= new Item_func_minute($3); }
| MONTH_SYM '(' expr ')'
...
...
@@ -1768,7 +1788,19 @@ simple_expr:
| MULTILINESTRING '(' expr_list ')'
{ $$= new Item_func_spatial_collection(* $3,
Geometry::wkbMultiLineString, Geometry::wkbLineString); }
| MULTIPOINT '(' expr_list ')'
| MLINEFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MLINEFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MPOINTFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MPOINTFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MPOLYFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MPOLYFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| MULTIPOINT '(' expr_list ')'
{ $$= new Item_func_spatial_collection(* $3,
Geometry::wkbMultiPoint, Geometry::wkbPoint); }
| MULTIPOLYGON '(' expr_list ')'
...
...
@@ -1782,7 +1814,15 @@ simple_expr:
{
$$= new Item_func_password($3);
}
| POLYGON '(' expr_list ')'
| POINTFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| POINTFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| POLYFROMTEXT '(' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| POLYFROMTEXT '(' expr ',' expr ')'
{ $$= new Item_func_geometry_from_text($3) }
| POLYGON '(' expr_list ')'
{ $$= new Item_func_spatial_collection(* $3,
Geometry::wkbPolygon, Geometry::wkbLineString); }
| POSITION_SYM '(' no_in_expr IN_SYM expr ')'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment