Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb_gis/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb_gis/r/bug17057168.result |
CREATE DATABASE geotest; use geotest; CREATE TABLE tmp (id int unsigned NOT NULL PRIMARY KEY); INSERT INTO tmp VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); INSERT INTO tmp SELECT 10+id FROM tmp; INSERT INTO tmp SELECT 20+id FROM tmp; INSERT INTO tmp SELECT 40+id FROM tmp; INSERT INTO tmp SELECT 80+id FROM tmp; CREATE TABLE t1 (id int unsigned NOT NULL auto_increment PRIMARY KEY, location point, INDEX (location)) ENGINE=InnoDB; INSERT INTO t1 (location) SELECT POINT(tmp1.id, tmp2.id) FROM tmp tmp1, tmp tmp2 ORDER BY tmp1.id, tmp2.id; EXPLAIN SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1, 2); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 NULL ref location location 28 const 1 100.00 Using where Warnings: Note 1003 /* select#1 */ select `geotest`.`t1`.`id` AS `id`,st_astext(`geotest`.`t1`.`location`) AS `ST_AsText(location)` from `geotest`.`t1` where (`geotest`.`t1`.`location` = <cache>(point(1,2))) SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1, 2); id ST_AsText(location) 163 POINT(1 2) DROP TABLE t1; DROP TABLE tmp; DROP DATABASE geotest;