Server IP : 172.67.216.182 / Your IP : 162.158.170.122 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 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 : ON Directory : /www/server/mysql/src/mysql-test/suite/innodb_gis/r/ |
Upload File : |
DROP TABLE IF EXISTS linestring; CREATE TABLE linestring (pk INTEGER NOT NULL PRIMARY KEY, linestring_key GEOMETRY NOT NULL, linestring_nokey GEOMETRY NOT NULL) ENGINE=InnoDB ; INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) ')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'), ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) ')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (5, ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 3),(10 10,20 20,30 30))'), ST_GeomFromText('MULTILINESTRING((1 1,2 2,3 3),(10 10,20 20,30 30))')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (6, ST_GeomFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'), ST_GeomFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')); INSERT INTO linestring (pk, linestring_key, linestring_nokey) VALUES (7, ST_GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'), ST_GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')); CREATE INDEX linestring_index ON linestring(linestring_nokey(5)); ALTER TABLE linestring ADD KEY (linestring_key(5)); SELECT ST_AsText(linestring_nokey) FROM linestring FORCE KEY ( linestring_key ) WHERE ST_CONTAINS( ST_GeomFromText('POLYGON( ( 3923 2815 , 4246 2122 , 4028 2971 , 4017 3019 , 3923 2815 ) )') , linestring_key ) AND ST_WITHIN( ST_GeomFromText('POLYGON( ( 4135 3009 , 4914 3087 , 4236 3194 , 4091 3036 , 4022 3004 , 4087 3004 , 3853 2825 , 3490 3118 , 3784 3141 , 4052 3072 , 4205 2787 , 4024 2951 , 4076 3036 , 4041 3053 , 3789 3401 , 4080 3100 , 4169 2867 , 4056 3029 , 4715 3943 , 4052 3098 , 4035 3080 , 4013 3077 , 4218 2915 , 3789 2980 , 4058 3046 , 4042 3043 , 4135 3009 ) )') , linestring_nokey ) AND ST_CONTAINS( ST_GeomFromText('POLYGON( ( 4082 2842 , 3678 3647 , 3420 3068 , 4018 3030 , 4082 2842 ) )') , linestring_key ) OR ST_INTERSECTS( ST_GeomFromText('MULTILINESTRING( ( 4147 2871 , 4072 3042 , 4081 3099 , 3796 3021 , 4007 3463 ) , ( 4042 2808 , 4109 2816 , 3730 3673 ) )') , linestring_key ) AND ST_Length( linestring_nokey ) > 1; ERROR 22023: Invalid GIS data provided to function st_within. DROP TABLE linestring;