mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#31909 - New gis.test creates warnings files
Comment sign of -- at line begin in test files lead to warnings from mysqltest. Changed -- to #. mysql-test/include/gis_keys.inc: Bug#31909 - New gis.test creates warnings files Changed -- to # at comment begin to avoid warnings files.
This commit is contained in:
@ -13,20 +13,20 @@ CREATE TABLE t2 (p POINT, INDEX(p));
|
|||||||
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||||
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||||
|
|
||||||
-- no index, returns 1 as expected
|
# no index, returns 1 as expected
|
||||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||||
|
|
||||||
-- with index, returns 1 as expected
|
# with index, returns 1 as expected
|
||||||
-- EXPLAIN shows that the index is not used though
|
# EXPLAIN shows that the index is not used though
|
||||||
-- due to the "most rows covered anyway, so a scan is more effective" rule
|
# due to the "most rows covered anyway, so a scan is more effective" rule
|
||||||
EXPLAIN
|
EXPLAIN
|
||||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||||
|
|
||||||
-- adding another row to the table so that
|
# adding another row to the table so that
|
||||||
-- the "most rows covered" rule doesn't kick in anymore
|
# the "most rows covered" rule doesn't kick in anymore
|
||||||
-- now EXPLAIN shows the index used on the table
|
# now EXPLAIN shows the index used on the table
|
||||||
-- and we're getting the wrong result again
|
# and we're getting the wrong result again
|
||||||
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||||
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
|
||||||
EXPLAIN
|
EXPLAIN
|
||||||
|
Reference in New Issue
Block a user