Type:
Bug
Priority:
Blocker
Resolution:
Fixed
Affects Version/s:
10.6
CREATE FUNCTION f() RETURNS INTEGER RETURN 1;
CREATE TABLE t (a INT );
CREATE VIEW v AS SELECT 2 FROM t WHERE f() < 3;
FLUSH TABLE v WITH READ LOCK;
# Cleanup
UNLOCK TABLES;
DROP VIEW v;
DROP FUNCTION f;
DROP TABLE t;
10.6 b118f92b
mariadbd: /data/src/10.6/sql/sql_base.cc:2274: bool Locked_tables_list::init_locked_tables(THD*): Assertion `thd->locked_tables_mode == LTM_NONE' failed.
210601 17:51:10 [ERROR] mysqld got signal 6 ;
#6 0x00007f449af28729 in __assert_fail_base (fmt=0x7f449b0be588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x556c6b81c748 "thd->locked_tables_mode == LTM_NONE", file=0x556c6b81bc80 "/data/src/10.6/sql/sql_base.cc", line=2274, function=<optimized out>) at assert.c:92
#7 0x00007f449af39f36 in __GI___assert_fail (assertion=0x556c6b81c748 "thd->locked_tables_mode == LTM_NONE", file=0x556c6b81bc80 "/data/src/10.6/sql/sql_base.cc", line=2274, function=0x556c6b81c770 "bool Locked_tables_list::init_locked_tables(THD*)") at assert.c:101
#8 0x0000556c6a9bdc8d in Locked_tables_list::init_locked_tables (this=0x7f4484004f68, thd=0x7f4484000db8) at /data/src/10.6/sql/sql_base.cc:2274
#9 0x0000556c6ac69e71 in flush_tables_with_read_lock (thd=0x7f4484000db8, all_tables=0x7f4484015690) at /data/src/10.6/sql/sql_reload.cc:616
#10 0x0000556c6aa7323b in mysql_execute_command (thd=0x7f4484000db8) at /data/src/10.6/sql/sql_parse.cc:5397
#11 0x0000556c6aa7b5b2 in mysql_parse (thd=0x7f4484000db8, rawbuf=0x7f44840155c0 "FLUSH TABLE v WITH READ LOCK", length=28, parser_state=0x7f4495794480) at /data/src/10.6/sql/sql_parse.cc:8016
#12 0x0000556c6aa67a3c in dispatch_command (command=COM_QUERY, thd=0x7f4484000db8, packet=0x7f448400b879 "FLUSH TABLE v WITH READ LOCK", packet_length=28, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1897
#13 0x0000556c6aa663e1 in do_command (thd=0x7f4484000db8, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1406
#14 0x0000556c6ac22be1 in do_handle_one_connection (connect=0x556c6d520ce8, put_in_cache=true) at /data/src/10.6/sql/sql_connect.cc:1410
#15 0x0000556c6ac2293d in handle_one_connection (arg=0x556c6d51e048) at /data/src/10.6/sql/sql_connect.cc:1312
#16 0x0000556c6b18e213 in pfs_spawn_thread (arg=0x556c6d520838) at /data/src/10.6/storage/perfschema/pfs.cc:2201
#17 0x00007f449b451609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00007f449b025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The failure appeared in 10.6 after this commit:
commit b118f92be6b8d7294f3b57f824559ced3dcccc6b (HEAD -> 10.6, origin/bb-10.6-mdev15888-hf, origin/HEAD, origin/10.6)
Author: Alexey Botchkov
Date: Tue Feb 9 00:59:55 2021 +0400
MDEV-15888 Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views.
Enable the FLUSH TABLES for views. It works now.
No obvious immediate problem on a non-debug build.
{"report":{"fcp":1033.5,"ttfb":200.89999985694885,"pageVisibility":"visible","entityId":100178,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"7c77afa1-f0da-4fdb-a3b6-db2ba71da888","navigationType":0,"readyForUser":1114.8999998569489,"redirectCount":0,"resourceLoadedEnd":1369.5999999046326,"resourceLoadedStart":211.19999980926514,"resourceTiming":[{"duration":366.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":211.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":577.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":366.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":211.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":577.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":375,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":211.59999990463257,"connectEnd":211.59999990463257,"connectStart":211.59999990463257,"domainLookupEnd":211.59999990463257,"domainLookupStart":211.59999990463257,"fetchStart":211.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":211.59999990463257,"responseEnd":586.5999999046326,"responseStart":586.5999999046326,"secureConnectionStart":211.59999990463257},{"duration":435.7000000476837,"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":211.79999995231628,"connectEnd":211.79999995231628,"connectStart":211.79999995231628,"domainLookupEnd":211.79999995231628,"domainLookupStart":211.79999995231628,"fetchStart":211.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":211.79999995231628,"responseEnd":647.5,"responseStart":647.5,"secureConnectionStart":211.79999995231628},{"duration":439.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":211.89999985694885,"connectEnd":211.89999985694885,"connectStart":211.89999985694885,"domainLookupEnd":211.89999985694885,"domainLookupStart":211.89999985694885,"fetchStart":211.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":211.89999985694885,"responseEnd":651.6999998092651,"responseStart":651.6999998092651,"secureConnectionStart":211.89999985694885},{"duration":440.10000014305115,"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":212.19999980926514,"connectEnd":212.19999980926514,"connectStart":212.19999980926514,"domainLookupEnd":212.19999980926514,"domainLookupStart":212.19999980926514,"fetchStart":212.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":212.19999980926514,"responseEnd":652.2999999523163,"responseStart":652.2999999523163,"secureConnectionStart":212.19999980926514},{"duration":440.39999985694885,"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":212.29999995231628,"connectEnd":212.29999995231628,"connectStart":212.29999995231628,"domainLookupEnd":212.29999995231628,"domainLookupStart":212.29999995231628,"fetchStart":212.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":212.29999995231628,"responseEnd":652.6999998092651,"responseStart":652.6999998092651,"secureConnectionStart":212.29999995231628},{"duration":515.5,"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":212.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":212.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":728,"responseStart":0,"secureConnectionStart":0},{"duration":440.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":212.59999990463257,"connectEnd":212.59999990463257,"connectStart":212.59999990463257,"domainLookupEnd":212.59999990463257,"domainLookupStart":212.59999990463257,"fetchStart":212.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":212.59999990463257,"responseEnd":653.1999998092651,"responseStart":653.1999998092651,"secureConnectionStart":212.59999990463257},{"duration":515.3999998569489,"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":212.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":212.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":728.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":440.89999985694885,"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":213,"connectEnd":213,"connectStart":213,"domainLookupEnd":213,"domainLookupStart":213,"fetchStart":213,"redirectEnd":0,"redirectStart":0,"requestStart":213,"responseEnd":653.8999998569489,"responseStart":653.8999998569489,"secureConnectionStart":213},{"duration":903.2000000476837,"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":214.09999990463257,"connectEnd":214.09999990463257,"connectStart":214.09999990463257,"domainLookupEnd":214.09999990463257,"domainLookupStart":214.09999990463257,"fetchStart":214.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":214.09999990463257,"responseEnd":1117.2999999523163,"responseStart":1117.2999999523163,"secureConnectionStart":214.09999990463257},{"duration":1155.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":214.09999990463257,"connectEnd":214.09999990463257,"connectStart":214.09999990463257,"domainLookupEnd":214.09999990463257,"domainLookupStart":214.09999990463257,"fetchStart":214.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":214.09999990463257,"responseEnd":1369.5999999046326,"responseStart":1369.5999999046326,"secureConnectionStart":214.09999990463257},{"duration":417.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":739.7999999523163,"connectEnd":739.7999999523163,"connectStart":739.7999999523163,"domainLookupEnd":739.7999999523163,"domainLookupStart":739.7999999523163,"fetchStart":739.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":739.7999999523163,"responseEnd":1156.8999998569489,"responseStart":1156.8999998569489,"secureConnectionStart":739.7999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":44,"responseStart":201,"responseEnd":204,"domLoading":209,"domInteractive":1393,"domContentLoadedEventStart":1393,"domContentLoadedEventEnd":1434,"domComplete":2867,"loadEventStart":2867,"loadEventEnd":2868,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1375.5},{"name":"bigPipe.sidebar-id.end","time":1376.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":1376.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1380},{"name":"activityTabFullyLoaded","time":1440.2999999523163}],"measures":[],"correlationId":"aa60cd1029596c","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}