In the explain output we see for <derived2> key #hash#key0 , where key0 is the key on the derived table created by the derived_with_keys optimization.
If the keys on derived table are created and it is the best choice plan then we will always do a ref access on the derived table with key0 (key on derived table).
If the hash join is preferred then we need to drop the derived keys, we cannot perform hash join with these keys
Attachments
Issue Links
relates to
MDEV-16307Incorrect results when using BNLH join instead of BNL join with views
frame #10: 0x00000001003b4492 mysqld`mysql_derived_fill(thd=0x0000000105069a70, lex=0x000000010506d850, derived=0x00000001049d9b38) at sql_derived.cc:1152
frame #11: 0x00000001003b4fd7 mysqld`mysql_handle_single_derived(lex=0x000000010506d850, derived=0x00000001049d9b38, phases=96) at sql_derived.cc:197
frame #12: 0x00000001004bdca0 mysqld`st_join_table::preread_init(this=0x00000001050ce630) at sql_select.cc:12480
frame #13: 0x00000001004ab8f7 mysqld`join_init_read_record(tab=0x00000001050ce630) at sql_select.cc:20160
frame #14: 0x000000010067c758 mysqld`JOIN_TAB_SCAN::open(this=0x00000001050cf9b8) at sql_join_cache.cc:3348
frame #15: 0x000000010067a023 mysqld`JOIN_CACHE::join_matching_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2251
frame #16: 0x00000001006799f3 mysqld`JOIN_CACHE::join_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2088
frame #17: 0x00000001004ca236 mysqld`sub_select_cache(join=0x00000001049dce30, join_tab=0x00000001050ce630, end_of_records=false) at sql_select.cc:19033
frame #18: 0x00000001004caa81 mysqld`evaluate_join_record(join=0x00000001049dce30, join_tab=0x00000001050ce280, error=0) at sql_select.cc:19453
frame #19: 0x00000001004c9f18 mysqld`sub_select(join=0x00000001049dce30, join_tab=0x00000001050ce280, end_of_records=false) at sql_select.cc:19272
frame #20: 0x00000001004afa0a mysqld`do_select(join=0x00000001049dce30, procedure=0x0000000000000000) at sql_select.cc:18773
frame #21: 0x00000001004ae668 mysqld`JOIN::exec_inner(this=0x00000001049dce30) at sql_select.cc:4054
frame #22: 0x00000001004ad76e mysqld`JOIN::exec(this=0x00000001049dce30) at sql_select.cc:3848
So we inside the view v1
(lldb) p table->alias.Ptr = 0x00000001049d9b30 "v1"
(lldb) p table->s->keys
(uint) $1 = 1
We see that the view still has the key, this is incorrect
Varun Gupta (Inactive)
added a comment - In the debugger
I put a breakpoint on ha_heap::write_row
(lldb) b ha_heap::write_row
Breakpoint 1: where = mysqld`ha_heap::write_row(unsigned char*) + 20 at ha_heap.cc:234, address = 0x00000001007f2af4
then i run the above select query and see
(lldb) bt
* thread #2, stop reason = breakpoint 1.1
* frame #0: 0x00000001007f2af4 mysqld`ha_heap::write_row(this=0x00000001050c8a88, buf="?) at ha_heap.cc:234
frame #1: 0x00000001004f239a mysqld`handler::ha_write_tmp_row(this=0x00000001050c8a88, buf="?) at sql_class.h:6267
frame #2: 0x0000000100563941 mysqld`select_unit::send_data(this=0x00000001049dd3a0, values=0x00000001049db058) at sql_union.cc:149
frame #3: 0x00000001004a7283 mysqld`end_send(join=0x00000001049dd488, join_tab=0x00000001050cbe38, end_of_records=false) at sql_select.cc:20413
frame #4: 0x00000001004caa81 mysqld`evaluate_join_record(join=0x00000001049dd488, join_tab=0x00000001050cba88, error=0) at sql_select.cc:19453
frame #5: 0x00000001004c9d31 mysqld`sub_select(join=0x00000001049dd488, join_tab=0x00000001050cba88, end_of_records=false) at sql_select.cc:19233
frame #6: 0x00000001004afa0a mysqld`do_select(join=0x00000001049dd488, procedure=0x0000000000000000) at sql_select.cc:18773
frame #7: 0x00000001004ae668 mysqld`JOIN::exec_inner(this=0x00000001049dd488) at sql_select.cc:4054
frame #8: 0x00000001004ad76e mysqld`JOIN::exec(this=0x00000001049dd488) at sql_select.cc:3848
frame #9: 0x0000000100483261 mysqld`mysql_select(thd=0x0000000105069a70, tables=0x00000001049dc1f8, wild_num=0, fields=0x00000001049db058, conds=0x0000000000000000, og_num=0, order=0x0000000000000000, group=0x0000000000000000, having=0x0000000000000000, proc_param=0x0000000000000000, select_options=2416184064, result=0x00000001049dd3a0, unit=0x00000001049da7c0, select_lex=0x00000001049daf30) at sql_select.cc:4253
frame #10: 0x00000001003b4492 mysqld`mysql_derived_fill(thd=0x0000000105069a70, lex=0x000000010506d850, derived=0x00000001049d9b38) at sql_derived.cc:1152
frame #11: 0x00000001003b4fd7 mysqld`mysql_handle_single_derived(lex=0x000000010506d850, derived=0x00000001049d9b38, phases=96) at sql_derived.cc:197
frame #12: 0x00000001004bdca0 mysqld`st_join_table::preread_init(this=0x00000001050ce630) at sql_select.cc:12480
frame #13: 0x00000001004ab8f7 mysqld`join_init_read_record(tab=0x00000001050ce630) at sql_select.cc:20160
frame #14: 0x000000010067c758 mysqld`JOIN_TAB_SCAN::open(this=0x00000001050cf9b8) at sql_join_cache.cc:3348
frame #15: 0x000000010067a023 mysqld`JOIN_CACHE::join_matching_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2251
frame #16: 0x00000001006799f3 mysqld`JOIN_CACHE::join_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2088
frame #17: 0x00000001004ca236 mysqld`sub_select_cache(join=0x00000001049dce30, join_tab=0x00000001050ce630, end_of_records=false) at sql_select.cc:19033
frame #18: 0x00000001004caa81 mysqld`evaluate_join_record(join=0x00000001049dce30, join_tab=0x00000001050ce280, error=0) at sql_select.cc:19453
frame #19: 0x00000001004c9f18 mysqld`sub_select(join=0x00000001049dce30, join_tab=0x00000001050ce280, end_of_records=false) at sql_select.cc:19272
frame #20: 0x00000001004afa0a mysqld`do_select(join=0x00000001049dce30, procedure=0x0000000000000000) at sql_select.cc:18773
frame #21: 0x00000001004ae668 mysqld`JOIN::exec_inner(this=0x00000001049dce30) at sql_select.cc:4054
frame #22: 0x00000001004ad76e mysqld`JOIN::exec(this=0x00000001049dce30) at sql_select.cc:3848
So we inside the view v1
(lldb) p table->alias.Ptr = 0x00000001049d9b30 "v1"
(lldb) p table->s->keys
(uint) $1 = 1
We see that the view still has the key, this is incorrect
An approach to handle this case would be that for join_cache_level=4 , we don't try to create a ref access because currently in the code we always switch ref access to HASH JOIN unconditionally. So looks like this is an overkill for now.
Varun Gupta (Inactive)
added a comment - An approach to handle this case would be that for join_cache_level=4 , we don't try to create a ref access because currently in the code we always switch ref access to HASH JOIN unconditionally. So looks like this is an overkill for now.
People
Sergei Petrunia
Varun Gupta (Inactive)
Votes:
0Vote for this issue
Watchers:
4Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":724.6999998092651,"ttfb":188.5,"pageVisibility":"visible","entityId":68609,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"4bff4062-1f72-40f0-89d5-794c8a8ea8bd","navigationType":0,"readyForUser":794.2999999523163,"redirectCount":0,"resourceLoadedEnd":503.5,"resourceLoadedStart":196,"resourceTiming":[{"duration":7.099999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":196,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":203.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":6.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":196.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":203.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":80,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":196.39999985694885,"connectEnd":196.39999985694885,"connectStart":196.39999985694885,"domainLookupEnd":196.39999985694885,"domainLookupStart":196.39999985694885,"fetchStart":196.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":206.5,"responseEnd":276.39999985694885,"responseStart":227.79999995231628,"secureConnectionStart":196.39999985694885},{"duration":103.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":196.5,"connectEnd":196.5,"connectStart":196.5,"domainLookupEnd":196.5,"domainLookupStart":196.5,"fetchStart":196.5,"redirectEnd":0,"redirectStart":0,"requestStart":208.39999985694885,"responseEnd":300.39999985694885,"responseStart":234.89999985694885,"secureConnectionStart":196.5},{"duration":42.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":196.59999990463257,"connectEnd":196.59999990463257,"connectStart":196.59999990463257,"domainLookupEnd":196.59999990463257,"domainLookupStart":196.59999990463257,"fetchStart":196.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":208.5,"responseEnd":239.09999990463257,"responseStart":237.59999990463257,"secureConnectionStart":196.59999990463257},{"duration":47.200000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":196.69999980926514,"connectEnd":196.69999980926514,"connectStart":196.69999980926514,"domainLookupEnd":196.69999980926514,"domainLookupStart":196.69999980926514,"fetchStart":196.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":209.79999995231628,"responseEnd":243.89999985694885,"responseStart":243.29999995231628,"secureConnectionStart":196.69999980926514},{"duration":47.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":196.79999995231628,"connectEnd":196.79999995231628,"connectStart":196.79999995231628,"domainLookupEnd":196.79999995231628,"domainLookupStart":196.79999995231628,"fetchStart":196.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":210.29999995231628,"responseEnd":244.5,"responseStart":244,"secureConnectionStart":196.79999995231628},{"duration":12.699999809265137,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":197,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":197,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":209.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":91.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":197.09999990463257,"connectEnd":197.09999990463257,"connectStart":197.09999990463257,"domainLookupEnd":197.09999990463257,"domainLookupStart":197.09999990463257,"fetchStart":197.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":214,"responseEnd":288.89999985694885,"responseStart":288.09999990463257,"secureConnectionStart":197.09999990463257},{"duration":17.100000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":197.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":197.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":214.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":38.799999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":197.29999995231628,"connectEnd":217.59999990463257,"connectStart":217.59999990463257,"domainLookupEnd":217.59999990463257,"domainLookupStart":217.59999990463257,"fetchStart":197.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":218.19999980926514,"responseEnd":236.09999990463257,"responseStart":229.69999980926514,"secureConnectionStart":217.59999990463257},{"duration":222.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":217.19999980926514,"connectEnd":217.19999980926514,"connectStart":217.19999980926514,"domainLookupEnd":217.19999980926514,"domainLookupStart":217.19999980926514,"fetchStart":217.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":251,"responseEnd":439.39999985694885,"responseStart":438.59999990463257,"secureConnectionStart":217.19999980926514},{"duration":281.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":222,"connectEnd":222,"connectStart":222,"domainLookupEnd":222,"domainLookupStart":222,"fetchStart":222,"redirectEnd":0,"redirectStart":0,"requestStart":492.09999990463257,"responseEnd":503.5,"responseStart":502.59999990463257,"secureConnectionStart":222},{"duration":205.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":471.69999980926514,"connectEnd":471.69999980926514,"connectStart":471.69999980926514,"domainLookupEnd":471.69999980926514,"domainLookupStart":471.69999980926514,"fetchStart":471.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":647.5999999046326,"responseEnd":677.2999999523163,"responseStart":676.3999998569489,"secureConnectionStart":471.69999980926514},{"duration":38.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":701.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":701.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":739.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":88.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":725,"connectEnd":725,"connectStart":725,"domainLookupEnd":725,"domainLookupStart":725,"fetchStart":725,"redirectEnd":0,"redirectStart":0,"requestStart":780.2999999523163,"responseEnd":813.2999999523163,"responseStart":812.5999999046326,"secureConnectionStart":725}],"fetchStart":0,"domainLookupStart":17,"domainLookupEnd":24,"connectStart":24,"connectEnd":43,"secureConnectionStart":32,"requestStart":43,"responseStart":189,"responseEnd":222,"domLoading":192,"domInteractive":861,"domContentLoadedEventStart":861,"domContentLoadedEventEnd":903,"domComplete":1188,"loadEventStart":1188,"loadEventEnd":1189,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":834.1999998092651},{"name":"bigPipe.sidebar-id.end","time":834.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":835},{"name":"bigPipe.activity-panel-pipe-id.end","time":837},{"name":"activityTabFullyLoaded","time":921.6999998092651}],"measures":[],"correlationId":"d3626519601241","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":77,"dbReadsTimeInMs":14,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
In the debugger
I put a breakpoint on ha_heap::write_row
(lldb) b ha_heap::write_row
Breakpoint 1: where = mysqld`ha_heap::write_row(unsigned char*) + 20 at ha_heap.cc:234, address = 0x00000001007f2af4
then i run the above select query and see
(lldb) bt
* thread #2, stop reason = breakpoint 1.1
* frame #0: 0x00000001007f2af4 mysqld`ha_heap::write_row(this=0x00000001050c8a88, buf="?) at ha_heap.cc:234
frame #1: 0x00000001004f239a mysqld`handler::ha_write_tmp_row(this=0x00000001050c8a88, buf="?) at sql_class.h:6267
frame #2: 0x0000000100563941 mysqld`select_unit::send_data(this=0x00000001049dd3a0, values=0x00000001049db058) at sql_union.cc:149
frame #3: 0x00000001004a7283 mysqld`end_send(join=0x00000001049dd488, join_tab=0x00000001050cbe38, end_of_records=false) at sql_select.cc:20413
frame #4: 0x00000001004caa81 mysqld`evaluate_join_record(join=0x00000001049dd488, join_tab=0x00000001050cba88, error=0) at sql_select.cc:19453
frame #5: 0x00000001004c9d31 mysqld`sub_select(join=0x00000001049dd488, join_tab=0x00000001050cba88, end_of_records=false) at sql_select.cc:19233
frame #6: 0x00000001004afa0a mysqld`do_select(join=0x00000001049dd488, procedure=0x0000000000000000) at sql_select.cc:18773
frame #7: 0x00000001004ae668 mysqld`JOIN::exec_inner(this=0x00000001049dd488) at sql_select.cc:4054
frame #8: 0x00000001004ad76e mysqld`JOIN::exec(this=0x00000001049dd488) at sql_select.cc:3848
frame #9: 0x0000000100483261 mysqld`mysql_select(thd=0x0000000105069a70, tables=0x00000001049dc1f8, wild_num=0, fields=0x00000001049db058, conds=0x0000000000000000, og_num=0, order=0x0000000000000000, group=0x0000000000000000, having=0x0000000000000000, proc_param=0x0000000000000000, select_options=2416184064, result=0x00000001049dd3a0, unit=0x00000001049da7c0, select_lex=0x00000001049daf30) at sql_select.cc:4253
frame #10: 0x00000001003b4492 mysqld`mysql_derived_fill(thd=0x0000000105069a70, lex=0x000000010506d850, derived=0x00000001049d9b38) at sql_derived.cc:1152
frame #11: 0x00000001003b4fd7 mysqld`mysql_handle_single_derived(lex=0x000000010506d850, derived=0x00000001049d9b38, phases=96) at sql_derived.cc:197
frame #12: 0x00000001004bdca0 mysqld`st_join_table::preread_init(this=0x00000001050ce630) at sql_select.cc:12480
frame #13: 0x00000001004ab8f7 mysqld`join_init_read_record(tab=0x00000001050ce630) at sql_select.cc:20160
frame #14: 0x000000010067c758 mysqld`JOIN_TAB_SCAN::open(this=0x00000001050cf9b8) at sql_join_cache.cc:3348
frame #15: 0x000000010067a023 mysqld`JOIN_CACHE::join_matching_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2251
frame #16: 0x00000001006799f3 mysqld`JOIN_CACHE::join_records(this=0x00000001050b8c88, skip_last=false) at sql_join_cache.cc:2088
frame #17: 0x00000001004ca236 mysqld`sub_select_cache(join=0x00000001049dce30, join_tab=0x00000001050ce630, end_of_records=false) at sql_select.cc:19033
frame #18: 0x00000001004caa81 mysqld`evaluate_join_record(join=0x00000001049dce30, join_tab=0x00000001050ce280, error=0) at sql_select.cc:19453
frame #19: 0x00000001004c9f18 mysqld`sub_select(join=0x00000001049dce30, join_tab=0x00000001050ce280, end_of_records=false) at sql_select.cc:19272
frame #20: 0x00000001004afa0a mysqld`do_select(join=0x00000001049dce30, procedure=0x0000000000000000) at sql_select.cc:18773
frame #21: 0x00000001004ae668 mysqld`JOIN::exec_inner(this=0x00000001049dce30) at sql_select.cc:4054
frame #22: 0x00000001004ad76e mysqld`JOIN::exec(this=0x00000001049dce30) at sql_select.cc:3848
So we inside the view v1
(lldb) p table->alias.Ptr = 0x00000001049d9b30 "v1"
(lldb) p table->s->keys
(uint) $1 = 1
We see that the view still has the key, this is incorrect