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
16ce6b71
Commit
16ce6b71
authored
Apr 02, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.r18.ru:/usr/home/ram/work/mysql-4.1.sp
parents
a58b6620
1e32810a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
mysql-test/r/gis.result
mysql-test/r/gis.result
+5
-5
mysql-test/t/gis.test
mysql-test/t/gis.test
+5
-5
sql/lex.h
sql/lex.h
+15
-2
No files found.
mysql-test/r/gis.result
View file @
16ce6b71
...
@@ -47,23 +47,23 @@ INSERT INTO pt VALUES
...
@@ -47,23 +47,23 @@ INSERT INTO pt VALUES
INSERT INTO ls VALUES
INSERT INTO ls VALUES
(105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
(105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
(107,
Geometry
FromWKB(LineString(Point(10, 10), Point(40, 10))));
(107,
LineString
FromWKB(LineString(Point(10, 10), Point(40, 10))));
INSERT INTO p VALUES
INSERT INTO p VALUES
(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
(110,
Geometr
yFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
(110,
Pol
yFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
INSERT INTO mpt VALUES
INSERT INTO mpt VALUES
(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
(113,
Geometry
FromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
(113,
MPoint
FromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
INSERT INTO mls VALUES
INSERT INTO mls VALUES
(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
(116,
Geometry
FromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
(116,
MLine
FromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
INSERT INTO mp VALUES
INSERT INTO mp VALUES
(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(119,
Geometr
yFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
(119,
MPol
yFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
INSERT INTO gc VALUES
INSERT INTO gc VALUES
(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
...
...
mysql-test/t/gis.test
View file @
16ce6b71
...
@@ -34,28 +34,28 @@ INSERT INTO pt VALUES
...
@@ -34,28 +34,28 @@ INSERT INTO pt VALUES
INSERT
INTO
ls
VALUES
INSERT
INTO
ls
VALUES
(
105
,
LineFromText
(
'LINESTRING(0 0,0 10,10 0)'
)),
(
105
,
LineFromText
(
'LINESTRING(0 0,0 10,10 0)'
)),
(
106
,
LineStringFromText
(
'LINESTRING(10 10,20 10,20 20,10 20,10 10)'
)),
(
106
,
LineStringFromText
(
'LINESTRING(10 10,20 10,20 20,10 20,10 10)'
)),
(
107
,
Geometry
FromWKB
(
LineString
(
Point
(
10
,
10
),
Point
(
40
,
10
))));
(
107
,
LineString
FromWKB
(
LineString
(
Point
(
10
,
10
),
Point
(
40
,
10
))));
INSERT
INTO
p
VALUES
INSERT
INTO
p
VALUES
(
108
,
PolygonFromText
(
'POLYGON((10 10,20 10,20 20,10 20,10 10))'
)),
(
108
,
PolygonFromText
(
'POLYGON((10 10,20 10,20 20,10 20,10 10))'
)),
(
109
,
PolyFromText
(
'POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'
)),
(
109
,
PolyFromText
(
'POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'
)),
(
110
,
Geometr
yFromWKB
(
Polygon
(
LineString
(
Point
(
0
,
0
),
Point
(
30
,
0
),
Point
(
30
,
30
),
Point
(
0
,
0
)))));
(
110
,
Pol
yFromWKB
(
Polygon
(
LineString
(
Point
(
0
,
0
),
Point
(
30
,
0
),
Point
(
30
,
30
),
Point
(
0
,
0
)))));
INSERT
INTO
mpt
VALUES
INSERT
INTO
mpt
VALUES
(
111
,
MultiPointFromText
(
'MULTIPOINT(0 0,10 10,10 20,20 20)'
)),
(
111
,
MultiPointFromText
(
'MULTIPOINT(0 0,10 10,10 20,20 20)'
)),
(
112
,
MPointFromText
(
'MULTIPOINT(1 1,11 11,11 21,21 21)'
)),
(
112
,
MPointFromText
(
'MULTIPOINT(1 1,11 11,11 21,21 21)'
)),
(
113
,
Geometry
FromWKB
(
MultiPoint
(
Point
(
3
,
6
),
Point
(
4
,
10
))));
(
113
,
MPoint
FromWKB
(
MultiPoint
(
Point
(
3
,
6
),
Point
(
4
,
10
))));
INSERT
INTO
mls
VALUES
INSERT
INTO
mls
VALUES
(
114
,
MultiLineStringFromText
(
'MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))'
)),
(
114
,
MultiLineStringFromText
(
'MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))'
)),
(
115
,
MLineFromText
(
'MULTILINESTRING((10 48,10 21,10 0))'
)),
(
115
,
MLineFromText
(
'MULTILINESTRING((10 48,10 21,10 0))'
)),
(
116
,
Geometry
FromWKB
(
MultiLineString
(
LineString
(
Point
(
1
,
2
),
Point
(
3
,
5
)),
LineString
(
Point
(
2
,
5
),
Point
(
5
,
8
),
Point
(
21
,
7
)))));
(
116
,
MLine
FromWKB
(
MultiLineString
(
LineString
(
Point
(
1
,
2
),
Point
(
3
,
5
)),
LineString
(
Point
(
2
,
5
),
Point
(
5
,
8
),
Point
(
21
,
7
)))));
INSERT
INTO
mp
VALUES
INSERT
INTO
mp
VALUES
(
117
,
MultiPolygonFromText
(
'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'
)),
(
117
,
MultiPolygonFromText
(
'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'
)),
(
118
,
MPolyFromText
(
'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'
)),
(
118
,
MPolyFromText
(
'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'
)),
(
119
,
Geometr
yFromWKB
(
MultiPolygon
(
Polygon
(
LineString
(
Point
(
0
,
3
),
Point
(
3
,
3
),
Point
(
3
,
0
),
Point
(
0
,
3
))))));
(
119
,
MPol
yFromWKB
(
MultiPolygon
(
Polygon
(
LineString
(
Point
(
0
,
3
),
Point
(
3
,
3
),
Point
(
3
,
0
),
Point
(
0
,
3
))))));
INSERT
INTO
gc
VALUES
INSERT
INTO
gc
VALUES
(
120
,
GeomCollFromText
(
'GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'
)),
(
120
,
GeomCollFromText
(
'GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'
)),
...
...
sql/lex.h
View file @
16ce6b71
...
@@ -494,11 +494,13 @@ static SYMBOL sql_functions[] = {
...
@@ -494,11 +494,13 @@ static SYMBOL sql_functions[] = {
{
"GEOMETRYN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_geometryn
)},
{
"GEOMETRYN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_geometryn
)},
{
"GEOMETRYTYPE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_geometry_type
)},
{
"GEOMETRYTYPE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_geometry_type
)},
{
"GEOMCOLLFROMTEXT"
,
SYM
(
GEOMCOLLFROMTEXT
),
0
,
0
},
{
"GEOMCOLLFROMTEXT"
,
SYM
(
GEOMCOLLFROMTEXT
),
0
,
0
},
{
"GEOMCOLLFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GEOMETRYCOLLECTIONFROMTEXT"
,
SYM
(
GEOMCOLLFROMTEXT
),
0
,
0
},
{
"GEOMETRYCOLLECTIONFROMTEXT"
,
SYM
(
GEOMCOLLFROMTEXT
),
0
,
0
},
{
"GEOM
FROMTEXT"
,
SYM
(
GEOMFROMTEXT
),
0
,
0
},
{
"GEOM
ETRYCOLLECTIONFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GEOMETRYFROMTEXT"
,
SYM
(
GEOMFROMTEXT
),
0
,
0
},
{
"GEOMETRYFROMTEXT"
,
SYM
(
GEOMFROMTEXT
),
0
,
0
},
{
"GEOMFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GEOMETRYFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GEOMETRYFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GEOMFROMTEXT"
,
SYM
(
GEOMFROMTEXT
),
0
,
0
},
{
"GEOMFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"GLENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_glength
)},
{
"GLENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_glength
)},
{
"GREATEST"
,
SYM
(
GREATEST_SYM
),
0
,
0
},
{
"GREATEST"
,
SYM
(
GREATEST_SYM
),
0
,
0
},
{
"GROUP_UNIQUE_USERS"
,
SYM
(
GROUP_UNIQUE_USERS
),
0
,
0
},
{
"GROUP_UNIQUE_USERS"
,
SYM
(
GROUP_UNIQUE_USERS
),
0
,
0
},
...
@@ -521,7 +523,9 @@ static SYMBOL sql_functions[] = {
...
@@ -521,7 +523,9 @@ static SYMBOL sql_functions[] = {
{
"LENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_length
)},
{
"LENGTH"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_length
)},
{
"LN"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_ln
)},
{
"LN"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_ln
)},
{
"LINEFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINEFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINEFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"LINESTRINGFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINESTRINGFROMTEXT"
,
SYM
(
LINEFROMTEXT
),
0
,
0
},
{
"LINESTRINGFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"LOAD_FILE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_load_file
)},
{
"LOAD_FILE"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_load_file
)},
{
"LOCATE"
,
SYM
(
LOCATE
),
0
,
0
},
{
"LOCATE"
,
SYM
(
LOCATE
),
0
,
0
},
{
"LOG"
,
SYM
(
LOG_SYM
),
0
,
0
},
{
"LOG"
,
SYM
(
LOG_SYM
),
0
,
0
},
...
@@ -544,12 +548,18 @@ static SYMBOL sql_functions[] = {
...
@@ -544,12 +548,18 @@ static SYMBOL sql_functions[] = {
{
"MID"
,
SYM
(
SUBSTRING
),
0
,
0
},
/* unireg function */
{
"MID"
,
SYM
(
SUBSTRING
),
0
,
0
},
/* unireg function */
{
"MIN"
,
SYM
(
MIN_SYM
),
0
,
0
},
{
"MIN"
,
SYM
(
MIN_SYM
),
0
,
0
},
{
"MLINEFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MLINEFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MLINEFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"MPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MPOINTFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"MPOLYFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MPOLYFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MPOLYFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"MONTHNAME"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_monthname
)},
{
"MONTHNAME"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_monthname
)},
{
"MULTILINESTRINGFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MULTILINESTRINGFROMTEXT"
,
SYM
(
MLINEFROMTEXT
),
0
,
0
},
{
"MULTILINESTRINGFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"MULTIPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MULTIPOINTFROMTEXT"
,
SYM
(
MPOINTFROMTEXT
),
0
,
0
},
{
"MULTIPOINTFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"MULTIPOLYGONFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MULTIPOLYGONFROMTEXT"
,
SYM
(
MPOLYFROMTEXT
),
0
,
0
},
{
"MULTIPOLYGONFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"NOW"
,
SYM
(
NOW_SYM
),
0
,
0
},
{
"NOW"
,
SYM
(
NOW_SYM
),
0
,
0
},
{
"NULLIF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_nullif
)},
{
"NULLIF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_nullif
)},
{
"NUMGEOMETRIES"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numgeometries
)},
{
"NUMGEOMETRIES"
,
SYM
(
FUNC_ARG1
),
0
,
CREATE_FUNC
(
create_func_numgeometries
)},
...
@@ -564,9 +574,12 @@ static SYMBOL sql_functions[] = {
...
@@ -564,9 +574,12 @@ static SYMBOL sql_functions[] = {
{
"PERIOD_DIFF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_period_diff
)},
{
"PERIOD_DIFF"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_period_diff
)},
{
"PI"
,
SYM
(
FUNC_ARG0
),
0
,
CREATE_FUNC
(
create_func_pi
)},
{
"PI"
,
SYM
(
FUNC_ARG0
),
0
,
CREATE_FUNC
(
create_func_pi
)},
{
"POINTFROMTEXT"
,
SYM
(
POINTFROMTEXT
),
0
,
0
},
{
"POINTFROMTEXT"
,
SYM
(
POINTFROMTEXT
),
0
,
0
},
{
"POINTFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"POINTN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pointn
)},
{
"POINTN"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pointn
)},
{
"POLYFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"POLYGONFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYGONFROMTEXT"
,
SYM
(
POLYFROMTEXT
),
0
,
0
},
{
"POLYGONFROMWKB"
,
SYM
(
GEOMFROMWKB
),
0
,
0
},
{
"POSITION"
,
SYM
(
POSITION_SYM
),
0
,
0
},
{
"POSITION"
,
SYM
(
POSITION_SYM
),
0
,
0
},
{
"POW"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
{
"POW"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
{
"POWER"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
{
"POWER"
,
SYM
(
FUNC_ARG2
),
0
,
CREATE_FUNC
(
create_func_pow
)},
...
...
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