Hi, all
we encountered a problem in 10.2.6 slave.
we could not confirm ,it is bug or other, please experts help to confirm, thanks.
our product server consist of a master and two slaves:
master: MariaDB server 10.1.22
slave1: MariaDB server 10.1.22
slave2: MariaDB server 10.2.6 (delay slave)
use table structure:
CREATE TABLE dba.event_time(
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`dbname` VARCHAR(50) COLLATE utf8_bin DEFAULT NULL ,
|
`eventname` VARCHAR(50) COLLATE utf8_bin DEFAULT NULL ,
|
`startime` DATETIME DEFAULT NULL ,
|
`endtime` DATETIME DEFAULT NULL ,
|
`recdate` DATE DEFAULT NULL ,
|
`duration` INT(11) AS (timestampdiff(SECOND,startime,endtime)) PERSISTENT ,
|
PRIMARY KEY (`id`),
|
UNIQUE KEY `dbname` (`dbname`,`eventname`,`recdate`)
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
on master, after execute alter statement , slave1 could normal run.
ALTER TABLE `dba`.`event_time` ADD INDEX (`startime`);
|
but ,on slave2, slave stop run ,and have some error in error log:
2017-06-28 23:59:50 140041235142400 [ERROR] Slave SQL: Error 'Unknown column 'dba.event_time.startime' in 'GENERATED ALWAYS AS'' on query. Default database: ''. Query: 'ALTER TABLE `dba`.`event_time` ADD INDEX (`startime`)', Gtid 0-5187-24322365258, Internal MariaDB error code: 1054
|
2017-06-28 23:59:50 140041235142400 [Warning] Slave: Unknown column 'dba.event_time.startime' in 'GENERATED ALWAYS AS' Error_code: 1054
|
2017-06-28 23:59:50 140041235142400 [Warning] Slave: Got an error evaluating stored expression timestampdiff(SECOND,`dba`.`event_time`.`startime`,`dba`.`event_time`.`endtime`) Error_code: 4027
|
2017-06-28 23:59:50 140041235142400 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.008350' position 693638501; GTID position '0-5187-24322365257'
|
if manual execute ALTER TABLE `dba`.`event_time` ADD INDEX (`startime`) on slave2, it could normal run.
{"report":{"fcp":948.8000001907349,"ttfb":302,"pageVisibility":"visible","entityId":62005,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6d8075c4-5fc6-480e-8307-835d6e075190","navigationType":0,"readyForUser":1061.4000005722046,"redirectCount":0,"resourceLoadedEnd":710.5,"resourceLoadedStart":310.9000005722046,"resourceTiming":[{"duration":74.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":310.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":310.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":385.70000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":75.09999942779541,"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":311.20000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":311.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":386.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":242.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":311.4000005722046,"connectEnd":311.4000005722046,"connectStart":311.4000005722046,"domainLookupEnd":311.4000005722046,"domainLookupStart":311.4000005722046,"fetchStart":311.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":387.9000005722046,"responseEnd":554.2000007629395,"responseStart":400.9000005722046,"secureConnectionStart":311.4000005722046},{"duration":365.8999996185303,"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":312.1000003814697,"connectEnd":312.1000003814697,"connectStart":312.1000003814697,"domainLookupEnd":312.1000003814697,"domainLookupStart":312.1000003814697,"fetchStart":312.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":392.5,"responseEnd":678,"responseStart":410.4000005722046,"secureConnectionStart":312.1000003814697},{"duration":102.80000019073486,"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":312.30000019073486,"connectEnd":312.30000019073486,"connectStart":312.30000019073486,"domainLookupEnd":312.30000019073486,"domainLookupStart":312.30000019073486,"fetchStart":312.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":392.6000003814697,"responseEnd":415.1000003814697,"responseStart":412.70000076293945,"secureConnectionStart":312.30000019073486},{"duration":103.90000057220459,"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":312.5,"connectEnd":312.5,"connectStart":312.5,"domainLookupEnd":312.5,"domainLookupStart":312.5,"fetchStart":312.5,"redirectEnd":0,"redirectStart":0,"requestStart":393,"responseEnd":416.4000005722046,"responseStart":413.80000019073486,"secureConnectionStart":312.5},{"duration":104,"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":312.80000019073486,"connectEnd":312.80000019073486,"connectStart":312.80000019073486,"domainLookupEnd":312.80000019073486,"domainLookupStart":312.80000019073486,"fetchStart":312.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":393.30000019073486,"responseEnd":416.80000019073486,"responseStart":415.1000003814697,"secureConnectionStart":312.80000019073486},{"duration":79.5,"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":312.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":312.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":392.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":105.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":313.1000003814697,"connectEnd":313.1000003814697,"connectStart":313.1000003814697,"domainLookupEnd":313.1000003814697,"domainLookupStart":313.1000003814697,"fetchStart":313.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":395,"responseEnd":419,"responseStart":417.5,"secureConnectionStart":313.1000003814697},{"duration":80.19999980926514,"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":313.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":313.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":393.5,"responseStart":0,"secureConnectionStart":0},{"duration":108.60000038146973,"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":313.5,"connectEnd":313.5,"connectStart":313.5,"domainLookupEnd":313.5,"domainLookupStart":313.5,"fetchStart":313.5,"redirectEnd":0,"redirectStart":0,"requestStart":397.30000019073486,"responseEnd":422.1000003814697,"responseStart":419.30000019073486,"secureConnectionStart":313.5},{"duration":391.0999994277954,"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":315.4000005722046,"connectEnd":315.4000005722046,"connectStart":315.4000005722046,"domainLookupEnd":315.4000005722046,"domainLookupStart":315.4000005722046,"fetchStart":315.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":499,"responseEnd":706.5,"responseStart":698.6000003814697,"secureConnectionStart":315.4000005722046},{"duration":392.3999996185303,"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":318.1000003814697,"connectEnd":318.1000003814697,"connectStart":318.1000003814697,"domainLookupEnd":318.1000003814697,"domainLookupStart":318.1000003814697,"fetchStart":318.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":585.8000001907349,"responseEnd":710.5,"responseStart":703.6000003814697,"secureConnectionStart":318.1000003814697},{"duration":121.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":704.2000007629395,"connectEnd":704.2000007629395,"connectStart":704.2000007629395,"domainLookupEnd":704.2000007629395,"domainLookupStart":704.2000007629395,"fetchStart":704.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":792.4000005722046,"responseEnd":825.9000005722046,"responseStart":825.2000007629395,"secureConnectionStart":704.2000007629395}],"fetchStart":0,"domainLookupStart":89,"domainLookupEnd":108,"connectStart":108,"connectEnd":128,"secureConnectionStart":117,"requestStart":130,"responseStart":302,"responseEnd":317,"domLoading":306,"domInteractive":1128,"domContentLoadedEventStart":1128,"domContentLoadedEventEnd":1177,"domComplete":1660,"loadEventStart":1660,"loadEventEnd":1661,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1102.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1103.7000007629395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1103.7000007629395},{"name":"bigPipe.activity-panel-pipe-id.end","time":1106},{"name":"activityTabFullyLoaded","time":1197.6000003814697}],"measures":[],"correlationId":"19d0a37e1d078","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":9,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report. It is indeed a bug.
The problem triggered by default database being empty. In a more general case, it can be a cross-database operation.
# Cleanup
Results
MariaDB [test]>
10.1 works okay.