Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.5 , 10.6 , 10.11 , 11.4 , 11.7(EOL)
https://mariadb.com/kb/en/st-crosses/ : Returns 1 if geometry g1 spatially crosses geometry g2. Returns NULL if g1 is a Polygon or a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise, returns 0.
MariaDB [test]> SELECT ST_CROSSES( ST_GEOMFROMTEXT('point(1 1)'), st_geomfromtext('point(1 1)') ) a;
+------+
| a |
+------+
| 0 |
+------+
1 row in set (0,000 sec)
MariaDB [test]> SELECT ST_CROSSES( ST_GEOMFROMTEXT('POLYGON ((59 18,67 18,67 13,59 13,59 18)) '), st_geomfromtext('polygon((2 2,2 4, 4 2,2 2))') ) a;
+------+
| a |
+------+
| 0 |
+------+
1 row in set (0,001 sec)
MariaDB [test]> SELECT ST_CROSSES( ST_GEOMFROMTEXT('POLYGON ((59 18,67 18,67 13,59 13,59 18)) '), st_geomfromtext('point(1 1)') ) a;
+------+
| a |
+------+
| 0 |
+------+
1 row in set (0,000 sec)
from the KB example:
MariaDB [test]> SET @g1 = ST_GEOMFROMTEXT('LINESTRING(174 149, 176 151)');
Query OK, 0 rows affected (0,000 sec)
MariaDB [test]> SET @g2 = ST_GEOMFROMTEXT('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))');
Query OK, 0 rows affected (0,009 sec)
MariaDB [test]> SELECT ST_CROSSES(@g1,@g2);
+---------------------+
| ST_CROSSES(@g1,@g2) |
+---------------------+
| 1 |
+---------------------+
1 row in set (0,002 sec)
MariaDB [test]> SELECT ST_CROSSES(@g2,@g1); ## NULL expected
+---------------------+
| ST_CROSSES(@g2,@g1) |
+---------------------+
| 1 |
+---------------------+
1 row in set (0,001 sec)
mysql> SET @g1 = ST_GEOMFROMTEXT('LINESTRING(174 149, 176 151)');
Query OK, 0 rows affected (0,01 sec)
mysql> SET @g2 = ST_GEOMFROMTEXT('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))');
Query OK, 0 rows affected (0,00 sec)
mysql> SELECT ST_CROSSES(@g1,@g2);
+---------------------+
| ST_CROSSES(@g1,@g2) |
+---------------------+
| 0 |
+---------------------+
1 row in set (0,00 sec)
mysql> SELECT ST_CROSSES(@g2,@g1);
+---------------------+
| ST_CROSSES(@g2,@g1) |
+---------------------+
| NULL |
+---------------------+
1 row in set (0,00 sec)
relates to
MDEV-35201
ST_CROSSES returns different result than Mysql for 2 linestrings
Open
There are no comments yet on this issue.
{"report":{"fcp":883.4000000953674,"ttfb":227.5,"pageVisibility":"visible","entityId":132782,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"855478fc-548d-434c-9f4e-e8c1d51aa568","navigationType":0,"readyForUser":1034.2000002861023,"redirectCount":0,"resourceLoadedEnd":583.8000001907349,"resourceLoadedStart":237.40000009536743,"resourceTiming":[{"duration":6,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":237.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":243.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":6,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":237.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":243.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":190.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":237.90000009536743,"connectEnd":237.90000009536743,"connectStart":237.90000009536743,"domainLookupEnd":237.90000009536743,"domainLookupStart":237.90000009536743,"fetchStart":237.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":250.7000002861023,"responseEnd":428.30000019073486,"responseStart":264.7000002861023,"secureConnectionStart":237.90000009536743},{"duration":345.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":238,"connectEnd":238,"connectStart":238,"domainLookupEnd":238,"domainLookupStart":238,"fetchStart":238,"redirectEnd":0,"redirectStart":0,"requestStart":252.90000009536743,"responseEnd":583.8000001907349,"responseStart":267.1000003814697,"secureConnectionStart":238},{"duration":12.800000190734863,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":238.30000019073486,"connectEnd":238.30000019073486,"connectStart":238.30000019073486,"domainLookupEnd":238.30000019073486,"domainLookupStart":238.30000019073486,"fetchStart":238.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":238.30000019073486,"responseEnd":251.10000038146973,"responseStart":251.10000038146973,"secureConnectionStart":238.30000019073486},{"duration":30.700000286102295,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":238.40000009536743,"connectEnd":238.40000009536743,"connectStart":238.40000009536743,"domainLookupEnd":238.40000009536743,"domainLookupStart":238.40000009536743,"fetchStart":238.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":253.40000009536743,"responseEnd":269.1000003814697,"responseStart":267.90000009536743,"secureConnectionStart":238.40000009536743},{"duration":37.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":238.60000038146973,"connectEnd":238.60000038146973,"connectStart":238.60000038146973,"domainLookupEnd":238.60000038146973,"domainLookupStart":238.60000038146973,"fetchStart":238.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":254.80000019073486,"responseEnd":276.30000019073486,"responseStart":272.1000003814697,"secureConnectionStart":238.60000038146973},{"duration":13.300000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":238.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":252.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":40.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":239,"connectEnd":239,"connectStart":239,"domainLookupEnd":239,"domainLookupStart":239,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":258.5,"responseEnd":279.40000009536743,"responseStart":277.90000009536743,"secureConnectionStart":239},{"duration":16.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":239.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":255.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":52.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":239.30000019073486,"connectEnd":239.30000019073486,"connectStart":239.30000019073486,"domainLookupEnd":239.30000019073486,"domainLookupStart":239.30000019073486,"fetchStart":239.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":262.80000019073486,"responseEnd":292.2000002861023,"responseStart":282.90000009536743,"secureConnectionStart":239.30000019073486},{"duration":317.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":250.5,"connectEnd":250.5,"connectStart":250.5,"domainLookupEnd":250.5,"domainLookupStart":250.5,"fetchStart":250.5,"redirectEnd":0,"redirectStart":0,"requestStart":298.90000009536743,"responseEnd":567.9000000953674,"responseStart":562.2000002861023,"secureConnectionStart":250.5},{"duration":318.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":250.60000038146973,"connectEnd":250.60000038146973,"connectStart":250.60000038146973,"domainLookupEnd":250.60000038146973,"domainLookupStart":250.60000038146973,"fetchStart":250.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":322,"responseEnd":568.8000001907349,"responseStart":564.9000000953674,"secureConnectionStart":250.60000038146973},{"duration":96.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":576.7000002861023,"connectEnd":576.7000002861023,"connectStart":576.7000002861023,"domainLookupEnd":576.7000002861023,"domainLookupStart":576.7000002861023,"fetchStart":576.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":639.6000003814697,"responseEnd":673.5,"responseStart":672.7000002861023,"secureConnectionStart":576.7000002861023},{"duration":262.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":831.3000001907349,"connectEnd":831.3000001907349,"connectStart":831.3000001907349,"domainLookupEnd":831.3000001907349,"domainLookupStart":831.3000001907349,"fetchStart":831.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1058.7000002861023,"responseEnd":1093.9000000953674,"responseStart":1093.3000001907349,"secureConnectionStart":831.3000001907349},{"duration":245.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":876.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":876.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1121.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":16,"domainLookupEnd":26,"connectStart":26,"connectEnd":51,"secureConnectionStart":35,"requestStart":52,"responseStart":228,"responseEnd":250,"domLoading":231,"domInteractive":1139,"domContentLoadedEventStart":1139,"domContentLoadedEventEnd":1203,"domComplete":1343,"loadEventStart":1343,"loadEventEnd":1344,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1085.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1086.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1086.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1087.3000001907349},{"name":"activityTabFullyLoaded","time":1213.5}],"measures":[],"correlationId":"afca1fc7728d9c","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":16,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}