This is the same issue I reported in MDEV-13246, opening a new issue as the old one was closed as fixed and I'm still experiencing the issue with the latest stable release.
MariaDB [esportal]> show create table matchmaking_match;
|
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| matchmaking_match | CREATE TABLE `matchmaking_match` (
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`region_id` tinyint(1) unsigned NOT NULL,
|
`inserted` int(10) unsigned NOT NULL,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB AUTO_INCREMENT=47381 DEFAULT CHARSET=utf8 |
|
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [esportal]> show create table matchmaking_match_users;
|
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| matchmaking_match_users | CREATE TABLE `matchmaking_match_users` (
|
`matchmaking_match_id` bigint(20) unsigned NOT NULL,
|
`user_id` int(10) unsigned NOT NULL,
|
`team` tinyint(1) unsigned NOT NULL,
|
`accepted` tinyint(1) unsigned NOT NULL DEFAULT 0,
|
PRIMARY KEY (`matchmaking_match_id`,`user_id`),
|
UNIQUE KEY `mmu_user_id` (`user_id`),
|
CONSTRAINT `matchmaking_match_users_ibfk_1` FOREIGN KEY (`matchmaking_match_id`) REFERENCES `matchmaking_match` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
CONSTRAINT `matchmaking_match_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
|
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [esportal]> select * from matchmaking_match_users where matchmaking_match_id not in (select id from matchmaking_match);
|
+----------------------+-----------+------+----------+
|
| matchmaking_match_id | user_id | team | accepted |
|
+----------------------+-----------+------+----------+
|
| 45220 | 11179195 | 2 | 1 |
|
| 45220 | 16004445 | 1 | 1 |
|
| 45220 | 17375835 | 2 | 1 |
|
| 45220 | 19416596 | 2 | 1 |
|
| 45220 | 36791488 | 1 | 0 |
|
| 45220 | 42131544 | 1 | 1 |
|
| 45220 | 299652215 | 1 | 0 |
|
+----------------------+-----------+------+----------+
|
7 rows in set (0.00 sec)
|
|
MariaDB [esportal]> delete from matchmaking_match_users where matchmaking_match_id not in (select id from matchmaking_match);
|
Query OK, 7 rows affected (0.00 sec)
|
|
MariaDB [esportal]>
|
To answer questions which were asked in the previous issue:
- I have never disabled foreign key checks.
- The most recent DDL was weeks before.
- I don't know how to reproduce it.
I didn't have binlogs enabled when it happened. (EDIT: I did have binlogs enabled)
- I'm not using a cluster, it's a single machine database.
I have attached my.cnf.
- relates to
-
MDEV-15199
Triangular FKs - Cascade delete causes broken referential integrity
-
-
Closed
{"report":{"fcp":840.0999999046326,"ttfb":292.59999990463257,"pageVisibility":"visible","entityId":63320,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"a1fb9bf8-34d8-429e-89be-7ba3e3395c0f","navigationType":0,"readyForUser":935.5999999046326,"redirectCount":0,"resourceLoadedEnd":583.3999998569489,"resourceLoadedStart":300.69999980926514,"resourceTiming":[{"duration":3.8000001907348633,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":300.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":304.5,"responseStart":0,"secureConnectionStart":0},{"duration":5.900000095367432,"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":300.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":306.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":121,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":301,"connectEnd":301,"connectStart":301,"domainLookupEnd":301,"domainLookupStart":301,"fetchStart":301,"redirectEnd":0,"redirectStart":0,"requestStart":313.7999999523163,"responseEnd":422,"responseStart":332.09999990463257,"secureConnectionStart":301},{"duration":271.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":301.09999990463257,"connectEnd":301.09999990463257,"connectStart":301.09999990463257,"domainLookupEnd":301.09999990463257,"domainLookupStart":301.09999990463257,"fetchStart":301.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":314.09999990463257,"responseEnd":572.8999998569489,"responseStart":333.5,"secureConnectionStart":301.09999990463257},{"duration":8.600000143051147,"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":301.19999980926514,"connectEnd":301.19999980926514,"connectStart":301.19999980926514,"domainLookupEnd":301.19999980926514,"domainLookupStart":301.19999980926514,"fetchStart":301.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":301.19999980926514,"responseEnd":309.7999999523163,"responseStart":309.7999999523163,"secureConnectionStart":301.19999980926514},{"duration":9.899999856948853,"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":301.2999999523163,"connectEnd":301.2999999523163,"connectStart":301.2999999523163,"domainLookupEnd":301.2999999523163,"domainLookupStart":301.2999999523163,"fetchStart":301.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":301.2999999523163,"responseEnd":311.19999980926514,"responseStart":311.19999980926514,"secureConnectionStart":301.2999999523163},{"duration":11,"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":301.39999985694885,"connectEnd":301.39999985694885,"connectStart":301.39999985694885,"domainLookupEnd":301.39999985694885,"domainLookupStart":301.39999985694885,"fetchStart":301.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":301.39999985694885,"responseEnd":312.39999985694885,"responseStart":312.39999985694885,"secureConnectionStart":301.39999985694885},{"duration":11.699999809265137,"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":301.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":313.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":12,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":301.59999990463257,"connectEnd":301.59999990463257,"connectStart":301.59999990463257,"domainLookupEnd":301.59999990463257,"domainLookupStart":301.59999990463257,"fetchStart":301.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":301.59999990463257,"responseEnd":313.59999990463257,"responseStart":313.59999990463257,"secureConnectionStart":301.59999990463257},{"duration":13.600000143051147,"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":301.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":315.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":14.099999904632568,"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":301.7999999523163,"connectEnd":301.7999999523163,"connectStart":301.7999999523163,"domainLookupEnd":301.7999999523163,"domainLookupStart":301.7999999523163,"fetchStart":301.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":301.7999999523163,"responseEnd":315.89999985694885,"responseStart":315.89999985694885,"secureConnectionStart":301.7999999523163},{"duration":276.89999985694885,"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":305,"connectEnd":305,"connectStart":305,"domainLookupEnd":305,"domainLookupStart":305,"fetchStart":305,"redirectEnd":0,"redirectStart":0,"requestStart":360,"responseEnd":581.8999998569489,"responseStart":574.5999999046326,"secureConnectionStart":305},{"duration":277.7000000476837,"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":305.69999980926514,"connectEnd":305.69999980926514,"connectStart":305.69999980926514,"domainLookupEnd":305.69999980926514,"domainLookupStart":305.69999980926514,"fetchStart":305.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":361.19999980926514,"responseEnd":583.3999998569489,"responseStart":578.5999999046326,"secureConnectionStart":305.69999980926514},{"duration":207.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":569.8999998569489,"connectEnd":569.8999998569489,"connectStart":569.8999998569489,"domainLookupEnd":569.8999998569489,"domainLookupStart":569.8999998569489,"fetchStart":569.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":745.0999999046326,"responseEnd":777.5,"responseStart":776.6999998092651,"secureConnectionStart":569.8999998569489},{"duration":222.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":793.3999998569489,"connectEnd":793.3999998569489,"connectStart":793.3999998569489,"domainLookupEnd":793.3999998569489,"domainLookupStart":793.3999998569489,"fetchStart":793.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":982.5999999046326,"responseEnd":1015.7999999523163,"responseStart":1015.1999998092651,"secureConnectionStart":793.3999998569489},{"duration":155.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":831.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":831.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":986.8999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":29,"responseStart":293,"responseEnd":305,"domLoading":296,"domInteractive":1039,"domContentLoadedEventStart":1039,"domContentLoadedEventEnd":1087,"domComplete":1722,"loadEventStart":1723,"loadEventEnd":1723,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":981.5999999046326},{"name":"bigPipe.sidebar-id.end","time":982.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":982.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":985.0999999046326},{"name":"activityTabFullyLoaded","time":1098.8999998569489}],"measures":[],"correlationId":"4ac3ec4df60049","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":157,"dbReadsTimeInMs":18,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}