Let's create a simple table on our master server:
CREATE DATABASE slave_conversion_test;
|
|
CREATE TABLE slave_conversion_test.tab (
|
id int(10) unsigned NOT NULL,
|
data varchar(50),
|
PRIMARY KEY(id)
|
);
|
And then we can insert some data. To reproduce this issue, we need to make sure that the most significant bit of one of the integer values is '1':
INSERT INTO slave_conversion_test.tab (id, data) VALUES (1, 'str');
|
INSERT INTO slave_conversion_test.tab (id, data) VALUES (2147483647, 'str');
|
INSERT INTO slave_conversion_test.tab (id, data) VALUES (4294967295, 'str');
|
Now let's change the 'id' column to 'bigint' on the slave:
STOP SLAVE;
|
ALTER TABLE slave_conversion_test.tab MODIFY id BIGINT NOT NULL;
|
We also need to set slave_type_conversions to ALL_NON_LOSSY to make this work:
SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
|
START SLAVE;
|
Now back on the master, let's try to update these rows:
UPDATE slave_conversion_test.tab SET data='newstr' WHERE id=2147483647;
|
UPDATE slave_conversion_test.tab SET data='newstr' WHERE id=4294967295;
|
Now what data do we see on the slave:
MariaDB [(none)]> SELECT * FROM slave_conversion_test.tab;
|
+------------+--------+
|
| id | data |
|
+------------+--------+
|
| 1 | str |
|
| 2147483647 | newstr |
|
| 4294967295 | str |
|
+------------+--------+
|
3 rows in set (0.00 sec)
|
The row with 'id' value 4294967295 created an error on the slave:
MariaDB [(none)]> SHOW SLAVE STATUS\G
|
*************************** 1. row ***************************
|
Slave_IO_State: Waiting for master to send event
|
Master_Host: 192.168.1.65
|
Master_User: repl
|
Master_Port: 3306
|
Connect_Retry: 60
|
Master_Log_File: mysqld-bin.000004
|
Read_Master_Log_Pos: 1088
|
Relay_Log_File: master-relay-bin.000005
|
Relay_Log_Pos: 599
|
Relay_Master_Log_File: mysqld-bin.000004
|
Slave_IO_Running: Yes
|
Slave_SQL_Running: No
|
Replicate_Do_DB:
|
Replicate_Ignore_DB:
|
Replicate_Do_Table:
|
Replicate_Ignore_Table:
|
Replicate_Wild_Do_Table:
|
Replicate_Wild_Ignore_Table:
|
Last_Errno: 1032
|
Last_Error: Could not execute Update_rows_v1 event on table slave_conversion_test.tab; Can't find record in 'tab', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysqld-bin.000004, end_log_pos 1061
|
Skip_Counter: 0
|
Exec_Master_Log_Pos: 884
|
Relay_Log_Space: 1821
|
Until_Condition: None
|
Until_Log_File:
|
Until_Log_Pos: 0
|
Master_SSL_Allowed: No
|
Master_SSL_CA_File:
|
Master_SSL_CA_Path:
|
Master_SSL_Cert:
|
Master_SSL_Cipher:
|
Master_SSL_Key:
|
Seconds_Behind_Master: NULL
|
Master_SSL_Verify_Server_Cert: No
|
Last_IO_Errno: 0
|
Last_IO_Error:
|
Last_SQL_Errno: 1032
|
Last_SQL_Error: Could not execute Update_rows_v1 event on table slave_conversion_test.tab; Can't find record in 'tab', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysqld-bin.000004, end_log_pos 1061
|
Replicate_Ignore_Server_Ids:
|
Master_Server_Id: 3
|
Master_SSL_Crl:
|
Master_SSL_Crlpath:
|
Using_Gtid: No
|
Gtid_IO_Pos:
|
1 row in set (0.00 sec)
|
The slave seems to want to interpret the id value in the Update_rows_v1 event as a negative integer, since the most significant bit is 1.
The master in this case is MySQL 5.5, if that makes a difference.
Transition |
Time In Source Status |
Execution Times |
Open |
|
Closed |
|
10d 3h 19m
|
1
|
{"report":{"fcp":761.2000007629395,"ttfb":184.10000038146973,"pageVisibility":"visible","entityId":52106,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"2b2d5b08-46ec-4d27-9bab-e87f1d2ddf79","navigationType":0,"readyForUser":853.5,"redirectCount":0,"resourceLoadedEnd":755.1000003814697,"resourceLoadedStart":190.30000019073486,"resourceTiming":[{"duration":9.199999809265137,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":190.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":190.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":199.5,"responseStart":0,"secureConnectionStart":0},{"duration":9.300000190734863,"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":190.60000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":190.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":199.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":70.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":190.80000019073486,"connectEnd":190.80000019073486,"connectStart":190.80000019073486,"domainLookupEnd":190.80000019073486,"domainLookupStart":190.80000019073486,"fetchStart":190.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":190.80000019073486,"responseEnd":260.9000005722046,"responseStart":260.9000005722046,"secureConnectionStart":190.80000019073486},{"duration":178.9000005722046,"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":191,"connectEnd":191,"connectStart":191,"domainLookupEnd":191,"domainLookupStart":191,"fetchStart":191,"redirectEnd":0,"redirectStart":0,"requestStart":191,"responseEnd":369.9000005722046,"responseStart":369.9000005722046,"secureConnectionStart":191},{"duration":182.4000005722046,"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":191.30000019073486,"connectEnd":191.30000019073486,"connectStart":191.30000019073486,"domainLookupEnd":191.30000019073486,"domainLookupStart":191.30000019073486,"fetchStart":191.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":191.30000019073486,"responseEnd":373.70000076293945,"responseStart":373.6000003814697,"secureConnectionStart":191.30000019073486},{"duration":182.5,"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":191.5,"connectEnd":191.5,"connectStart":191.5,"domainLookupEnd":191.5,"domainLookupStart":191.5,"fetchStart":191.5,"redirectEnd":0,"redirectStart":0,"requestStart":191.5,"responseEnd":374,"responseStart":374,"secureConnectionStart":191.5},{"duration":182.89999961853027,"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":191.70000076293945,"connectEnd":191.70000076293945,"connectStart":191.70000076293945,"domainLookupEnd":191.70000076293945,"domainLookupStart":191.70000076293945,"fetchStart":191.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":191.70000076293945,"responseEnd":374.6000003814697,"responseStart":374.6000003814697,"secureConnectionStart":191.70000076293945},{"duration":211.5999994277954,"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":191.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":191.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.5,"responseStart":0,"secureConnectionStart":0},{"duration":183,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":192,"connectEnd":192,"connectStart":192,"domainLookupEnd":192,"domainLookupStart":192,"fetchStart":192,"redirectEnd":0,"redirectStart":0,"requestStart":192,"responseEnd":375,"responseStart":375,"secureConnectionStart":192},{"duration":211.5,"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":192.20000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":192.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.70000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":183.30000019073486,"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":192.4000005722046,"connectEnd":192.4000005722046,"connectStart":192.4000005722046,"domainLookupEnd":192.4000005722046,"domainLookupStart":192.4000005722046,"fetchStart":192.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":192.4000005722046,"responseEnd":375.70000076293945,"responseStart":375.70000076293945,"secureConnectionStart":192.4000005722046},{"duration":235.5,"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":193.20000076293945,"connectEnd":193.20000076293945,"connectStart":193.20000076293945,"domainLookupEnd":193.20000076293945,"domainLookupStart":193.20000076293945,"fetchStart":193.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":193.20000076293945,"responseEnd":428.70000076293945,"responseStart":428.70000076293945,"secureConnectionStart":193.20000076293945},{"duration":267,"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":193.30000019073486,"connectEnd":193.30000019073486,"connectStart":193.30000019073486,"domainLookupEnd":193.30000019073486,"domainLookupStart":193.30000019073486,"fetchStart":193.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":193.30000019073486,"responseEnd":460.30000019073486,"responseStart":460.30000019073486,"secureConnectionStart":193.30000019073486},{"duration":15.299999237060547,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":414.70000076293945,"connectEnd":414.70000076293945,"connectStart":414.70000076293945,"domainLookupEnd":414.70000076293945,"domainLookupStart":414.70000076293945,"fetchStart":414.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":414.70000076293945,"responseEnd":430,"responseStart":430,"secureConnectionStart":414.70000076293945},{"duration":23.200000762939453,"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":438,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":438,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":461.20000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":309.19999980926514,"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":438.9000005722046,"connectEnd":438.9000005722046,"connectStart":438.9000005722046,"domainLookupEnd":438.9000005722046,"domainLookupStart":438.9000005722046,"fetchStart":438.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":438.9000005722046,"responseEnd":748.1000003814697,"responseStart":748.1000003814697,"secureConnectionStart":438.9000005722046},{"duration":208,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":538.3000001907349,"connectEnd":538.3000001907349,"connectStart":538.3000001907349,"domainLookupEnd":538.3000001907349,"domainLookupStart":538.3000001907349,"fetchStart":538.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":538.3000001907349,"responseEnd":746.3000001907349,"responseStart":746.3000001907349,"secureConnectionStart":538.3000001907349},{"duration":138.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":755.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":755.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":893.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":315.8999996185303,"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":439.20000076293945,"connectEnd":439.20000076293945,"connectStart":439.20000076293945,"domainLookupEnd":439.20000076293945,"domainLookupStart":439.20000076293945,"fetchStart":439.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":439.20000076293945,"responseEnd":755.1000003814697,"responseStart":755.1000003814697,"secureConnectionStart":439.20000076293945}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":16,"responseStart":184,"responseEnd":186,"domLoading":187,"domInteractive":925,"domContentLoadedEventStart":925,"domContentLoadedEventEnd":977,"domComplete":1202,"loadEventStart":1202,"loadEventEnd":1203,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":895.6000003814697},{"name":"bigPipe.sidebar-id.end","time":896.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.start","time":896.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":897.5},{"name":"activityTabFullyLoaded","time":992.2000007629395}],"measures":[],"correlationId":"53c80b6d7da8d3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}