Test case
CREATE VIEW t AS SELECT 1 AS a;
|
SELECT a FROM t WHERE CASE WHEN a THEN DEFAULT (a) END=0;
|
Leads to
10.5.26 c038b3c05ed90041333dc869e3435c301210a3c4 (Debug)
|
mariadbd: /test/10.5_dbg/sql/item.h:1677: Item* Item::get_copy(THD*) const: Assertion `typeid(*copy) == typeid(*this)' failed.
|
10.5.26 c038b3c05ed90041333dc869e3435c301210a3c4 (Debug)
|
Core was generated by `/test/MD300724-mariadb-10.5.26-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x14673409f700 (LWP 1132966))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000146734fa3859 in __GI_abort () at abort.c:79
|
#2 0x0000146734fa3729 in __assert_fail_base (fmt=0x146735139588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5634bcbfc6d0 "typeid(*copy) == typeid(*this)", file=0x5634bcbfc308 "/test/10.5_dbg/sql/item.h", line=1677, function=<optimized out>) at assert.c:92
|
#3 0x0000146734fb4fd6 in __GI___assert_fail (assertion=assertion@entry=0x5634bcbfc6d0 "typeid(*copy) == typeid(*this)", file=file@entry=0x5634bcbfc308 "/test/10.5_dbg/sql/item.h", line=line@entry=1677, function=function@entry=0x5634bcbfc6a8 "Item* Item::get_copy(THD*) const") at assert.c:101
|
#4 0x00005634bbe2dbf6 in Item::get_copy (thd=<optimized out>, this=0x1466b8013e98) at /usr/include/c++/9/typeinfo:122
|
#5 Item_field::do_build_clone (this=0x1466b8013e98, thd=<optimized out>) at /test/10.5_dbg/sql/item.h:3701
|
#6 0x00005634bc1d448e in Item::build_clone (thd=0x1466b8000d48, this=0x1466b8013e98) at /test/10.5_dbg/sql/item.h:1691
|
#7 Item_func_or_sum::do_build_clone (this=0x1466b8014018, thd=0x1466b8000d48) at /test/10.5_dbg/sql/item.cc:2731
|
#8 0x00005634bc1d448e in Item::build_clone (thd=0x1466b8000d48, this=0x1466b8014018) at /test/10.5_dbg/sql/item.h:1691
|
#9 Item_func_or_sum::do_build_clone (this=0x1466b80141b8, thd=0x1466b8000d48) at /test/10.5_dbg/sql/item.cc:2731
|
#10 0x00005634bc21c1b5 in Item_bool_rowready_func2::do_build_clone (this=<optimized out>, thd=<optimized out>) at /test/10.5_dbg/sql/item_cmpfunc.h:584
|
#11 0x00005634bc1e426a in Item::build_clone (thd=0x1466b8000d48, this=0x1466b80141b8) at /test/10.5_dbg/sql/item.h:1691
|
#12 Item::build_pushable_cond (this=this@entry=0x1466b80141b8, thd=thd@entry=0x1466b8000d48, checker=<optimized out>, arg=0x1466b801d5f0 "\001") at /test/10.5_dbg/sql/item.cc:7798
|
#13 0x00005634bbe91751 in pushdown_cond_for_derived (thd=0x1466b8000d48, cond=0x1466b80141b8, derived=derived@entry=0x1466b80134f0) at /test/10.5_dbg/sql/sql_derived.cc:1526
|
#14 0x00005634bbf6235e in JOIN::optimize_inner (this=this@entry=0x1466b8017d48) at /test/10.5_dbg/sql/sql_select.cc:2229
|
#15 0x00005634bbf62e67 in JOIN::optimize (this=this@entry=0x1466b8017d48) at /test/10.5_dbg/sql/sql_select.cc:1765
|
#16 0x00005634bbf62f3f in mysql_select (thd=thd@entry=0x1466b8000d48, tables=0x1466b80134f0, fields=@0x1466b8012ff8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1466b80134a8, last = 0x1466b80134a8, elements = 1}, <No data fields>}, conds=0x1466b80141b8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1466b8017d20, unit=0x1466b8004ef8, select_lex=0x1466b8012e90) at /test/10.5_dbg/sql/sql_select.cc:4897
|
#17 0x00005634bbf63a95 in handle_select (thd=thd@entry=0x1466b8000d48, lex=lex@entry=0x1466b8004e30, result=result@entry=0x1466b8017d20, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:449
|
#18 0x00005634bbedbf50 in execute_sqlcom_select (thd=thd@entry=0x1466b8000d48, all_tables=0x1466b80134f0) at /test/10.5_dbg/sql/sql_parse.cc:6425
|
#19 0x00005634bbee8fc6 in mysql_execute_command (thd=thd@entry=0x1466b8000d48) at /test/10.5_dbg/sql/sql_parse.cc:4030
|
#20 0x00005634bbed528c in mysql_parse (thd=thd@entry=0x1466b8000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14673409e2c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8223
|
#21 0x00005634bbee3fd1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1466b8000d48, packet=packet@entry=0x1466b800aa19 "SELECT a FROM t WHERE CASE WHEN a THEN DEFAULT (a) END=0", packet_length=packet_length@entry=56, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1329
|
#22 0x00005634bbee6d0a in do_command (thd=0x1466b8000d48) at /test/10.5_dbg/sql/sql_parse.cc:1376
|
#23 0x00005634bc033c16 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5634befebc18, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1417
|
#24 0x00005634bc0342b4 in handle_one_connection (arg=arg@entry=0x5634befebc18) at /test/10.5_dbg/sql/sql_connect.cc:1319
|
#25 0x00005634bc4b418d in pfs_spawn_thread (arg=0x5634befce988) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#26 0x00001467354b4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#27 0x00001467350a0133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.5.26 (dbg), 10.6.19 (dbg), 10.11.9 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.26 (opt), 10.6.19 (opt), 10.11.9 (opt), 11.1.6 (dbg), 11.1.6 (opt), 11.2.5 (dbg), 11.2.5 (opt), 11.4.3 (dbg), 11.4.3 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.0 (dbg), 11.6.0 (opt)
{"report":{"fcp":2817.4000000953674,"ttfb":1529,"pageVisibility":"visible","entityId":130217,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"4a30aba9-bbd3-4a8e-a129-00be200df09b","navigationType":0,"readyForUser":2950.2000000476837,"redirectCount":0,"resourceLoadedEnd":3304.7999999523163,"resourceLoadedStart":1535.4000000953674,"resourceTiming":[{"duration":701.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1535.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1535.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2236.600000143051,"responseStart":0,"secureConnectionStart":0},{"duration":701.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":1535.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1535.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2236.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":711.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1535.7999999523163,"connectEnd":1535.7999999523163,"connectStart":1535.7999999523163,"domainLookupEnd":1535.7999999523163,"domainLookupStart":1535.7999999523163,"fetchStart":1535.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1535.7999999523163,"responseEnd":2246.9000000953674,"responseStart":2246.9000000953674,"secureConnectionStart":1535.7999999523163},{"duration":884.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":1536,"connectEnd":1536,"connectStart":1536,"domainLookupEnd":1536,"domainLookupStart":1536,"fetchStart":1536,"redirectEnd":0,"redirectStart":0,"requestStart":1536,"responseEnd":2420.5,"responseStart":2420.5,"secureConnectionStart":1536},{"duration":889.7999999523163,"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":1536.2000000476837,"connectEnd":1536.2000000476837,"connectStart":1536.2000000476837,"domainLookupEnd":1536.2000000476837,"domainLookupStart":1536.2000000476837,"fetchStart":1536.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1536.2000000476837,"responseEnd":2426,"responseStart":2426,"secureConnectionStart":1536.2000000476837},{"duration":890.0999999046326,"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":1536.4000000953674,"connectEnd":1536.4000000953674,"connectStart":1536.4000000953674,"domainLookupEnd":1536.4000000953674,"domainLookupStart":1536.4000000953674,"fetchStart":1536.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1536.4000000953674,"responseEnd":2426.5,"responseStart":2426.5,"secureConnectionStart":1536.4000000953674},{"duration":890.6999998092651,"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":1536.6000001430511,"connectEnd":1536.6000001430511,"connectStart":1536.6000001430511,"domainLookupEnd":1536.6000001430511,"domainLookupStart":1536.6000001430511,"fetchStart":1536.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1536.6000001430511,"responseEnd":2427.2999999523163,"responseStart":2427.2999999523163,"secureConnectionStart":1536.6000001430511},{"duration":909.8000001907349,"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":1536.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1536.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2446.600000143051,"responseStart":0,"secureConnectionStart":0},{"duration":891.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1536.9000000953674,"connectEnd":1536.9000000953674,"connectStart":1536.9000000953674,"domainLookupEnd":1536.9000000953674,"domainLookupStart":1536.9000000953674,"fetchStart":1536.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1536.9000000953674,"responseEnd":2428.2000000476837,"responseStart":2428.2000000476837,"secureConnectionStart":1536.9000000953674},{"duration":909.5,"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":1537.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1537.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2446.600000143051,"responseStart":0,"secureConnectionStart":0},{"duration":893,"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":1537.2999999523163,"connectEnd":1537.2999999523163,"connectStart":1537.2999999523163,"domainLookupEnd":1537.2999999523163,"domainLookupStart":1537.2999999523163,"fetchStart":1537.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1537.2999999523163,"responseEnd":2430.2999999523163,"responseStart":2430.2999999523163,"secureConnectionStart":1537.2999999523163},{"duration":1128.0999999046326,"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":1556.1000001430511,"connectEnd":1556.1000001430511,"connectStart":1556.1000001430511,"domainLookupEnd":1556.1000001430511,"domainLookupStart":1556.1000001430511,"fetchStart":1556.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1556.1000001430511,"responseEnd":2684.2000000476837,"responseStart":2684.2000000476837,"secureConnectionStart":1556.1000001430511},{"duration":1747.5,"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":1556.2999999523163,"connectEnd":1556.2999999523163,"connectStart":1556.2999999523163,"domainLookupEnd":1556.2999999523163,"domainLookupStart":1556.2999999523163,"fetchStart":1556.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1556.2999999523163,"responseEnd":3303.7999999523163,"responseStart":3303.7000000476837,"secureConnectionStart":1556.2999999523163},{"duration":258.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2425.2999999523163,"connectEnd":2425.2999999523163,"connectStart":2425.2999999523163,"domainLookupEnd":2425.2999999523163,"domainLookupStart":2425.2999999523163,"fetchStart":2425.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":2425.2999999523163,"responseEnd":2683.600000143051,"responseStart":2683.600000143051,"secureConnectionStart":2425.2999999523163},{"duration":546.2999999523163,"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":2758.5,"connectEnd":2758.5,"connectStart":2758.5,"domainLookupEnd":2758.5,"domainLookupStart":2758.5,"fetchStart":2758.5,"redirectEnd":0,"redirectStart":0,"requestStart":2758.5,"responseEnd":3304.7999999523163,"responseStart":3304.7999999523163,"secureConnectionStart":2758.5},{"duration":522.3000001907349,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2807.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2807.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3330.100000143051,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":876,"responseStart":1529,"responseEnd":1537,"domLoading":1533,"domInteractive":3374,"domContentLoadedEventStart":3374,"domContentLoadedEventEnd":3438,"domComplete":4023,"loadEventStart":4023,"loadEventEnd":4023,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3315.5},{"name":"bigPipe.sidebar-id.end","time":3316.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":3316.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":3318.4000000953674},{"name":"activityTabFullyLoaded","time":3453.100000143051}],"measures":[],"correlationId":"3289d010e511ed","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":587,"dbReadsTimeInMs":481,"dbConnsTimeInMs":493,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}