We have a data-dependent hence non easily reproducible error on several tables, that results in a
ERROR 1032 (HY000): Can't find record in 'contact'
|
It started happening when we upgraded from 10.3.16 to 10.4.10 and is still active after we upgraded to 10.4.11.
It does resemble another issue that we saw earlier but (??) could not find when writing this, that implied a wrong execution plan but was supposedly fixed in 10.4.11.
We caught one that we could reproduce, at least a few times, here's what we thought of gathering. We have enough traces that we can possibly catch some more if needed and gather more data.
explain extended SELECT id FROM contact WHERE 1=1 AND (first_name IS NOT NULL OR last_name IS NOT NULL OR email IS NOT NULL OR email_private IS NOT NULL OR phone IS NOT NULL OR mobile_phone IS NOT NULL) AND id != **redacted** AND (company_id = **redacted**) AND (first_name = '**redacted**') AND (last_name = '**redacted**') AND email = '**redacted**' AND (gender = '**redacted**' OR gender IS NULL) AND (country_id = **redacted**) AND is_public=1 AND client_id IS NULL
|
--------------
|
|
+------+-------------+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+------+--------+----------+----------------------------------------------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
|
+------+-------------+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+------+--------+----------+----------------------------------------------------------------------------+
|
| 1 | SIMPLE | contact | range|filter | PRIMARY,contact_company_id_company_id,ixFirst_name,ixLast_name,ixPhone,ixGender,ixFirstName,contact_country,ixCompanyActive,ixCompanyActiveCreatedAt,ixCompanyFunction,ixIdActiveCreatedAt,ixPublic,ixEmailPrivate,ixCompanyActivePublicCountry,ixCompanyActivePublic,ixCountry,ixIdActive,ixEmail,ixIdActiveCompany,ixFirstNameLastName,ixClient,ixFirstNameGenderActivePublic,ixFirstLastEmailActive,ixEmailFullText | ixEmail|ixCompanyActive | 776|9 | NULL | 2 (0%) | 0.23 | Using index condition; Using where; Rowid-ordered scan; Using rowid filter |
|
+------+-------------+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+------+--------+----------+----------------------------------------------------------------------------+
|
and here is the JSON version
{
|
"query_block": {
|
"select_id": 1,
|
"table": {
|
"table_name": "contact",
|
"access_type": "range",
|
"possible_keys": [
|
"PRIMARY",
|
"contact_company_id_company_id",
|
"ixFirst_name",
|
"ixLast_name",
|
"ixPhone",
|
"ixGender",
|
"ixFirstName",
|
"contact_country",
|
"ixCompanyActive",
|
"ixCompanyActiveCreatedAt",
|
"ixCompanyFunction",
|
"ixIdActiveCreatedAt",
|
"ixPublic",
|
"ixEmailPrivate",
|
"ixCompanyActivePublicCountry",
|
"ixCompanyActivePublic",
|
"ixCountry",
|
"ixIdActive",
|
"ixEmail",
|
"ixIdActiveCompany",
|
"ixFirstNameLastName",
|
"ixClient",
|
"ixFirstNameGenderActivePublic",
|
"ixFirstLastEmailActive",
|
"ixEmailFullText"
|
],
|
"key": "ixEmail",
|
"key_length": "776",
|
"used_key_parts": ["email", "id"],
|
"rowid_filter": {
|
"range": {
|
"key": "ixCompanyActive",
|
"used_key_parts": ["company_id"]
|
},
|
"rows": 14,
|
"selectivity_pct": 1.1e-4
|
},
|
"rows": 2,
|
"filtered": 0.2299,
|
"index_condition": "contact.`id` <> **redacted** and contact.email = '**redacted**'",
|
"attached_condition": "contact.company_id = **redacted** and contact.country_id = **redacted** and contact.is_public = 1 and (contact.first_name is not null or contact.last_name is not null or contact.email is not null or contact.email_private is not null or contact.phone is not null or contact.mobile_phone is not null) and contact.first_name = '**redacted**' and contact.last_name = '**redacted**' and (contact.gender = '**redacted**' or contact.gender is null) and contact.client_id is null",
|
"mrr_type": "Rowid-ordered scan"
|
}
|
}
|
}
|
{"report":{"fcp":940.5,"ttfb":210.5,"pageVisibility":"visible","entityId":81867,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"05f2a62a-c250-4588-a001-abe9999f01ca","navigationType":0,"readyForUser":1046.8000001907349,"redirectCount":0,"resourceLoadedEnd":1460.7000007629395,"resourceLoadedStart":216.20000076293945,"resourceTiming":[{"duration":214.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":216.20000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":216.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":430.70000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":214.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":216.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":216.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":431,"responseStart":0,"secureConnectionStart":0},{"duration":224,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":216.70000076293945,"connectEnd":216.70000076293945,"connectStart":216.70000076293945,"domainLookupEnd":216.70000076293945,"domainLookupStart":216.70000076293945,"fetchStart":216.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":216.70000076293945,"responseEnd":440.70000076293945,"responseStart":440.70000076293945,"secureConnectionStart":216.70000076293945},{"duration":250.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":216.9000005722046,"connectEnd":216.9000005722046,"connectStart":216.9000005722046,"domainLookupEnd":216.9000005722046,"domainLookupStart":216.9000005722046,"fetchStart":216.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":216.9000005722046,"responseEnd":467.70000076293945,"responseStart":467.70000076293945,"secureConnectionStart":216.9000005722046},{"duration":254.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":217,"connectEnd":217,"connectStart":217,"domainLookupEnd":217,"domainLookupStart":217,"fetchStart":217,"redirectEnd":0,"redirectStart":0,"requestStart":217,"responseEnd":471.9000005722046,"responseStart":471.9000005722046,"secureConnectionStart":217},{"duration":264,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":217.20000076293945,"connectEnd":217.20000076293945,"connectStart":217.20000076293945,"domainLookupEnd":217.20000076293945,"domainLookupStart":217.20000076293945,"fetchStart":217.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":217.20000076293945,"responseEnd":481.20000076293945,"responseStart":481.20000076293945,"secureConnectionStart":217.20000076293945},{"duration":270.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":217.5,"connectEnd":217.5,"connectStart":217.5,"domainLookupEnd":217.5,"domainLookupStart":217.5,"fetchStart":217.5,"redirectEnd":0,"redirectStart":0,"requestStart":217.5,"responseEnd":487.80000019073486,"responseStart":487.80000019073486,"secureConnectionStart":217.5},{"duration":391.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":217.70000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":217.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":609.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":271,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":217.80000019073486,"connectEnd":217.80000019073486,"connectStart":217.80000019073486,"domainLookupEnd":217.80000019073486,"domainLookupStart":217.80000019073486,"fetchStart":217.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":217.80000019073486,"responseEnd":488.80000019073486,"responseStart":488.80000019073486,"secureConnectionStart":217.80000019073486},{"duration":391.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":218,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":218,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":609.5,"responseStart":0,"secureConnectionStart":0},{"duration":274.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":218.10000038146973,"connectEnd":218.10000038146973,"connectStart":218.10000038146973,"domainLookupEnd":218.10000038146973,"domainLookupStart":218.10000038146973,"fetchStart":218.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":218.10000038146973,"responseEnd":492.6000003814697,"responseStart":492.6000003814697,"secureConnectionStart":218.10000038146973},{"duration":524.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":223.80000019073486,"connectEnd":223.80000019073486,"connectStart":223.80000019073486,"domainLookupEnd":223.80000019073486,"domainLookupStart":223.80000019073486,"fetchStart":223.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":223.80000019073486,"responseEnd":748.5,"responseStart":748.5,"secureConnectionStart":223.80000019073486},{"duration":1236.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":223.9000005722046,"connectEnd":223.9000005722046,"connectStart":223.9000005722046,"domainLookupEnd":223.9000005722046,"domainLookupStart":223.9000005722046,"fetchStart":223.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":223.9000005722046,"responseEnd":1460.7000007629395,"responseStart":1460.6000003814697,"secureConnectionStart":223.9000005722046},{"duration":763,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":695.6000003814697,"connectEnd":695.6000003814697,"connectStart":695.6000003814697,"domainLookupEnd":695.6000003814697,"domainLookupStart":695.6000003814697,"fetchStart":695.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":695.6000003814697,"responseEnd":1458.6000003814697,"responseStart":1458.6000003814697,"secureConnectionStart":695.6000003814697},{"duration":553.8000001907349,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":926.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":926.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1480.7000007629395,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":37,"responseStart":211,"responseEnd":218,"domLoading":214,"domInteractive":1505,"domContentLoadedEventStart":1505,"domContentLoadedEventEnd":1556,"domComplete":2377,"loadEventStart":2377,"loadEventEnd":2381,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1482},{"name":"bigPipe.sidebar-id.end","time":1482.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1483},{"name":"bigPipe.activity-panel-pipe-id.end","time":1485.7000007629395},{"name":"activityTabFullyLoaded","time":1565.8000001907349}],"measures":[],"correlationId":"f3bbc3b3d0c833","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}