Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.4(EOL) , 10.5 , 10.6 , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL)
Note: GLOBAL_STATUS is taken as an example, the same can be reproduced with different information_schema tables.
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
# Not needed for MTR, but just in case
CREATE DATABASE db CHARACTER SET latin1;
CREATE TABLE db.t LIKE information_schema.GLOBAL_STATUS;
SHOW CREATE TABLE db.t;
--sync_slave_with_master
SHOW CREATE TABLE db.t;
--connection master
INSERT INTO db.t VALUES ( 'foo' , 'bar' );
--sync_slave_with_master
# Cleanup
--connection master
DROP DATABASE db;
--source include/rpl_end.inc
10.4 f5dceafd
SHOW CREATE TABLE db.t;
Table Create Table
t CREATE TABLE `t` (
`VARIABLE_NAME` varchar (64) NOT NULL ,
`VARIABLE_VALUE` varchar (2048) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE =utf8_general_ci
connection slave;
SHOW CREATE TABLE db.t;
Table Create Table
t CREATE TABLE `t` (
`VARIABLE_NAME` varchar (64) NOT NULL ,
`VARIABLE_VALUE` varchar (2048) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci
2023-06-27 22:16:37 13 [ERROR] Slave SQL: Column 0 of table 'db.t' cannot be converted from type 'varchar(192 octets)' to type 'varchar(64 octets) character set latin1' , Gtid 0-1-3, Internal MariaDB error code: 1677
The problem can already be seen after CREATE, as the table's character set is different on master and slave. Further INSERT only shows how replication actually breaks.
On master, CREATE ... LIKE works properly and creates a table with the same character set as the I_S table, which is utf8.
However, when it is written into the binlog, it is converted from CREATE .. LIKE into an explicit CREATE statement. Probably it's special logic for information_schema, as it doesn't seem to happen for just any table.
All in all, the event in the binlog looks like this:
#230627 22:16:37 server id 1 end_log_pos 705 CRC32 0x9a36f132 Query thread_id=9 exec_time=0 error_code=0
use `test` /*!*/ ;
SET TIMESTAMP =1687893397 /*!*/ ;
CREATE TABLE `db`.`t` (
`VARIABLE_NAME` varchar (64) NOT NULL ,
`VARIABLE_VALUE` varchar (2048) NOT NULL
) ENGINE=MEMORY
/*!*/ ;
Note that it doesn't specify the character set, so it's created with the database's default, which is in this case latin1.
{"report":{"fcp":1014.3999999761581,"ttfb":177.39999997615814,"pageVisibility":"visible","entityId":123059,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9dedfe8c-a08b-45ce-a847-05a72481bf22","navigationType":0,"readyForUser":1100.5999999642372,"redirectCount":0,"resourceLoadedEnd":1187.7999999523163,"resourceLoadedStart":182.0999999642372,"resourceTiming":[{"duration":310.19999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":182.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":492.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":310.4000000357628,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":182.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":492.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":319.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":182.39999997615814,"connectEnd":182.39999997615814,"connectStart":182.39999997615814,"domainLookupEnd":182.39999997615814,"domainLookupStart":182.39999997615814,"fetchStart":182.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":182.39999997615814,"responseEnd":502.2999999523163,"responseStart":502.2999999523163,"secureConnectionStart":182.39999997615814},{"duration":395,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":182.69999998807907,"connectEnd":182.69999998807907,"connectStart":182.69999998807907,"domainLookupEnd":182.69999998807907,"domainLookupStart":182.69999998807907,"fetchStart":182.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":182.69999998807907,"responseEnd":577.6999999880791,"responseStart":577.6999999880791,"secureConnectionStart":182.69999998807907},{"duration":398.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":182.89999997615814,"connectEnd":182.89999997615814,"connectStart":182.89999997615814,"domainLookupEnd":182.89999997615814,"domainLookupStart":182.89999997615814,"fetchStart":182.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":182.89999997615814,"responseEnd":581.3999999761581,"responseStart":581.3999999761581,"secureConnectionStart":182.89999997615814},{"duration":399.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":183.0999999642372,"connectEnd":183.0999999642372,"connectStart":183.0999999642372,"domainLookupEnd":183.0999999642372,"domainLookupStart":183.0999999642372,"fetchStart":183.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":183.0999999642372,"responseEnd":582.5999999642372,"responseStart":582.5999999642372,"secureConnectionStart":183.0999999642372},{"duration":399.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":183.19999998807907,"connectEnd":183.19999998807907,"connectStart":183.19999998807907,"domainLookupEnd":183.19999998807907,"domainLookupStart":183.19999998807907,"fetchStart":183.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":183.19999998807907,"responseEnd":583.0999999642372,"responseStart":583.0999999642372,"secureConnectionStart":183.19999998807907},{"duration":461.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":183.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":644.5,"responseStart":0,"secureConnectionStart":0},{"duration":400,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":183.5999999642372,"connectEnd":183.5999999642372,"connectStart":183.5999999642372,"domainLookupEnd":183.5999999642372,"domainLookupStart":183.5999999642372,"fetchStart":183.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":183.5999999642372,"responseEnd":583.5999999642372,"responseStart":583.5999999642372,"secureConnectionStart":183.5999999642372},{"duration":460.9000000357628,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":183.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":644.6999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":400.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":184,"connectEnd":184,"connectStart":184,"domainLookupEnd":184,"domainLookupStart":184,"fetchStart":184,"redirectEnd":0,"redirectStart":0,"requestStart":184,"responseEnd":584.1999999880791,"responseStart":584.1999999880791,"secureConnectionStart":184},{"duration":544.8000000119209,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":190.39999997615814,"connectEnd":190.39999997615814,"connectStart":190.39999997615814,"domainLookupEnd":190.39999997615814,"domainLookupStart":190.39999997615814,"fetchStart":190.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":190.39999997615814,"responseEnd":735.1999999880791,"responseStart":735.1999999880791,"secureConnectionStart":190.39999997615814},{"duration":974.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":192.19999998807907,"connectEnd":192.19999998807907,"connectStart":192.19999998807907,"domainLookupEnd":192.19999998807907,"domainLookupStart":192.19999998807907,"fetchStart":192.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":192.19999998807907,"responseEnd":1167.0999999642372,"responseStart":1167.0999999642372,"secureConnectionStart":192.19999998807907},{"duration":79.59999996423721,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":656,"connectEnd":656,"connectStart":656,"domainLookupEnd":656,"domainLookupStart":656,"fetchStart":656,"redirectEnd":0,"redirectStart":0,"requestStart":656,"responseEnd":735.5999999642372,"responseStart":735.5999999642372,"secureConnectionStart":656},{"duration":256.5999999642372,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":931.1999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":931.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1187.7999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":16,"responseStart":178,"responseEnd":192,"domLoading":181,"domInteractive":1192,"domContentLoadedEventStart":1192,"domContentLoadedEventEnd":1234,"domComplete":1721,"loadEventStart":1721,"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":1171},{"name":"bigPipe.sidebar-id.end","time":1171.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1172.0999999642372},{"name":"bigPipe.activity-panel-pipe-id.end","time":1174.5},{"name":"activityTabFullyLoaded","time":1240.8999999761581}],"measures":[],"correlationId":"641cfa988b4388","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}