1) repeatable with derived tables
2) use_case_id report NULL
(easy to catch with changing condition to <=)
table info:
(gdb) p field->table->s->path
$3 =
The problem is that "use_case_id = 10" got into outer_ref_condition (which evaluated first when tables are not yet setup).
It got there because OUTER_REF_TABLE_BIT was set.
The bit was set because we have Item_derect_view ref which points inside view (or derived table) on the field which really was dependent:
(gdb) p ((Item_field *)(*((Item_direct_view_ref *)((Item_func_le *)join->outer_ref_cond)->args[0])->ref))->get_depended_from()
$18 = (st_select_lex *) 0x2589d20
Oleksandr Byelkin
added a comment - - edited The problem is that "use_case_id = 10" got into outer_ref_condition (which evaluated first when tables are not yet setup).
It got there because OUTER_REF_TABLE_BIT was set.
The bit was set because we have Item_derect_view ref which points inside view (or derived table) on the field which really was dependent:
(gdb) p ((Item_field *)(*((Item_direct_view_ref *)((Item_func_le *)join->outer_ref_cond)->args[0])->ref))->get_depended_from()
$18 = (st_select_lex *) 0x2589d20
The real problem is that dependence reference somehow "escapes" from WHERE expression of subquery and show up in SELECT list.
Oleksandr Byelkin
added a comment - The real problem is that dependence reference somehow "escapes" from WHERE expression of subquery and show up in SELECT list.
MDEV-8642: WHERE Clause not applied on View - Empty result set returned
Do not mark reference UP as a dependent (because it is what the DOWN items dependent from)
—
Oleksandr Byelkin
added a comment - revision-id: eebc42f18a7cae934252a1f241fc1cf80a383531 (mariadb-10.0.25-9-geebc42f)
parent(s): 0a50e43e9df2f1e005591e22388e6d20f82edf72
committer: Oleksandr Byelkin
timestamp: 2016-06-17 16:51:11 +0200
message:
MDEV-8642 : WHERE Clause not applied on View - Empty result set returned
Do not mark reference UP as a dependent (because it is what the DOWN items dependent from)
—
MDEV-8642: WHERE Clause not applied on View - Empty result set returned
An attempt to mark reference as dependent lead to transfering this quality to
original view field and through it to other references of this field which
can't be dependent.
Oleksandr Byelkin
added a comment - revision-id: ea909f28407133364d98718c6650df9763e47ebd (mariadb-10.0.30-21-gea909f2)
parent(s): f2dc04abea172e4c5d701a749902c88f4a626c2c
committer: Oleksandr Byelkin
timestamp: 2017-04-05 13:35:07 +0200
message:
MDEV-8642 : WHERE Clause not applied on View - Empty result set returned
An attempt to mark reference as dependent lead to transfering this quality to
original view field and through it to other references of this field which
can't be dependent.
People
Oleksandr Byelkin
Christian Schmid
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1336.2000000476837,"ttfb":225.5,"pageVisibility":"visible","entityId":52727,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"830c54c4-6475-4735-a1f0-b40f55bf2b60","navigationType":0,"readyForUser":1483.7000000476837,"redirectCount":0,"resourceLoadedEnd":1636.2000000476837,"resourceLoadedStart":230.5,"resourceTiming":[{"duration":542.1000001430511,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":230.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":772.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":542.2000000476837,"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":230.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":772.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":582.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":230.90000009536743,"connectEnd":230.90000009536743,"connectStart":230.90000009536743,"domainLookupEnd":230.90000009536743,"domainLookupStart":230.90000009536743,"fetchStart":230.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":230.90000009536743,"responseEnd":813.7000000476837,"responseStart":813.7000000476837,"secureConnectionStart":230.90000009536743},{"duration":632.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":231.10000014305115,"connectEnd":231.10000014305115,"connectStart":231.10000014305115,"domainLookupEnd":231.10000014305115,"domainLookupStart":231.10000014305115,"fetchStart":231.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":231.10000014305115,"responseEnd":863.6000001430511,"responseStart":863.6000001430511,"secureConnectionStart":231.10000014305115},{"duration":636.1999998092651,"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":231.30000019073486,"connectEnd":231.30000019073486,"connectStart":231.30000019073486,"domainLookupEnd":231.30000019073486,"domainLookupStart":231.30000019073486,"fetchStart":231.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":231.30000019073486,"responseEnd":867.5,"responseStart":867.5,"secureConnectionStart":231.30000019073486},{"duration":636.5999999046326,"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":231.40000009536743,"connectEnd":231.40000009536743,"connectStart":231.40000009536743,"domainLookupEnd":231.40000009536743,"domainLookupStart":231.40000009536743,"fetchStart":231.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":231.40000009536743,"responseEnd":868,"responseStart":868,"secureConnectionStart":231.40000009536743},{"duration":637.2000000476837,"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":231.5,"connectEnd":231.5,"connectStart":231.5,"domainLookupEnd":231.5,"domainLookupStart":231.5,"fetchStart":231.5,"redirectEnd":0,"redirectStart":0,"requestStart":231.5,"responseEnd":868.7000000476837,"responseStart":868.7000000476837,"secureConnectionStart":231.5},{"duration":728.6999998092651,"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":231.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":231.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":960.5,"responseStart":0,"secureConnectionStart":0},{"duration":637.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":232,"connectEnd":232,"connectStart":232,"domainLookupEnd":232,"domainLookupStart":232,"fetchStart":232,"redirectEnd":0,"redirectStart":0,"requestStart":232,"responseEnd":869.2000000476837,"responseStart":869.2000000476837,"secureConnectionStart":232},{"duration":728.7000000476837,"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":232.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":232.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":960.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":637.5,"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":232.30000019073486,"connectEnd":232.30000019073486,"connectStart":232.30000019073486,"domainLookupEnd":232.30000019073486,"domainLookupStart":232.30000019073486,"fetchStart":232.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":232.30000019073486,"responseEnd":869.8000001907349,"responseStart":869.8000001907349,"secureConnectionStart":232.30000019073486},{"duration":1294.6000001430511,"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":238.20000004768372,"connectEnd":238.20000004768372,"connectStart":238.20000004768372,"domainLookupEnd":238.20000004768372,"domainLookupStart":238.20000004768372,"fetchStart":238.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":238.20000004768372,"responseEnd":1532.8000001907349,"responseStart":1532.8000001907349,"secureConnectionStart":238.20000004768372},{"duration":1317.3999998569489,"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":238.80000019073486,"connectEnd":238.80000019073486,"connectStart":238.80000019073486,"domainLookupEnd":238.80000019073486,"domainLookupStart":238.80000019073486,"fetchStart":238.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":238.80000019073486,"responseEnd":1556.2000000476837,"responseStart":1556.2000000476837,"secureConnectionStart":238.80000019073486},{"duration":189.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":982.2000000476837,"connectEnd":982.2000000476837,"connectStart":982.2000000476837,"domainLookupEnd":982.2000000476837,"domainLookupStart":982.2000000476837,"fetchStart":982.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":982.2000000476837,"responseEnd":1172.1000001430511,"responseStart":1172.1000001430511,"secureConnectionStart":982.2000000476837},{"duration":387.2000000476837,"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":1249,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1249,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1636.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":54,"responseStart":226,"responseEnd":238,"domLoading":229,"domInteractive":1640,"domContentLoadedEventStart":1640,"domContentLoadedEventEnd":1694,"domComplete":2338,"loadEventStart":2338,"loadEventEnd":2339,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1615.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1616.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1616.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1619.5},{"name":"activityTabFullyLoaded","time":1708.8000001907349}],"measures":[],"correlationId":"1b7846ef6aa4f5","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report and the test case.