Skip to content

Commit 12424e9

Browse files
author
Shlomi Noach
authored
Merge pull request #556 from github/test-spatial-types
Added spatial (GEOMETRY, POINT) tests
2 parents f83facc + db9a12a commit 12424e9

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

localtests/geometry57/create.sql

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
g geometry,
5+
primary key(id)
6+
) auto_increment=1;
7+
8+
drop event if exists gh_ost_test;
9+
delimiter ;;
10+
create event gh_ost_test
11+
on schedule every 1 second
12+
starts current_timestamp
13+
ends current_timestamp + interval 60 second
14+
on completion not preserve
15+
enable
16+
do
17+
begin
18+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(1 1)'));
19+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(2 2)'));
20+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(3 3)'));
21+
end ;;

localtests/geometry57/ignore_versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(5.5|5.6)

localtests/spatial57/create.sql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
g geometry,
5+
pt point,
6+
primary key(id)
7+
) auto_increment=1;
8+
9+
drop event if exists gh_ost_test;
10+
delimiter ;;
11+
create event gh_ost_test
12+
on schedule every 1 second
13+
starts current_timestamp
14+
ends current_timestamp + interval 60 second
15+
on completion not preserve
16+
enable
17+
do
18+
begin
19+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(1 1)'), POINT(10,10));
20+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(2 2)'), POINT(20,20));
21+
insert into gh_ost_test values (null, ST_GeomFromText('POINT(3 3)'), POINT(30,30));
22+
end ;;

localtests/spatial57/ignore_versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(5.5|5.6)

localtests/test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ verify_master_and_replica() {
4141
read master_host master_port <<< $(gh-ost-test-mysql-master -e "select @@hostname, @@port" -ss)
4242
[ "$master_host" == "$(hostname)" ] && master_host="127.0.0.1"
4343
echo "# master verified at $master_host:$master_port"
44+
if ! gh-ost-test-mysql-master -e "set global event_scheduler := 1" ; then
45+
echo "Cannot enable event_scheduler on master"
46+
exit 1
47+
fi
48+
4449
if [ "$(gh-ost-test-mysql-replica -e "select 1" -ss)" != "1" ] ; then
4550
echo "Cannot verify gh-ost-test-mysql-replica"
4651
exit 1

0 commit comments

Comments
 (0)