I don't use the critical priority frivolously, but I have a query that always works on a mysql server, but only once at the first execution every 20 to 60 minutes on a MariaDB server. I am able to reproduce, that the query gives a different (wrong) result, if executed a few seconds after it gave the correct result. It also runs about 10 times slower on MariaDB than on mysql 5.7.
I am ready to give you more information than just the query, but the data is sensitive. I have a pseudonymized database dump (101 MB compressed) and a screen recording (87 MB) that I could send to the developers who want to look into the problem. The screen recording shows me executing the query twice with different results and a proof via query log and diff tool, that the queries are the same.
I filed this issue under "Data Definition - Temporary" because I did not find a component for issues with query results and had a vague feeling, that the temporary table has to do with it. However, I tried renaming it every time, but to no avail! Could it be the query cache?
This bug affects our production environment.
I appended the query results with columns separated by tabs, since I could not display them cleanly with this editor.
Here is the query:
DROP TEMPORARY TABLE IF EXISTS top5ads;
|
|
CREATE TEMPORARY TABLE top5ads (click_count INT(10) UNSIGNED, ad_id INT(10) UNSIGNED);
|
|
INSERT INTO top5ads (click_count, ad_id)
|
SELECT
|
COUNT(*) AS click_count,
|
ads.id AS ad_id
|
FROM
|
employ__ad_clicks ad_clicks
|
JOIN employ__ads ads ON ads.id = ad_clicks.ad_id
|
JOIN employ__companies cmps ON cmps.id = ads.company_id
|
WHERE
|
cmps.vdma_company_id > 0 AND
|
ads.job_type_id IN (1,2,3,4,5,13,19) AND
|
ad_clicks.host <> '' AND
|
-- {job_type_id} AND
|
click_date BETWEEN '2018-01-01' AND '2018-07-01'
|
GROUP BY
|
ads.id
|
ORDER BY
|
click_count DESC
|
LIMIT 5;
|
|
SELECT
|
click_count,
|
CONCAT
|
(
|
TRIM(ads.title), ' | ',
|
(
|
SELECT
|
CONCAT(pcs.postal_code, ' ', ad_pcs.city)
|
FROM
|
employ__ads_postal_codes ad_pcs
|
JOIN employ__postal_codes pcs ON pcs.id = ad_pcs.postal_code_id
|
WHERE
|
ad_pcs.ad_id = ads.id
|
LIMIT 1
|
), ' | ',
|
click_count,
|
'\n',
|
cmps.name, ' ', cmps.second_name, ' | ', DATE_FORMAT(ads.created_at, '%d.%m.%Y'), ' | ',
|
CASE WHEN
|
ads.published AND
|
CURRENT_DATE BETWEEN ads.publishes_at AND ads.ends_at
|
THEN
|
'online'
|
ELSE
|
'offline'
|
END
|
) AS ad_title,
|
ads.job_type_id,
|
ads.permalink,
|
mpgs_clicks_lists.mpgs_clicks_list,
|
'Top' AS x_label
|
FROM
|
top5ads
|
JOIN employ__ads ads ON ads.id = top5ads.ad_id
|
JOIN employ__companies cmps ON cmps.id = ads.company_id
|
JOIN
|
(
|
SELECT
|
adcs_ad_id,
|
GROUP_CONCAT(mpg_name_click_count ORDER BY mpg_name_click_count SEPARATOR '\n') AS mpgs_clicks_list
|
FROM
|
(
|
SELECT
|
adcs_ad_id,
|
CONCAT(click_counts_mpgs.name, ': ', click_counts_mpgs.click_count_mpg) AS mpg_name_click_count
|
FROM
|
(
|
SELECT
|
adcs.ad_id AS adcs_ad_id,
|
COUNT(*) as click_count_mpg,
|
mpgs.name
|
FROM
|
employ__ad_clicks adcs
|
JOIN employ__marketplace_group_hosts mpg_hosts ON adcs.host = mpg_hosts.name
|
JOIN employ__marketplace_groups mpgs ON mpgs.id = mpg_hosts.marketplace_group_id
|
WHERE
|
adcs.host <> '' AND
|
adcs.click_date BETWEEN '2018-01-01' AND '2018-07-01'
|
GROUP BY
|
mpgs.name,
|
adcs.ad_id
|
) click_counts_mpgs
|
) mpg_name_click_counts
|
GROUP BY
|
adcs_ad_id
|
ORDER BY mpg_name_click_counts.adcs_ad_id
|
)
|
mpgs_clicks_lists ON mpgs_clicks_lists.adcs_ad_id = ads.id;
|
|
- is duplicated by
-
MDEV-16182
innodb.temp_table_savepoint failed in buildbot with wrong result
-
-
Closed
{"report":{"fcp":990.0999999642372,"ttfb":228.89999997615814,"pageVisibility":"visible","entityId":68952,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d9dd697e-9159-4d15-824c-23e7270ac834","navigationType":0,"readyForUser":1101.0999999642372,"redirectCount":0,"resourceLoadedEnd":1191,"resourceLoadedStart":234.30000001192093,"resourceTiming":[{"duration":247.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":234.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":481.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":247.5,"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":234.5999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":482.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":274.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":234.80000001192093,"connectEnd":234.80000001192093,"connectStart":234.80000001192093,"domainLookupEnd":234.80000001192093,"domainLookupStart":234.80000001192093,"fetchStart":234.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":234.80000001192093,"responseEnd":509.0999999642372,"responseStart":509.0999999642372,"secureConnectionStart":234.80000001192093},{"duration":351.39999997615814,"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":235,"connectEnd":235,"connectStart":235,"domainLookupEnd":235,"domainLookupStart":235,"fetchStart":235,"redirectEnd":0,"redirectStart":0,"requestStart":235,"responseEnd":586.3999999761581,"responseStart":586.3999999761581,"secureConnectionStart":235},{"duration":355.10000002384186,"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":235.0999999642372,"connectEnd":235.0999999642372,"connectStart":235.0999999642372,"domainLookupEnd":235.0999999642372,"domainLookupStart":235.0999999642372,"fetchStart":235.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":235.0999999642372,"responseEnd":590.1999999880791,"responseStart":590.1999999880791,"secureConnectionStart":235.0999999642372},{"duration":355.60000002384186,"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":235.39999997615814,"connectEnd":235.39999997615814,"connectStart":235.39999997615814,"domainLookupEnd":235.39999997615814,"domainLookupStart":235.39999997615814,"fetchStart":235.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":235.39999997615814,"responseEnd":591,"responseStart":591,"secureConnectionStart":235.39999997615814},{"duration":355.89999997615814,"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":235.5,"connectEnd":235.5,"connectStart":235.5,"domainLookupEnd":235.5,"domainLookupStart":235.5,"fetchStart":235.5,"redirectEnd":0,"redirectStart":0,"requestStart":235.5,"responseEnd":591.3999999761581,"responseStart":591.3999999761581,"secureConnectionStart":235.5},{"duration":418,"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":235.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":235.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":653.8000000119209,"responseStart":0,"secureConnectionStart":0},{"duration":356.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":235.89999997615814,"connectEnd":235.89999997615814,"connectStart":235.89999997615814,"domainLookupEnd":235.89999997615814,"domainLookupStart":235.89999997615814,"fetchStart":235.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":235.89999997615814,"responseEnd":592.1999999880791,"responseStart":592.1999999880791,"secureConnectionStart":235.89999997615814},{"duration":417.9000000357628,"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":236.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":236.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":654,"responseStart":0,"secureConnectionStart":0},{"duration":356.89999997615814,"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":236.19999998807907,"connectEnd":236.19999998807907,"connectStart":236.19999998807907,"domainLookupEnd":236.19999998807907,"domainLookupStart":236.19999998807907,"fetchStart":236.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":236.19999998807907,"responseEnd":593.0999999642372,"responseStart":593.0999999642372,"secureConnectionStart":236.19999998807907},{"duration":923.3000000119209,"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":242.5,"connectEnd":242.5,"connectStart":242.5,"domainLookupEnd":242.5,"domainLookupStart":242.5,"fetchStart":242.5,"redirectEnd":0,"redirectStart":0,"requestStart":242.5,"responseEnd":1165.800000011921,"responseStart":1165.800000011921,"secureConnectionStart":242.5},{"duration":924,"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":242.89999997615814,"connectEnd":242.89999997615814,"connectStart":242.89999997615814,"domainLookupEnd":242.89999997615814,"domainLookupStart":242.89999997615814,"fetchStart":242.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":242.89999997615814,"responseEnd":1166.8999999761581,"responseStart":1166.8999999761581,"secureConnectionStart":242.89999997615814},{"duration":133.9000000357628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":665.3999999761581,"connectEnd":665.3999999761581,"connectStart":665.3999999761581,"domainLookupEnd":665.3999999761581,"domainLookupStart":665.3999999761581,"fetchStart":665.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":665.3999999761581,"responseEnd":799.3000000119209,"responseStart":799.3000000119209,"secureConnectionStart":665.3999999761581},{"duration":264.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":926.6999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":926.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1191,"responseStart":0,"secureConnectionStart":0},{"duration":326.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":927.8000000119209,"connectEnd":927.8000000119209,"connectStart":927.8000000119209,"domainLookupEnd":927.8000000119209,"domainLookupStart":927.8000000119209,"fetchStart":927.8000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":927.8000000119209,"responseEnd":1254.699999988079,"responseStart":1254.699999988079,"secureConnectionStart":927.8000000119209},{"duration":333.4000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":928.0999999642372,"connectEnd":928.0999999642372,"connectStart":928.0999999642372,"domainLookupEnd":928.0999999642372,"domainLookupStart":928.0999999642372,"fetchStart":928.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":928.0999999642372,"responseEnd":1261.5,"responseStart":1261.5,"secureConnectionStart":928.0999999642372}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":24,"responseStart":229,"responseEnd":241,"domLoading":232,"domInteractive":1237,"domContentLoadedEventStart":1237,"domContentLoadedEventEnd":1289,"domComplete":1652,"loadEventStart":1652,"loadEventEnd":1652,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1201.300000011921},{"name":"bigPipe.sidebar-id.end","time":1202.0999999642372},{"name":"bigPipe.activity-panel-pipe-id.start","time":1202.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1205.699999988079},{"name":"activityTabFullyLoaded","time":1311}],"measures":[],"correlationId":"501fdc6fd1e4f6","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":127,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Please attach your cnf files and yes, please upload your data to ftp.askmonty.org/private/