Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb_gis/t/ |
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/t/rtree_concurrent_srch_2.test |
# This test case will test concurrent search on R-tree. # Not supported in embedded --source include/not_embedded.inc --source include/have_innodb.inc --source include/have_debug.inc --source include/have_innodb_16k.inc CREATE TABLE g ( id INT PRIMARY KEY, p GEOMETRY NOT NULL, SPATIAL KEY p_idx(p) ) ENGINE=InnoDB; delimiter |; create procedure populate_g(IN `rows` INT) begin declare i int default 1; while (i <= `rows`) DO insert into test.g (id, p) values (i, POINT(i, i)); set i = i + 1; end while; end| delimiter ;| call populate_g(650); start transaction; select id from g WHERE MBRContains(ST_GeomFromText('Polygon((100 0,100 5,105 5,105 0,100 0))'),p) for update; connect (a,localhost,root,,); connection a; set innodb_lock_wait_timeout = 1; set transaction isolation level serializable; --error ER_LOCK_WAIT_TIMEOUT insert into g values(1103, POINT(100, 1)); connect (b,localhost,root,,); connection b; start transaction; select id from g WHERE MBRContains(ST_GeomFromText('Polygon((100 0,100 5,105 5,105 0,100 0))'),p) for update; connection default; commit; connection a; set innodb_lock_wait_timeout = 1; set transaction isolation level serializable; --error ER_LOCK_WAIT_TIMEOUT insert into g values(1103, POINT(100, 1)); disconnect a; --source include/wait_until_disconnected.inc connection b; commit; disconnect b; --source include/wait_until_disconnected.inc connection default; DROP TABLE g; DROP PROCEDURE populate_g; set innodb_lock_wait_timeout = default;