cp open-source ut fail & geo 4016 union

This commit is contained in:
wu-xingying
2024-04-22 17:41:52 +00:00
committed by ob-robot
parent 0f00f1a727
commit 82c173f560
9 changed files with 116 additions and 42 deletions

View File

@ -638,3 +638,10 @@ ALTER TABLE test_wrong_table MODIFY COLUMN the_geom varbinary(200) NOT NULL;
ERROR 42000: A SPATIAL index may only contain a geometrical type column.
DELETE FROM test_wrong_table;
drop table test_wrong_table;
bugfix: 55864433
drop table if exists t1;
drop view if exists v1;
create TABLE t1(pt POINT);
CREATE VIEW v1 AS (SELECT * FROM t1 ) UNION (SELECT * FROM t1 );
drop table t1;
drop view v1;

View File

@ -224,3 +224,23 @@ drop table if exists spatial_index;
CREATE TABLE spatial_index (i INT, g GEOMETRY NOT NULL SRID 4326, PRIMARY KEY (i), SPATIAL KEY (g))with column group ( each column);
select i, st_astext(g) from spatial_index where ST_Intersects(g, ST_GEOMFROMTEXT('POINT(2 2)', 4326));
i st_astext(g)
drop table if exists t1;
create table t1(a int,b int);
create index idx1 on t1(a);
SELECT st_astext(a) FROM t1 WHERE st_equals(a, point(7, 7));
st_astext(a)
explain SELECT st_astext(a) FROM t1 WHERE st_equals(a, point(7, 7));
Query Plan
===============================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
-----------------------------------------------
|0 |TABLE FULL SCAN|t1 |1 |22 |
===============================================
Outputs & filters:
-------------------------------------
0 - output([st_astext(cast(t1.a, LONGTEXT(536870911)))]), filter([st_equals(cast(t1.a, VARCHAR(1048576)), point(cast(7, DOUBLE(-1, -1)), cast(7, DOUBLE(-1,
-1))))]), rowset=8
access([t1.a]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.__pk_increment]), range(MIN ; MAX)always true
drop table t1;

View File

@ -799,4 +799,15 @@ INSERT INTO test_wrong_table (id, the_geom) VALUES (21, st_geomfromtext('POLYGON
--error 1687
ALTER TABLE test_wrong_table MODIFY COLUMN the_geom varbinary(200) NOT NULL;
DELETE FROM test_wrong_table;
drop table test_wrong_table;
drop table test_wrong_table;
--echo bugfix: 55864433
--disable_warnings
drop table if exists t1;
--disable_warnings
drop view if exists v1;
create TABLE t1(pt POINT);
CREATE VIEW v1 AS (SELECT * FROM t1 ) UNION (SELECT * FROM t1 );
drop table t1;
drop view v1;

View File

@ -247,4 +247,14 @@ if (1) {
drop table if exists spatial_index;
--enable_warnings
CREATE TABLE spatial_index (i INT, g GEOMETRY NOT NULL SRID 4326, PRIMARY KEY (i), SPATIAL KEY (g))with column group ( each column);
select i, st_astext(g) from spatial_index where ST_Intersects(g, ST_GEOMFROMTEXT('POINT(2 2)', 4326));
select i, st_astext(g) from spatial_index where ST_Intersects(g, ST_GEOMFROMTEXT('POINT(2 2)', 4326));
#bugfix: 56294148 & 56301820
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(a int,b int);
create index idx1 on t1(a);
SELECT st_astext(a) FROM t1 WHERE st_equals(a, point(7, 7));
explain SELECT st_astext(a) FROM t1 WHERE st_equals(a, point(7, 7));
drop table t1;