CONNECT tables of type VIRT are read-only. They return the same error for TRUNCATE, DELETE, INSERT statements, but a different error for UPDATE (same number, different message).
MariaDB [test]> CREATE OR REPLACE TABLE numbers
|
-> ENGINE = CONNECT,
|
-> TABLE_TYPE = VIR,
|
-> BLOCK_SIZE = 3
|
-> ;
|
Query OK, 0 rows affected (0.005 sec)
|
|
MariaDB [test]> TRUNCATE TABLE numbers;
|
ERROR 1296 (HY000): Got error 174 'Virtual tables are read only' from CONNECT
|
MariaDB [test]> DELETE FROM numbers WHERE n = 1;
|
ERROR 1296 (HY000): Got error 174 'Virtual tables are read only' from CONNECT
|
MariaDB [test]> INSERT INTO numbers (n) VALUES (1);
|
ERROR 1296 (HY000): Got error 174 'Virtual tables are read only' from CONNECT
|
MariaDB [test]> UPDATE numbers SET n = 10 WHERE n = 1;
|
ERROR 1296 (HY000): Got error 174 'Table numbers invalid for update' from CONNECT
|
{"report":{"fcp":856.1999999284744,"ttfb":134.19999992847443,"pageVisibility":"visible","entityId":91274,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"2d255c2b-3f8a-4376-86e5-2491e2e30fde","navigationType":0,"readyForUser":971.6999999284744,"redirectCount":0,"resourceLoadedEnd":955.5999999046326,"resourceLoadedStart":140.39999997615814,"resourceTiming":[{"duration":213.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":140.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":354,"responseStart":0,"secureConnectionStart":0},{"duration":213.40000009536743,"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":140.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":354,"responseStart":0,"secureConnectionStart":0},{"duration":222.30000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":140.69999992847443,"connectEnd":140.69999992847443,"connectStart":140.69999992847443,"domainLookupEnd":140.69999992847443,"domainLookupStart":140.69999992847443,"fetchStart":140.69999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":140.69999992847443,"responseEnd":363,"responseStart":362.89999997615814,"secureConnectionStart":140.69999992847443},{"duration":372.60000002384186,"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":140.89999997615814,"connectEnd":140.89999997615814,"connectStart":140.89999997615814,"domainLookupEnd":140.89999997615814,"domainLookupStart":140.89999997615814,"fetchStart":140.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":140.89999997615814,"responseEnd":513.5,"responseStart":513.5,"secureConnectionStart":140.89999997615814},{"duration":376.7999999523163,"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":141,"connectEnd":141,"connectStart":141,"domainLookupEnd":141,"domainLookupStart":141,"fetchStart":141,"redirectEnd":0,"redirectStart":0,"requestStart":141,"responseEnd":517.7999999523163,"responseStart":517.7999999523163,"secureConnectionStart":141},{"duration":377.3000000715256,"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":141.09999990463257,"connectEnd":141.09999990463257,"connectStart":141.09999990463257,"domainLookupEnd":141.09999990463257,"domainLookupStart":141.09999990463257,"fetchStart":141.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":141.09999990463257,"responseEnd":518.3999999761581,"responseStart":518.3999999761581,"secureConnectionStart":141.09999990463257},{"duration":378.60000002384186,"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":141.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":141.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":519.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":377.7000000476837,"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":141.19999992847443,"connectEnd":141.19999992847443,"connectStart":141.19999992847443,"domainLookupEnd":141.19999992847443,"domainLookupStart":141.19999992847443,"fetchStart":141.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":141.19999992847443,"responseEnd":518.8999999761581,"responseStart":518.8999999761581,"secureConnectionStart":141.19999992847443},{"duration":378.89999997615814,"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":141.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":141.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":520.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":378.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":141.39999997615814,"connectEnd":141.39999997615814,"connectStart":141.39999997615814,"domainLookupEnd":141.39999997615814,"domainLookupStart":141.39999997615814,"fetchStart":141.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":141.39999997615814,"responseEnd":519.7999999523163,"responseStart":519.7999999523163,"secureConnectionStart":141.39999997615814},{"duration":378.90000009536743,"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":141.59999990463257,"connectEnd":141.59999990463257,"connectStart":141.59999990463257,"domainLookupEnd":141.59999990463257,"domainLookupStart":141.59999990463257,"fetchStart":141.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":141.59999990463257,"responseEnd":520.5,"responseStart":520.5,"secureConnectionStart":141.59999990463257},{"duration":781.8000000715256,"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":142.19999992847443,"connectEnd":142.19999992847443,"connectStart":142.19999992847443,"domainLookupEnd":142.19999992847443,"domainLookupStart":142.19999992847443,"fetchStart":142.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":142.19999992847443,"responseEnd":924,"responseStart":924,"secureConnectionStart":142.19999992847443},{"duration":782.2999999523163,"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":142.29999995231628,"connectEnd":142.29999995231628,"connectStart":142.29999995231628,"domainLookupEnd":142.29999995231628,"domainLookupStart":142.29999995231628,"fetchStart":142.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":142.29999995231628,"responseEnd":924.5999999046326,"responseStart":924.5999999046326,"secureConnectionStart":142.29999995231628},{"duration":170.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":514.3999999761581,"connectEnd":514.3999999761581,"connectStart":514.3999999761581,"domainLookupEnd":514.3999999761581,"domainLookupStart":514.3999999761581,"fetchStart":514.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":514.3999999761581,"responseEnd":684.8999999761581,"responseStart":684.8999999761581,"secureConnectionStart":514.3999999761581},{"duration":147.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":807.6999999284744,"connectEnd":807.6999999284744,"connectStart":807.6999999284744,"domainLookupEnd":807.6999999284744,"domainLookupStart":807.6999999284744,"fetchStart":807.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":807.6999999284744,"responseEnd":955.5999999046326,"responseStart":955.5999999046326,"secureConnectionStart":807.6999999284744},{"duration":224.30000007152557,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":848.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":848.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1072.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":134,"responseEnd":136,"domLoading":137,"domInteractive":1039,"domContentLoadedEventStart":1039,"domContentLoadedEventEnd":1092,"domComplete":1486,"loadEventStart":1486,"loadEventEnd":1486,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1009.1999999284744},{"name":"bigPipe.sidebar-id.end","time":1009.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1010},{"name":"bigPipe.activity-panel-pipe-id.end","time":1011.5999999046326},{"name":"activityTabFullyLoaded","time":1105.5}],"measures":[],"correlationId":"4fd78621453d28","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":67,"dbReadsTimeInMs":9,"dbConnsTimeInMs":14,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Hi bertrandop can you please take a look a patch.
Here is the backtrace that matters
#0 CntOpenTable (g=0x7fffd002bf40, tdbp=0x7fffcbfff1f0, mode=MODE_UPDATE, c1=0x7fffcbfff2b0 "n", c2=0x7fffcbfff2b8 "n", del=false) at /home/anel/mariadb/10.4/storage/connect/connect.cc:242
#1 0x00007fffef96b97e in ha_connect::OpenTable (this=0x7fffd002a328, g=0x7fffd002bf40, del=false) at /home/anel/mariadb/10.4/storage/connect/ha_connect.cc:2027
#2 0x00007fffef97264a in ha_connect::rnd_init (this=0x7fffd002a328, scan=false) at /home/anel/mariadb/10.4/storage/connect/ha_connect.cc:4082
#3 0x00007fffef9719c1 in ha_connect::index_init (this=0x7fffd002a328, idx=0, sorted=true) at /home/anel/mariadb/10.4/storage/connect/ha_connect.cc:3770
#4 0x0000555555cc0c6d in handler::ha_index_init (this=0x7fffd002a328, idx=0, sorted=true) at /home/anel/mariadb/10.4/sql/handler.h:3206
#5 0x0000555556267bad in QUICK_RANGE_SELECT::reset (this=0x7fffd0076ba0) at /home/anel/mariadb/10.4/sql/opt_range.cc:12159
#6 0x0000555555e84564 in mysql_update (thd=0x7fffd0000d50, table_list=0x7fffd0015730, fields=..., values=..., conds=0x7fffd0016188, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7fffec5fdda0, updated_return=0x7fffec5fde60) at /home/anel/ma
riadb/10.4/sql/sql_update.cc:920
#7 0x0000555555d741a8 in mysql_execute_command (thd=0x7fffd0000d50) at /home/anel/mariadb/10.4/sql/sql_parse.cc:4360
#8 0x0000555555d8027b in mysql_parse (thd=0x7fffd0000d50, rawbuf=0x7fffd0015638 "UPDATE numbers SET n = 10 WHERE n = 1", length=37, parser_state=0x7fffec5fe4d0, is_com_multi=false, is_next_command=false) at /home/anel/mariadb/10.4/sql/sql_parse.cc:7896
#9 0x0000555555d6c7b9 in dispatch_command (command=COM_QUERY, thd=0x7fffd0000d50, packet=0x7fffd0008751 "UPDATE numbers SET n = 10 WHERE n = 1", packet_length=37, is_com_multi=false, is_next_command=false) at /home/anel/mariadb/10.4/sql/sql_parse.cc:1834
#10 0x0000555555d6af5a in do_command (thd=0x7fffd0000d50) at /home/anel/mariadb/10.4/sql/sql_parse.cc:1352
#11 0x0000555555ef4c3a in do_handle_one_connection (connect=0x5555582c2b60) at /home/anel/mariadb/10.4/sql/sql_connect.cc:1412
#12 0x0000555555ef4989 in handle_one_connection (arg=0x5555582c2b60) at /home/anel/mariadb/10.4/sql/sql_connect.cc:1316
#13 0x00005555568f988c in pfs_spawn_thread (arg=0x555558234390) at /home/anel/mariadb/10.4/storage/perfschema/pfs.cc:1869
#14 0x00007ffff688f6db in start_thread (arg=0x7fffec5ff700) at pthread_create.c:463
#15 0x00007ffff504ea3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95