Hello, can we get an estimated date for the next release with this correction ? Else we have a lot of SQLs to change in our existing code and management is putting pressure on our team.
Thanks & Regards,
Joanne
Joanne Seneque
added a comment - Hello, can we get an estimated date for the next release with this correction ? Else we have a lot of SQLs to change in our existing code and management is putting pressure on our team.
Thanks & Regards,
Joanne
Yes, you can see the estimated date for the next release at jira.mariadb.org. At the moment it shows
MariaDB Server : 10.5.11
2021-07-30
Note, that we cannot say whether the fix for this regression will be in 10.5.11, but it's very likely
Sergei Golubchik
added a comment - Yes, you can see the estimated date for the next release at jira.mariadb.org. At the moment it shows
MariaDB Server : 10.5.11
2021-07-30
Note, that we cannot say whether the fix for this regression will be in 10.5.11, but it's very likely
SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a);
select @a, @b, @c;
@a @b @c
5 NULL NULL
INSERT INTO t1 VALUES (5);
SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a);
select @a, @b, @c;
@a @b @c
5 5 5
drop table t1;
Oleksandr Byelkin
added a comment - It looks like it was fixed:
CREATE TABLE t1 (id int);
INSERT INTO t1 VALUES (1),(2);
SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a);
select @a, @b, @c;
@a @b @c
5 NULL NULL
INSERT INTO t1 VALUES (5);
SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a);
select @a, @b, @c;
@a @b @c
5 5 5
drop table t1;
MDEV-23886 Reusing CTE inside a function fails with table doesn't exist
In the code existed just before this patch binding of a table reference to
Elena Stepanova
added a comment - The failure disappeared after this patch:
commit 675716e1cb34e29f7d3f46aac9a93adf02ac0851
Author: Igor Babaev
Date: Tue May 25 17:13:17 2021 -0700
MDEV-23886 Reusing CTE inside a function fails with table doesn't exist
In the code existed just before this patch binding of a table reference to
People
Unassigned
Joanne Seneque
Votes:
0Vote for this issue
Watchers:
5Start 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":1727.7000000476837,"ttfb":878.1000000238419,"pageVisibility":"visible","entityId":99424,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7236b82d-a89a-4264-ac51-a7cd5dc8d2ff","navigationType":0,"readyForUser":1831.2000000476837,"redirectCount":0,"resourceLoadedEnd":2193.2999999523163,"resourceLoadedStart":886.2000000476837,"resourceTiming":[{"duration":272.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":886.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":886.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1159.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":273,"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":886.3999999761581,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":886.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1159.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":332.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":886.6000000238419,"connectEnd":886.6000000238419,"connectStart":886.6000000238419,"domainLookupEnd":886.6000000238419,"domainLookupStart":886.6000000238419,"fetchStart":886.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":886.6000000238419,"responseEnd":1219.5,"responseStart":1219.5,"secureConnectionStart":886.6000000238419},{"duration":412.10000002384186,"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":886.8999999761581,"connectEnd":886.8999999761581,"connectStart":886.8999999761581,"domainLookupEnd":886.8999999761581,"domainLookupStart":886.8999999761581,"fetchStart":886.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":886.8999999761581,"responseEnd":1299,"responseStart":1299,"secureConnectionStart":886.8999999761581},{"duration":416.1999999284744,"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":887.1000000238419,"connectEnd":887.1000000238419,"connectStart":887.1000000238419,"domainLookupEnd":887.1000000238419,"domainLookupStart":887.1000000238419,"fetchStart":887.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":887.1000000238419,"responseEnd":1303.2999999523163,"responseStart":1303.2999999523163,"secureConnectionStart":887.1000000238419},{"duration":416.89999997615814,"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":887.2000000476837,"connectEnd":887.2000000476837,"connectStart":887.2000000476837,"domainLookupEnd":887.2000000476837,"domainLookupStart":887.2000000476837,"fetchStart":887.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":887.2000000476837,"responseEnd":1304.1000000238419,"responseStart":1304.1000000238419,"secureConnectionStart":887.2000000476837},{"duration":418,"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":887.3999999761581,"connectEnd":887.3999999761581,"connectStart":887.3999999761581,"domainLookupEnd":887.3999999761581,"domainLookupStart":887.3999999761581,"fetchStart":887.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":887.3999999761581,"responseEnd":1305.3999999761581,"responseStart":1305.3999999761581,"secureConnectionStart":887.3999999761581},{"duration":482.2999999523163,"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":887.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":887.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1369.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":419.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":887.7999999523163,"connectEnd":887.7999999523163,"connectStart":887.7999999523163,"domainLookupEnd":887.7999999523163,"domainLookupStart":887.7999999523163,"fetchStart":887.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":887.7999999523163,"responseEnd":1307.2999999523163,"responseStart":1307.2999999523163,"secureConnectionStart":887.7999999523163},{"duration":482,"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":888,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":888,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1370,"responseStart":0,"secureConnectionStart":0},{"duration":421.39999997615814,"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":888.1000000238419,"connectEnd":888.1000000238419,"connectStart":888.1000000238419,"domainLookupEnd":888.1000000238419,"domainLookupStart":888.1000000238419,"fetchStart":888.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":888.1000000238419,"responseEnd":1309.5,"responseStart":1309.5,"secureConnectionStart":888.1000000238419},{"duration":1303.7999999523163,"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":889.1000000238419,"connectEnd":889.1000000238419,"connectStart":889.1000000238419,"domainLookupEnd":889.1000000238419,"domainLookupStart":889.1000000238419,"fetchStart":889.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":889.1000000238419,"responseEnd":2192.899999976158,"responseStart":2192.899999976158,"secureConnectionStart":889.1000000238419},{"duration":1299.1999999284744,"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":894.1000000238419,"connectEnd":894.1000000238419,"connectStart":894.1000000238419,"domainLookupEnd":894.1000000238419,"domainLookupStart":894.1000000238419,"fetchStart":894.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":894.1000000238419,"responseEnd":2193.2999999523163,"responseStart":2193.2999999523163,"secureConnectionStart":894.1000000238419},{"duration":517,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1384.2000000476837,"connectEnd":1384.2000000476837,"connectStart":1384.2000000476837,"domainLookupEnd":1384.2000000476837,"domainLookupStart":1384.2000000476837,"fetchStart":1384.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1384.2000000476837,"responseEnd":1901.2000000476837,"responseStart":1901.2000000476837,"secureConnectionStart":1384.2000000476837},{"duration":521.6999999284744,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1714.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1714.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2235.7999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":686,"responseStart":878,"responseEnd":887,"domLoading":882,"domInteractive":2262,"domContentLoadedEventStart":2262,"domContentLoadedEventEnd":2313,"domComplete":2682,"loadEventStart":2682,"loadEventEnd":2683,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2203.7999999523163},{"name":"bigPipe.sidebar-id.end","time":2204.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":2204.899999976158},{"name":"bigPipe.activity-panel-pipe-id.end","time":2212.100000023842},{"name":"activityTabFullyLoaded","time":2331.5}],"measures":[],"correlationId":"5d6ab5f90a9bd9","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":127,"dbReadsTimeInMs":16,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report!
Repeatable on 10.5, not on earlier versions.
Regression started from 10.5.7, after this merge https://github.com/MariaDB/server/commit/5ff7e68c7e
10.5 d44a10f4dd3567fd84a7f
Version: '10.5.10-MariaDB-debug-log'
mariadbd: /10.5/sql/sql_select.cc:4225: bool JOIN::save_explain_data(Explain_query*, bool, bool, bool, bool): Assertion `select_lex->select_number == (0x7fffffff * 2U + 1U) || select_lex->select_number == 0x7fffffff || !output || !output->get_select(select_lex->select_number) || output->get_select(select_lex->select_number)->select_lex == select_lex' failed.
210505 15:25:25 [ERROR] mysqld got signal 6 ;
??:0(__restore_rt)[0x7eff968f0730]
linux/raise.c:51(__GI_raise)[0x7eff9642c7bb]
stdlib/abort.c:81(__GI_abort)[0x7eff96417535]
intl/loadmsgcat.c:1177(_nl_load_domain)[0x7eff9641740f]
??:0(__assert_fail)[0x7eff96425102]
sql/sql_select.cc:4227(JOIN::save_explain_data(Explain_query*, bool, bool, bool, bool))[0x55cd79273e3c]
sql/sql_select.cc:1609(JOIN::build_explain())[0x55cd79257ba1]
sql/sql_select.cc:1670(JOIN::optimize())[0x55cd792586c7]
sql/item_subselect.cc:3995(subselect_single_select_engine::exec())[0x55cd79bd0c6f]
sql/item_subselect.cc:834(Item_subselect::exec())[0x55cd79bad795]
sql/item_subselect.cc:1441(Item_singlerow_subselect::val_int())[0x55cd79bb31c5]
sql/item_func.cc:5120(Item_func_set_user_var::check(bool))[0x55cd79b040c7]
sql/set_var.cc:895(set_var_user::check(THD*))[0x55cd78f03aff]
sql/set_var.cc:739(sql_set_variables(THD*, List<set_var_base>*, bool))[0x55cd78f02aa0]
sql/sql_parse.cc:5099(mysql_execute_command(THD*))[0x55cd791ae6d7]
sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55cd791c2460]
sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55cd791988d9]
sql/sql_parse.cc:1370(do_command(THD*))[0x55cd791951e5]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55cd795c7b76]
sql/sql_connect.cc:1314(handle_one_connection)[0x55cd795c74d3]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55cd7a2927aa]
nptl/pthread_create.c:487(start_thread)[0x7eff968e5fa3]
x86_64/clone.S:97(clone)[0x7eff964ee4cf]
Query (0x62b0000382a8): SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a)
Version: '10.5.9-MariaDB'
210505 15:20:57 [ERROR] mysqld got signal 11 ;
??:0(__restore_rt)[0x7f9d71922730]
sql/sql_analyze_stmt.h:139(JOIN::exec())[0x55a49b1f8a93]
sql/item_subselect.cc:4001(subselect_single_select_engine::exec())[0x55a49b4540f5]
sql/item_subselect.cc:787(Item_subselect::exec())[0x55a49b45286a]
sql/item_subselect.cc:1375(Item_singlerow_subselect::val_int())[0x55a49b4530be]
sql/item_func.cc:5090(Item_func_set_user_var::check(bool))[0x55a49b41329c]
sql/set_var.cc:895(set_var_user::check(THD*))[0x55a49b0df39c]
sql/set_var.cc:739(sql_set_variables(THD*, List<set_var_base>*, bool))[0x55a49b0e1159]
sql/sql_parse.cc:5068(mysql_execute_command(THD*))[0x55a49b19c80a]
sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55a49b19f169]
sql/sql_audit.h:169(mysql_audit_general)[0x55a49b1a1215]
sql/sql_parse.cc:1375(do_command(THD*))[0x55a49b1a2bdb]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55a49b28dbc2]
sql/sql_connect.cc:1318(handle_one_connection)[0x55a49b28de84]
perfschema/pfs.cc:2204(pfs_spawn_thread)[0x55a49b61128d]
nptl/pthread_create.c:487(start_thread)[0x7f9d71917fa3]
x86_64/clone.S:97(clone)[0x7f9d714f14cf]
Query (0x7f9c68011de0): SET @a=5, @b = (SELECT id FROM t1 WHERE id = @a), @c = (SELECT id FROM t1 WHERE id = @a)