Test case:
SQL> use test;
|
|
SQL> CREATE TABLE `mail` (
|
`subject` varchar(255) DEFAULT NULL,
|
`body` varchar(255) DEFAULT NULL,
|
`attachement` longblob DEFAULT NULL,
|
`metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
;
|
|
SQL> ALTER TABLE mail MODIFY COLUMN `metadata` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMPRESSED DEFAULT NULL;
|
|
SQL> SHOW CREATE TABLE mail\G
|
*************************** 1. row ***************************
|
Table: mail
|
Create Table: CREATE TABLE `mail` (
|
`subject` varchar(255) DEFAULT NULL,
|
`body` varchar(255) DEFAULT NULL,
|
`attachement` longblob DEFAULT NULL,
|
`metadata` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
# mysqldump -u root test > test_dump.sql
|
# mysql -uroot test < test_dump.sql
|
ERROR 1064 (42000) at line 25: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT C' at line 5
|
CREATE TABLE `mail2` (
|
`subject` varchar(255) DEFAULT NULL,
|
`body` varchar(255) DEFAULT NULL,
|
`attachement` longblob DEFAULT NULL,
|
`metadata` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
--> fails with the same error
CREATE TABLE `mail3` (
|
`subject` varchar(255) DEFAULT NULL,
|
`body` varchar(255) DEFAULT NULL,
|
`attachement` longblob DEFAULT NULL,
|
`metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin /*!100301 COMPRESSED*/ DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
--> this works
{"report":{"fcp":877.6999998092651,"ttfb":262.19999980926514,"pageVisibility":"visible","entityId":70075,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"a0b69dff-05a8-47f4-adf8-db3dc08a4e01","navigationType":0,"readyForUser":966.5,"redirectCount":0,"resourceLoadedEnd":582.3000001907349,"resourceLoadedStart":267.30000019073486,"resourceTiming":[{"duration":17.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":267.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":18.800000190734863,"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":267.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":286.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":169.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":267.69999980926514,"connectEnd":267.69999980926514,"connectStart":267.69999980926514,"domainLookupEnd":267.69999980926514,"domainLookupStart":267.69999980926514,"fetchStart":267.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":288.69999980926514,"responseEnd":437.5,"responseStart":307.5,"secureConnectionStart":267.69999980926514},{"duration":296.7999997138977,"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":267.90000009536743,"connectEnd":267.90000009536743,"connectStart":267.90000009536743,"domainLookupEnd":267.90000009536743,"domainLookupStart":267.90000009536743,"fetchStart":267.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":290,"responseEnd":564.6999998092651,"responseStart":309.19999980926514,"secureConnectionStart":267.90000009536743},{"duration":49.59999990463257,"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":268.09999990463257,"connectEnd":268.09999990463257,"connectStart":268.09999990463257,"domainLookupEnd":268.09999990463257,"domainLookupStart":268.09999990463257,"fetchStart":268.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":293.80000019073486,"responseEnd":317.69999980926514,"responseStart":315.19999980926514,"secureConnectionStart":268.09999990463257},{"duration":48.09999990463257,"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":268.30000019073486,"connectEnd":268.30000019073486,"connectStart":268.30000019073486,"domainLookupEnd":268.30000019073486,"domainLookupStart":268.30000019073486,"fetchStart":268.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":292.69999980926514,"responseEnd":316.40000009536743,"responseStart":313.30000019073486,"secureConnectionStart":268.30000019073486},{"duration":53.40000009536743,"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":268.5,"connectEnd":268.5,"connectStart":268.5,"domainLookupEnd":268.5,"domainLookupStart":268.5,"fetchStart":268.5,"redirectEnd":0,"redirectStart":0,"requestStart":296.40000009536743,"responseEnd":321.90000009536743,"responseStart":318.30000019073486,"secureConnectionStart":268.5},{"duration":21.800000190734863,"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":268.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":290.5,"responseStart":0,"secureConnectionStart":0},{"duration":53.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":268.90000009536743,"connectEnd":268.90000009536743,"connectStart":268.90000009536743,"domainLookupEnd":268.90000009536743,"domainLookupStart":268.90000009536743,"fetchStart":268.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":299.5,"responseEnd":322.30000019073486,"responseStart":320,"secureConnectionStart":268.90000009536743},{"duration":23.300000190734863,"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":269,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":292.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":53.700000286102295,"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":269.19999980926514,"connectEnd":269.19999980926514,"connectStart":269.19999980926514,"domainLookupEnd":269.19999980926514,"domainLookupStart":269.19999980926514,"fetchStart":269.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":299.80000019073486,"responseEnd":322.90000009536743,"responseStart":320.40000009536743,"secureConnectionStart":269.19999980926514},{"duration":306.59999990463257,"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":274.90000009536743,"connectEnd":274.90000009536743,"connectStart":274.90000009536743,"domainLookupEnd":274.90000009536743,"domainLookupStart":274.90000009536743,"fetchStart":274.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":308.40000009536743,"responseEnd":581.5,"responseStart":575.8000001907349,"secureConnectionStart":274.90000009536743},{"duration":307.30000019073486,"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":275,"connectEnd":275,"connectStart":275,"domainLookupEnd":275,"domainLookupStart":275,"fetchStart":275,"redirectEnd":0,"redirectStart":0,"requestStart":315,"responseEnd":582.3000001907349,"responseStart":577,"secureConnectionStart":275},{"duration":65.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":585.3000001907349,"connectEnd":585.3000001907349,"connectStart":585.3000001907349,"domainLookupEnd":585.3000001907349,"domainLookupStart":585.3000001907349,"fetchStart":585.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":617.1999998092651,"responseEnd":651,"responseStart":650.4000000953674,"secureConnectionStart":585.3000001907349},{"duration":271.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":794.3000001907349,"connectEnd":794.3000001907349,"connectStart":794.3000001907349,"domainLookupEnd":794.3000001907349,"domainLookupStart":794.3000001907349,"fetchStart":794.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1033.5999999046326,"responseEnd":1065.4000000953674,"responseStart":1064.3000001907349,"secureConnectionStart":794.3000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":71,"responseStart":262,"responseEnd":270,"domLoading":265,"domInteractive":1034,"domContentLoadedEventStart":1034,"domContentLoadedEventEnd":1085,"domComplete":1513,"loadEventStart":1513,"loadEventEnd":1513,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1008.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1009.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1009.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1011.9000000953674},{"name":"activityTabFullyLoaded","time":1102.6999998092651}],"measures":[],"correlationId":"c32f299aace970","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report. In the essence, SHOW CREATE TABLE places the generated executable comment in the wrong place :