Debian Codegraph @

mysql-test/suite/innodb_gis/t/0.test

raw
1 --source include/have_innodb.inc
2 SET default_storage_engine=innodb;
3 --source include/gis_generic.inc
4 --source include/gis_keys.inc
5
6 #
7 # Bug #15680 (SPATIAL key in innodb)
8 #
9 #--error ER_TABLE_CANT_HANDLE_SPKEYS
10 create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
11
12 DROP TABLE t1;
13
14 # Test read uncommitted
15 create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
16
17 connect (a,localhost,root,,);
18 connection a;
19
20 start transaction;
21 insert into t1 values(1, Point(1,1));
22
23
24 connect (con1,localhost,root,,);
25 connection con1;
26 set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))');
27 set transaction isolation level read uncommitted;
28 --disable_ps2_protocol
29 select count(*) from t1 where ST_Within(t1.c2, @g1);
30 --enable_ps2_protocol
31 disconnect con1;
32
33 --source include/wait_until_disconnected.inc
34
35 connection a;
36 commit;
37 disconnect a;
38 --source include/wait_until_disconnected.inc
39
40 connection default;
41 drop table t1;
42
43 --echo #
44 --echo # MDEV-38372 ASAN error in InnoDB on malformed WKB
45 --echo #
46 create table t1 (
47 id int auto_increment primary key,
48 geom geometry not null,
49 spatial index (geom)
50 ) engine=innodb;
51
52 --error ER_CANT_CREATE_GEOMETRY_OBJECT
53 insert t1 (geom) values (X'000000000107000000FF000000');
54 drop table t1;
55
56 --echo # End of 10.6 tests
57