AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/server/mysql/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/t/gis-rt-precise.test
# Test needs myisam for some myisam specific testcases
--source include/have_myisam.inc
-- source include/have_geometry.inc

#
# test of rtree (using with spatial data)
#
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

CREATE TABLE t1 (
  fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  g GEOMETRY NOT NULL,
  SPATIAL KEY(g)
) ENGINE=MyISAM;

SHOW CREATE TABLE t1;

--disable_query_log
let $1=150;
let $2=150;
while ($1)
{
  eval INSERT INTO t1 (g) VALUES (ST_GeomFromText('LineString($1 $1, $2 $2)'));
  dec $1;
  inc $2;
}
--enable_query_log

SELECT count(*) FROM t1;
EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 140))'));
SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))'));

DROP TABLE t1;

CREATE TABLE t1 (
  fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  g GEOMETRY NOT NULL
) ENGINE=MyISAM;

--disable_query_log
let $1=10;
while ($1)
{
  let $2=10;
  while ($2)
  {
    eval INSERT INTO t1 (g) VALUES (LineString(Point($1 * 10 - 9, $2 * 10 - 9), Point($1 * 10, $2 * 10)));
    dec $2;
  }
  dec $1;
}
--enable_query_log

ALTER TABLE t1 ADD SPATIAL KEY(g);
SHOW CREATE TABLE t1;
SELECT count(*) FROM t1;
EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, 
  ST_GeomFromText('Polygon((40 40,60 40,60 60,40 40))'));
SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, 
  ST_GeomFromText('Polygon((40 40,60 40,60 60,40 40))'));

DROP TABLE t1;

--echo End of 5.5 tests.

Anon7 - 2022
AnonSec Team