Upgrade from mariadb 10.3 to 10.5.8
mysql_upgrade scripts executes:
ALTER TABLE event DROP PRIMARY KEY, ADD PRIMARY KEY(db, name)
this however takes infinite time if there are any events in table event. Its the same if query is executed manualy on mysql database. If events are removed then query is executed ok and mysql_upgrade works fine.
{"report":{"fcp":761.2999999523163,"ttfb":159.39999997615814,"pageVisibility":"visible","entityId":95342,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"aa205e2c-d1e5-476b-a936-096da6abda4e","navigationType":0,"readyForUser":829.2999999523163,"redirectCount":0,"resourceLoadedEnd":461.7999999523163,"resourceLoadedStart":169.69999992847443,"resourceTiming":[{"duration":10.200000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":169.69999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":169.69999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":179.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":10.599999904632568,"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":170,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":180.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":159.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":170.19999992847443,"connectEnd":170.19999992847443,"connectStart":170.19999992847443,"domainLookupEnd":170.19999992847443,"domainLookupStart":170.19999992847443,"fetchStart":170.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":186.19999992847443,"responseEnd":329.2999999523163,"responseStart":209.19999992847443,"secureConnectionStart":170.19999992847443},{"duration":290.7999999523163,"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":171,"connectEnd":171,"connectStart":171,"domainLookupEnd":171,"domainLookupStart":171,"fetchStart":171,"redirectEnd":0,"redirectStart":0,"requestStart":188.69999992847443,"responseEnd":461.7999999523163,"responseStart":210.39999997615814,"secureConnectionStart":171},{"duration":45.90000009536743,"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":171.09999990463257,"connectEnd":171.09999990463257,"connectStart":171.09999990463257,"domainLookupEnd":171.09999990463257,"domainLookupStart":171.09999990463257,"fetchStart":171.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":188.89999997615814,"responseEnd":217,"responseStart":212.19999992847443,"secureConnectionStart":171.09999990463257},{"duration":46.299999952316284,"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":171.29999995231628,"connectEnd":171.29999995231628,"connectStart":171.29999995231628,"domainLookupEnd":171.29999995231628,"domainLookupStart":171.29999995231628,"fetchStart":171.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":189.79999995231628,"responseEnd":217.59999990463257,"responseStart":214.29999995231628,"secureConnectionStart":171.29999995231628},{"duration":46.10000002384186,"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":171.29999995231628,"connectEnd":171.29999995231628,"connectStart":171.29999995231628,"domainLookupEnd":171.29999995231628,"domainLookupStart":171.29999995231628,"fetchStart":171.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":189.5,"responseEnd":217.39999997615814,"responseStart":213.5,"secureConnectionStart":171.29999995231628},{"duration":14.600000023841858,"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":171.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":186,"responseStart":0,"secureConnectionStart":0},{"duration":48.799999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":171.5,"connectEnd":171.5,"connectStart":171.5,"domainLookupEnd":171.5,"domainLookupStart":171.5,"fetchStart":171.5,"redirectEnd":0,"redirectStart":0,"requestStart":190.59999990463257,"responseEnd":220.29999995231628,"responseStart":217.79999995231628,"secureConnectionStart":171.5},{"duration":16.600000023841858,"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":171.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":188.19999992847443,"responseStart":0,"secureConnectionStart":0},{"duration":52.200000047683716,"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":171.69999992847443,"connectEnd":171.69999992847443,"connectStart":171.69999992847443,"domainLookupEnd":171.69999992847443,"domainLookupStart":171.69999992847443,"fetchStart":171.69999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":192,"responseEnd":223.89999997615814,"responseStart":218.5,"secureConnectionStart":171.69999992847443},{"duration":283.10000002384186,"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":172.59999990463257,"connectEnd":172.59999990463257,"connectStart":172.59999990463257,"domainLookupEnd":172.59999990463257,"domainLookupStart":172.59999990463257,"fetchStart":172.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":199.5,"responseEnd":455.6999999284744,"responseStart":449.6999999284744,"secureConnectionStart":172.59999990463257},{"duration":282,"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":174.39999997615814,"connectEnd":174.39999997615814,"connectStart":174.39999997615814,"domainLookupEnd":174.39999997615814,"domainLookupStart":174.39999997615814,"fetchStart":174.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":208.39999997615814,"responseEnd":456.39999997615814,"responseStart":452.6999999284744,"secureConnectionStart":174.39999997615814},{"duration":87.39999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":481.2999999523163,"connectEnd":481.2999999523163,"connectStart":481.2999999523163,"domainLookupEnd":481.2999999523163,"domainLookupStart":481.2999999523163,"fetchStart":481.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":534,"responseEnd":568.6999999284744,"responseStart":567.2999999523163,"secureConnectionStart":481.2999999523163},{"duration":235.60000002384186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":680.8999999761581,"connectEnd":680.8999999761581,"connectStart":680.8999999761581,"domainLookupEnd":680.8999999761581,"domainLookupStart":680.8999999761581,"fetchStart":680.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":881.5999999046326,"responseEnd":916.5,"responseStart":915.6999999284744,"secureConnectionStart":680.8999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":24,"responseStart":159,"responseEnd":174,"domLoading":163,"domInteractive":892,"domContentLoadedEventStart":892,"domContentLoadedEventEnd":940,"domComplete":1516,"loadEventStart":1516,"loadEventEnd":1516,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":861.2999999523163},{"name":"bigPipe.sidebar-id.end","time":862.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":862.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":865.1999999284744},{"name":"activityTabFullyLoaded","time":963.8999999761581}],"measures":[],"correlationId":"2f536ce16cddd1","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":73,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report.
I am raising the priority, because it is likely to affect all users who use event scheduler.
Starting from this commit in 10.5
commit 4102f1589c23309de968a5bf9511d3228a1b9319
Author: Monty
Date: Sat May 2 13:19:53 2020 +0300
Aria will now register it's transactions
after the first event is executed, the server acquires and keeps holding backup/metadata locks on mysql.event table – seemingly forever, as long as the event scheduler is enabled. It doesn't prevent further creation of events, but it blocks DDL on the table, hence the problem.
I cannot tell whether this new locking routine was intentional; but even if it is, mysql_upgrade should somehow take it into account, maybe temporarily disable event_scheduler while it handles system tables.
The test case below is dirty and shouldn't go as is into the regression suite, it's just a demonstration of the problem.
--let $ts= `SELECT DATE_ADD(CURRENT_TIMESTAMP(), INTERVAL 3 SECOND)`
sleep 2;
sleep 2;
echo #;
echo #;
10.5 8de233af
Variable_name Value
Executed_events 0
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
Variable_name Value
Executed_events 1
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME