Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
N/A
The test case if for reproducing purposes only, don't put it into the regression suite , please create a deterministic one instead.
--source include/have_sequence.inc
create function f() returns int return 1;
--connect(con1,localhost,root,,)
--let $conid= `select connection_id()`
--send
select f() from seq_1_to_10000000 where seq%1000000 = 0;
--connection default
--let $sent_rows=
while (` select INFO is not null from information_schema.processlist where id = $conid`)
{
--let $rows= `select sent_rows from information_schema.processlist where id = $conid`
if ($ rows != $sent_rows)
{
--echo # Found SENT_ROWS = $rows
--let $sent_rows= $rows
}
}
--enable_query_log
--connection con1
--reap
drop function f;
preview-11.3-preview b09e99ff759
connection default ;
# Found SENT_ROWS = 0
# Found SENT_ROWS = 1
# Found SENT_ROWS = 0
# Found SENT_ROWS = 3
# Found SENT_ROWS = 7
# Found SENT_ROWS = 15
# Found SENT_ROWS = 31
# Found SENT_ROWS = 63
# Found SENT_ROWS = 127
# Found SENT_ROWS = 255
# Found SENT_ROWS = 511
# Found SENT_ROWS = 0
connection con1;
f()
1
1
1
1
1
1
1
1
1
1
Not only the values above are wrong (there are only 10 rows sent), but also it jumps from non-zero to zero again (0 => 1 => 0).
If the query is modified to
select f() from seq_1_to_10000000
without WHERE condition, then the SENT_ROWS often jumps from 0 to 2147483647 and back to 0 (but the test case won't work well, as the connection will hit net writing limit).
connect con1,localhost,root,,;
select f() from seq_1_to_10000000;
connection default ;
# Found SENT_ROWS = 0
# Found SENT_ROWS = 2147483647
# Found SENT_ROWS = 0
# Found SENT_ROWS = 2147483647
# Found SENT_ROWS = 0
# Found SENT_ROWS = 2147483647
# Found SENT_ROWS = 0
...
is caused by
MDEV-3953
Add columns for ROWS_EXAMINED & ROWS_SENT to I_S and processlist
Closed
{"report":{"fcp":1149.2000000178814,"ttfb":347.90000000596046,"pageVisibility":"visible","entityId":125701,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ad9e76c4-2ae8-4cc1-94ff-4e8829c0b512","navigationType":0,"readyForUser":1257.5999999940395,"redirectCount":0,"resourceLoadedEnd":849.5999999940395,"resourceLoadedStart":357.59999999403954,"resourceTiming":[{"duration":212.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":357.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":357.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":569.9000000059605,"responseStart":0,"secureConnectionStart":0},{"duration":212.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":357.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":357.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570.4000000059605,"responseStart":0,"secureConnectionStart":0},{"duration":384.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":358.09999999403954,"connectEnd":358.09999999403954,"connectStart":358.09999999403954,"domainLookupEnd":358.09999999403954,"domainLookupStart":358.09999999403954,"fetchStart":358.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":572.5,"responseEnd":742.7000000178814,"responseStart":599.0999999940395,"secureConnectionStart":358.09999999403954},{"duration":491.2999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":358.30000001192093,"connectEnd":358.30000001192093,"connectStart":358.30000001192093,"domainLookupEnd":358.30000001192093,"domainLookupStart":358.30000001192093,"fetchStart":358.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":574.2000000178814,"responseEnd":849.5999999940395,"responseStart":611.3000000119209,"secureConnectionStart":358.30000001192093},{"duration":244.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":358.40000000596046,"connectEnd":358.40000000596046,"connectStart":358.40000000596046,"domainLookupEnd":358.40000000596046,"domainLookupStart":358.40000000596046,"fetchStart":358.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":579.3000000119209,"responseEnd":603,"responseStart":600,"secureConnectionStart":358.40000000596046},{"duration":244.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":358.59999999403954,"connectEnd":358.59999999403954,"connectStart":358.59999999403954,"domainLookupEnd":358.59999999403954,"domainLookupStart":358.59999999403954,"fetchStart":358.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":579.5999999940395,"responseEnd":603.4000000059605,"responseStart":601,"secureConnectionStart":358.59999999403954},{"duration":244.7999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":358.80000001192093,"connectEnd":358.80000001192093,"connectStart":358.80000001192093,"domainLookupEnd":358.80000001192093,"domainLookupStart":358.80000001192093,"fetchStart":358.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":582.3000000119209,"responseEnd":603.5999999940395,"responseStart":601.7000000178814,"secureConnectionStart":358.80000001192093},{"duration":221.7000000178814,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":359,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":359,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":580.7000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":247.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":359.2000000178814,"connectEnd":359.2000000178814,"connectStart":359.2000000178814,"domainLookupEnd":359.2000000178814,"domainLookupStart":359.2000000178814,"fetchStart":359.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":583.8000000119209,"responseEnd":606.7000000178814,"responseStart":605.8000000119209,"secureConnectionStart":359.2000000178814},{"duration":223.2999999821186,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":359.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":359.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":582.5999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":251.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":359.5,"connectEnd":359.5,"connectStart":359.5,"domainLookupEnd":359.5,"domainLookupStart":359.5,"fetchStart":359.5,"redirectEnd":0,"redirectStart":0,"requestStart":590.9000000059605,"responseEnd":610.7000000178814,"responseStart":609.0999999940395,"secureConnectionStart":359.5},{"duration":480.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":360.30000001192093,"connectEnd":360.30000001192093,"connectStart":360.30000001192093,"domainLookupEnd":360.30000001192093,"domainLookupStart":360.30000001192093,"fetchStart":360.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":727.5,"responseEnd":840.9000000059605,"responseStart":837.8000000119209,"secureConnectionStart":360.30000001192093},{"duration":484.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":360.40000000596046,"connectEnd":360.40000000596046,"connectStart":360.40000000596046,"domainLookupEnd":360.40000000596046,"domainLookupStart":360.40000000596046,"fetchStart":360.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":789.5999999940395,"responseEnd":844.7000000178814,"responseStart":842.0999999940395,"secureConnectionStart":360.40000000596046},{"duration":224,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":892.9000000059605,"connectEnd":892.9000000059605,"connectStart":892.9000000059605,"domainLookupEnd":892.9000000059605,"domainLookupStart":892.9000000059605,"fetchStart":892.9000000059605,"redirectEnd":0,"redirectStart":0,"requestStart":1076.2000000178814,"responseEnd":1116.9000000059605,"responseStart":1116.300000011921,"secureConnectionStart":892.9000000059605}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":152,"responseStart":348,"responseEnd":354,"domLoading":351,"domInteractive":1367,"domContentLoadedEventStart":1367,"domContentLoadedEventEnd":1418,"domComplete":2290,"loadEventStart":2290,"loadEventEnd":2291,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1303.800000011921},{"name":"bigPipe.sidebar-id.end","time":1304.7000000178814},{"name":"bigPipe.activity-panel-pipe-id.start","time":1304.9000000059605},{"name":"bigPipe.activity-panel-pipe-id.end","time":1305.9000000059605},{"name":"activityTabFullyLoaded","time":1439.2000000178814}],"measures":[],"correlationId":"cd52db84e8d868","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This is a related bug (same variable name, different variable)
Running in 10.6:
flush status;
create function if not exists f() returns int return 1;
select f() from seq_1_to_10000000 where seq%1000000 = 0;
show status like "rows_sent";
-> 1023