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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
96f4a906
Commit
96f4a906
authored
Sep 11, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8675 Different results of GIS functions on NULL vs NOT NULL columns
parent
aaf6334b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
mysql-test/r/gis.result
mysql-test/r/gis.result
+12
-0
mysql-test/t/gis.test
mysql-test/t/gis.test
+7
-0
sql/item_geofunc.h
sql/item_geofunc.h
+3
-1
No files found.
mysql-test/r/gis.result
View file @
96f4a906
...
@@ -1816,3 +1816,15 @@ disjoint
...
@@ -1816,3 +1816,15 @@ disjoint
select ST_IsRing(NULL);
select ST_IsRing(NULL);
ST_IsRing(NULL)
ST_IsRing(NULL)
-1
-1
#
# MDEV-8675 Different results of GIS functions on NULL vs NOT NULL columns
#
CREATE TABLE t1 (g1 GEOMETRY NOT NULL,g2 GEOMETRY NULL);
CREATE TABLE t2 AS SELECT WITHIN(g1,g1) as w1,WITHIN(g2,g2) AS w2 FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`w1` int(1) DEFAULT NULL,
`w2` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
mysql-test/t/gis.test
View file @
96f4a906
...
@@ -1518,3 +1518,10 @@ select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'
...
@@ -1518,3 +1518,10 @@ select ST_Relate(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)'),'
select
ST_IsRing
(
NULL
);
select
ST_IsRing
(
NULL
);
--
echo
#
--
echo
# MDEV-8675 Different results of GIS functions on NULL vs NOT NULL columns
--
echo
#
CREATE
TABLE
t1
(
g1
GEOMETRY
NOT
NULL
,
g2
GEOMETRY
NULL
);
CREATE
TABLE
t2
AS
SELECT
WITHIN
(
g1
,
g1
)
as
w1
,
WITHIN
(
g2
,
g2
)
AS
w2
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
sql/item_geofunc.h
View file @
96f4a906
...
@@ -287,7 +287,9 @@ protected:
...
@@ -287,7 +287,9 @@ protected:
public:
public:
Item_func_spatial_rel
(
THD
*
thd
,
Item
*
a
,
Item
*
b
,
enum
Functype
sp_rel
)
:
Item_func_spatial_rel
(
THD
*
thd
,
Item
*
a
,
Item
*
b
,
enum
Functype
sp_rel
)
:
Item_bool_func2
(
thd
,
a
,
b
),
spatial_rel
(
sp_rel
)
Item_bool_func2
(
thd
,
a
,
b
),
spatial_rel
(
sp_rel
)
{
}
{
maybe_null
=
true
;
}
enum
Functype
functype
()
const
{
return
spatial_rel
;
}
enum
Functype
functype
()
const
{
return
spatial_rel
;
}
enum
Functype
rev_functype
()
const
{
return
spatial_rel
;
}
enum
Functype
rev_functype
()
const
{
return
spatial_rel
;
}
bool
is_null
()
{
(
void
)
val_int
();
return
null_value
;
}
bool
is_null
()
{
(
void
)
val_int
();
return
null_value
;
}
...
...
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