mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
GIS-related tests started to fail as some related functions
don't return NULL-s anymore, and actually they're not BOOLEAN. Fixed.
This commit is contained in:
@ -1189,7 +1189,7 @@ create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varbinary(21) DEFAULT NULL
|
`c1` varbinary(2) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
||||||
@ -1199,7 +1199,7 @@ create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varbinary(21) DEFAULT NULL
|
`c1` varbinary(2) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
||||||
|
@ -1583,7 +1583,7 @@ create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
||||||
@ -1593,7 +1593,7 @@ create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
||||||
|
@ -1865,7 +1865,7 @@ create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) DEFAULT NULL
|
`c1` varchar(2) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
||||||
@ -1875,7 +1875,7 @@ create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) DEFAULT NULL
|
`c1` varchar(2) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
||||||
|
@ -2772,7 +2772,7 @@ create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
||||||
@ -2782,7 +2782,7 @@ create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
||||||
|
@ -3640,7 +3640,7 @@ create table t1 as select concat(IsSimple(GeomFromText('Point(1 1)'))) as c1;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
select hex(concat(IsClosed(GeomFromText('LineString(1 1,2 2)'))));
|
||||||
@ -3650,7 +3650,7 @@ create table t1 as select concat(IsClosed(GeomFromText('LineString(1 1,2 2)')))
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
|
`c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
select hex(concat(Equals(GeomFromText('Point(1 1)'),GeomFromText('Point(1 1)'))));
|
||||||
|
@ -395,7 +395,7 @@ first second w c o e d t i r
|
|||||||
120 120 1 1 0 1 0 0 1 0
|
120 120 1 1 0 1 0 0 1 0
|
||||||
120 121 0 0 1 0 0 0 1 0
|
120 121 0 0 1 0 0 0 1 0
|
||||||
121 120 0 0 1 0 0 0 1 0
|
121 120 0 0 1 0 0 0 1 0
|
||||||
121 121 1 1 0 1 0 1 1 0
|
121 121 1 1 0 1 0 0 1 0
|
||||||
explain extended SELECT g1.fid as first, g2.fid as second,
|
explain extended SELECT g1.fid as first, g2.fid as second,
|
||||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||||
@ -494,7 +494,7 @@ mbroverlaps
|
|||||||
down,left,right,up
|
down,left,right,up
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
mbrtouches
|
mbrtouches
|
||||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
down2,left2,right2,up2
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
mbrwithin
|
mbrwithin
|
||||||
big,center
|
big,center
|
||||||
@ -515,7 +515,7 @@ overlaps
|
|||||||
down,left,right,up
|
down,left,right,up
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
touches
|
touches
|
||||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
down2,left2,right2,up2
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
within
|
within
|
||||||
big,center
|
big,center
|
||||||
|
@ -395,7 +395,7 @@ first second w c o e d t i r
|
|||||||
120 120 1 1 0 1 0 0 1 0
|
120 120 1 1 0 1 0 0 1 0
|
||||||
120 121 0 0 1 0 0 0 1 0
|
120 121 0 0 1 0 0 0 1 0
|
||||||
121 120 0 0 1 0 0 0 1 0
|
121 120 0 0 1 0 0 0 1 0
|
||||||
121 121 1 1 0 1 0 1 1 0
|
121 121 1 1 0 1 0 0 1 0
|
||||||
explain extended SELECT g1.fid as first, g2.fid as second,
|
explain extended SELECT g1.fid as first, g2.fid as second,
|
||||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||||
@ -494,7 +494,7 @@ mbroverlaps
|
|||||||
down,left,right,up
|
down,left,right,up
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
mbrtouches
|
mbrtouches
|
||||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
down2,left2,right2,up2
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
mbrwithin
|
mbrwithin
|
||||||
big,center
|
big,center
|
||||||
@ -515,7 +515,7 @@ overlaps
|
|||||||
down,left,right,up
|
down,left,right,up
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
touches
|
touches
|
||||||
big,center,down,down2,left,left2,right,right2,small,up,up2
|
down2,left2,right2,up2
|
||||||
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
|
||||||
within
|
within
|
||||||
big,center
|
big,center
|
||||||
|
@ -415,24 +415,28 @@ public:
|
|||||||
void fix_length_and_dec() { maybe_null= 1; }
|
void fix_length_and_dec() { maybe_null= 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Item_func_issimple: public Item_bool_func
|
class Item_func_issimple: public Item_int_func
|
||||||
{
|
{
|
||||||
Gcalc_heap collector;
|
Gcalc_heap collector;
|
||||||
Gcalc_function func;
|
Gcalc_function func;
|
||||||
Gcalc_scan_iterator scan_it;
|
Gcalc_scan_iterator scan_it;
|
||||||
String tmp;
|
String tmp;
|
||||||
public:
|
public:
|
||||||
Item_func_issimple(Item *a): Item_bool_func(a) {}
|
Item_func_issimple(Item *a): Item_int_func(a) {}
|
||||||
longlong val_int();
|
longlong val_int();
|
||||||
const char *func_name() const { return "st_issimple"; }
|
const char *func_name() const { return "st_issimple"; }
|
||||||
|
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||||
|
uint decimal_precision() const { return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Item_func_isclosed: public Item_bool_func
|
class Item_func_isclosed: public Item_int_func
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Item_func_isclosed(Item *a): Item_bool_func(a) {}
|
Item_func_isclosed(Item *a): Item_int_func(a) {}
|
||||||
longlong val_int();
|
longlong val_int();
|
||||||
const char *func_name() const { return "st_isclosed"; }
|
const char *func_name() const { return "st_isclosed"; }
|
||||||
|
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||||
|
uint decimal_precision() const { return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Item_func_isring: public Item_func_issimple
|
class Item_func_isring: public Item_func_issimple
|
||||||
|
Reference in New Issue
Block a user