Test case
CREATE TABLE gis_geometrycollection (fid int, g GEOMETRYCOLLECTION NOT NULL) ENGINE=MyISAM;
INSERT INTO gis_geometrycollection (fid,g) VALUES
(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
(122, GeomFromText('GeometryCollection()'));
SELECT g1.fid as first, g2.fid as second,
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
ALTER TABLE gis_geometrycollection MODIFY g GEOMETRYCOLLECTION NULL;
SELECT g1.fid as first, g2.fid as second,
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
DROP TABLE gis_geometrycollection;
Output on 10.1
# First SELECT
+-------+--------+---+---+---+---+---+---+---+---+
| first | second | w | c | o | e | d | t | i | r |
+-------+--------+---+---+---+---+---+---+---+---+
| 120 | 120 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 120 | 122 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 122 | 120 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 122 | 122 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
+-------+--------+---+---+---+---+---+---+---+---+
# Second SELECT
+-------+--------+------+------+------+------+------+------+------+------+
| first | second | w | c | o | e | d | t | i | r |
+-------+--------+------+------+------+------+------+------+------+------+
| 120 | 120 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 120 | 122 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
| 122 | 120 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
| 122 | 122 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
+-------+--------+------+------+------+------+------+------+------+------+
I am not even sure which result is correct, but in any case they cannot possibly be different.
Note: storage_engine.type_spatial_indexes fails because of it.
Elena Stepanova
made changes -
2015-08-26 02:07
Assignee
Alexey Botchkov
[ holyfoot
]
Alexander Barkov
[ bar
]
Alexander Barkov
made changes -
2015-09-11 17:43
Status
Open
[ 1
]
In Progress
[ 3
]
Alexander Barkov
made changes -
2015-09-11 22:30
Fix Version/s
10.1.8
[ 19605
]
Fix Version/s
10.1
[ 16100
]
Resolution
Fixed
[ 1
]
Status
In Progress
[ 3
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2021-12-06 21:41
Workflow
MariaDB v3
[ 71210
]
MariaDB v4
[ 149513
]
{"report":{"fcp":1102.8999998569489,"ttfb":329.39999985694885,"pageVisibility":"visible","entityId":52810,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e90fdf60-e605-4887-8239-9a53d9ad2a7d","navigationType":0,"readyForUser":1189.0999999046326,"redirectCount":0,"resourceLoadedEnd":1279.3999998569489,"resourceLoadedStart":335.39999985694885,"resourceTiming":[{"duration":232.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":335.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":335.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":567.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":232.60000014305115,"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":335.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":335.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":568.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":274.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":335.89999985694885,"connectEnd":335.89999985694885,"connectStart":335.89999985694885,"domainLookupEnd":335.89999985694885,"domainLookupStart":335.89999985694885,"fetchStart":335.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":335.89999985694885,"responseEnd":610.2999999523163,"responseStart":610.1999998092651,"secureConnectionStart":335.89999985694885},{"duration":337.5,"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":336.09999990463257,"connectEnd":336.09999990463257,"connectStart":336.09999990463257,"domainLookupEnd":336.09999990463257,"domainLookupStart":336.09999990463257,"fetchStart":336.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":336.09999990463257,"responseEnd":673.5999999046326,"responseStart":673.5999999046326,"secureConnectionStart":336.09999990463257},{"duration":341.2000000476837,"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":336.2999999523163,"connectEnd":336.2999999523163,"connectStart":336.2999999523163,"domainLookupEnd":336.2999999523163,"domainLookupStart":336.2999999523163,"fetchStart":336.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":336.2999999523163,"responseEnd":677.5,"responseStart":677.5,"secureConnectionStart":336.2999999523163},{"duration":341.2999999523163,"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":336.59999990463257,"connectEnd":336.59999990463257,"connectStart":336.59999990463257,"domainLookupEnd":336.59999990463257,"domainLookupStart":336.59999990463257,"fetchStart":336.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":336.59999990463257,"responseEnd":677.8999998569489,"responseStart":677.8999998569489,"secureConnectionStart":336.59999990463257},{"duration":341.60000014305115,"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":336.69999980926514,"connectEnd":336.69999980926514,"connectStart":336.69999980926514,"domainLookupEnd":336.69999980926514,"domainLookupStart":336.69999980926514,"fetchStart":336.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":336.69999980926514,"responseEnd":678.2999999523163,"responseStart":678.2999999523163,"secureConnectionStart":336.69999980926514},{"duration":419.60000014305115,"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":336.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":336.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":756.5,"responseStart":0,"secureConnectionStart":0},{"duration":341.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":337.09999990463257,"connectEnd":337.09999990463257,"connectStart":337.09999990463257,"domainLookupEnd":337.09999990463257,"domainLookupStart":337.09999990463257,"fetchStart":337.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":337.09999990463257,"responseEnd":678.6999998092651,"responseStart":678.6999998092651,"secureConnectionStart":337.09999990463257},{"duration":419.60000014305115,"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":337.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":337.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":756.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":342,"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":337.2999999523163,"connectEnd":337.2999999523163,"connectStart":337.2999999523163,"domainLookupEnd":337.2999999523163,"domainLookupStart":337.2999999523163,"fetchStart":337.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":337.2999999523163,"responseEnd":679.2999999523163,"responseStart":679.2999999523163,"secureConnectionStart":337.2999999523163},{"duration":489.69999980926514,"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":338.5,"connectEnd":338.5,"connectStart":338.5,"domainLookupEnd":338.5,"domainLookupStart":338.5,"fetchStart":338.5,"redirectEnd":0,"redirectStart":0,"requestStart":338.5,"responseEnd":828.1999998092651,"responseStart":828.1999998092651,"secureConnectionStart":338.5},{"duration":918.5999999046326,"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":338.5,"connectEnd":338.5,"connectStart":338.5,"domainLookupEnd":338.5,"domainLookupStart":338.5,"fetchStart":338.5,"redirectEnd":0,"redirectStart":0,"requestStart":338.5,"responseEnd":1257.0999999046326,"responseStart":1257.0999999046326,"secureConnectionStart":338.5},{"duration":56.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":772.1999998092651,"connectEnd":772.1999998092651,"connectStart":772.1999998092651,"domainLookupEnd":772.1999998092651,"domainLookupStart":772.1999998092651,"fetchStart":772.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":772.1999998092651,"responseEnd":828.6999998092651,"responseStart":828.6999998092651,"secureConnectionStart":772.1999998092651},{"duration":227.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1051.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1051.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1279.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":221.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1052.2999999523163,"connectEnd":1052.2999999523163,"connectStart":1052.2999999523163,"domainLookupEnd":1052.2999999523163,"domainLookupStart":1052.2999999523163,"fetchStart":1052.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1052.2999999523163,"responseEnd":1274.0999999046326,"responseStart":1274.0999999046326,"secureConnectionStart":1052.2999999523163},{"duration":226.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1052.5999999046326,"connectEnd":1052.5999999046326,"connectStart":1052.5999999046326,"domainLookupEnd":1052.5999999046326,"domainLookupStart":1052.5999999046326,"fetchStart":1052.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1052.5999999046326,"responseEnd":1279.3999998569489,"responseStart":1279.3999998569489,"secureConnectionStart":1052.5999999046326},{"duration":198.90000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1095.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1095.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1294.7999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":117,"responseStart":330,"responseEnd":333,"domLoading":333,"domInteractive":1295,"domContentLoadedEventStart":1295,"domContentLoadedEventEnd":1353,"domComplete":1512,"loadEventStart":1512,"loadEventEnd":1512,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1259.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1260.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1260.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1264.1999998092651},{"name":"activityTabFullyLoaded","time":1405.8999998569489}],"measures":[],"correlationId":"fbb21d10adef7b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":146,"dbReadsTimeInMs":25,"dbConnsTimeInMs":36,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Reassigning to bar because the problem appeared in 10.1 tree from the following revision:
commit ba3573cae8f0d269452cc6213f1a8243e455830e
Author: Alexander Barkov <bar@mariadb.org>
Date: Thu Mar 12 13:40:52 2015 +0400
Clean-up:
- Renaming Item::is_bool_func() to is_bool_type(), to avoid assumption
that the item is an Item_func derivant.
- Deriving Item_func_spatial_rel from Item_bool_func rather than Item_int_func