When creating a table from a view and replicating the table creation from 10.0 to 10.1 a default value is lost.
replicated from (A)10.0.19 >(B) 10.0.19 >(C) 10.1.21.
On A:
MariaDB [test]> create table t1(
|
-> `field1` bigint(20) NOT NULL,
|
-> `field2` bigint(20) NOT NULL,
|
-> `text1` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
|
-> `type1` enum('Broad','Exact','Phrase','WebSite','Content','SuperBroad','TrueExact','PhraseCore','PhraseExact','PhraseSynonym','Custom') DEFAULT NULL)
|
-> engine=innodb charset=utf8
|
-> ;
|
Query OK, 0 rows affected (0.41 sec)
|
MariaDB [test]> create view testview as
|
-> select t1.`field1` as t1_f1,
|
-> t1.`field2` as t1_f2,
|
-> 'value',
|
-> t1.`text1` as t1_text1,
|
-> t1.`type1` as t1_type1
|
-> from t1;
|
Query OK, 0 rows affected (0.90 sec)
|
MariaDB [test]> show create view testview;
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| testview | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testview` AS select `t1`.`field1` AS `t1_f1`,`t1`.`field2` AS `t1_f2`,'value' AS `value`,`t1`.`text1` AS `t1_text1`,`t1`.`type1` AS `t1_type1` from `t1` | cp850 | cp850_general_ci |
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
1 row in set (0.03 sec)
|
MariaDB [test]> create table t2 as select * from testview;
|
Query OK, 0 rows affected (1.38 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
MariaDB [test]> show create table t2;
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`t1_f1` bigint(20) NOT NULL,
|
`t1_f2` bigint(20) NOT NULL,
|
`value` varchar(5) CHARACTER SET cp850 NOT NULL DEFAULT '',
|
`t1_text1` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
|
`t1_type1` enum('Broad','Exact','Phrase','WebSite','Content','SuperBroad','TrueExact','PhraseCore','PhraseExact','PhraseSynonym','Custom') CHARACTER SET utf8 DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
On B:
MariaDB [test]> show create table t2;
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`t1_f1` bigint(20) NOT NULL,
|
`t1_f2` bigint(20) NOT NULL,
|
`value` varchar(5) CHARACTER SET cp850 NOT NULL DEFAULT '',
|
`t1_text1` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
|
`t1_type1` enum('Broad','Exact','Phrase','WebSite','Content','SuperBroad','TrueExact','PhraseCore','PhraseExact','PhraseSynonym','Custom') CHARACTER SET utf8 DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
on C:
MariaDB [test]> show create table t2;
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`t1_f1` bigint(20) NOT NULL,
|
`t1_f2` bigint(20) NOT NULL,
|
`value` varchar(5) CHARACTER SET cp850 NOT NULL,
|
`t1_text1` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
|
`t1_type1` enum('Broad','Exact','Phrase','WebSite','Content','SuperBroad','TrueExact','PhraseCore','PhraseExact','PhraseSynonym','Custom') CHARACTER SET utf8 DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
The default value for `value` field is lost.
The servers are all default values except for statement based replication is used.
{"report":{"fcp":1817.9000000953674,"ttfb":754.7000002861023,"pageVisibility":"visible","entityId":60547,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"72c1eca4-315b-40bf-b6a0-fcee9e0a61f5","navigationType":0,"readyForUser":1933.8000001907349,"redirectCount":0,"resourceLoadedEnd":2302.7000002861023,"resourceLoadedStart":763.5,"resourceTiming":[{"duration":506,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":763.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":763.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1269.5,"responseStart":0,"secureConnectionStart":0},{"duration":505.90000009536743,"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":763.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":763.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1269.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":565.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":764.0999999046326,"connectEnd":764.0999999046326,"connectStart":764.0999999046326,"domainLookupEnd":764.0999999046326,"domainLookupStart":764.0999999046326,"fetchStart":764.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":764.0999999046326,"responseEnd":1329.7000002861023,"responseStart":1329.7000002861023,"secureConnectionStart":764.0999999046326},{"duration":621.3999996185303,"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":764.2000002861023,"connectEnd":764.2000002861023,"connectStart":764.2000002861023,"domainLookupEnd":764.2000002861023,"domainLookupStart":764.2000002861023,"fetchStart":764.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":764.2000002861023,"responseEnd":1385.5999999046326,"responseStart":1385.5999999046326,"secureConnectionStart":764.2000002861023},{"duration":628.6000003814697,"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":764.5999999046326,"connectEnd":764.5999999046326,"connectStart":764.5999999046326,"domainLookupEnd":764.5999999046326,"domainLookupStart":764.5999999046326,"fetchStart":764.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":764.5999999046326,"responseEnd":1393.2000002861023,"responseStart":1393.2000002861023,"secureConnectionStart":764.5999999046326},{"duration":632,"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":764.7000002861023,"connectEnd":764.7000002861023,"connectStart":764.7000002861023,"domainLookupEnd":764.7000002861023,"domainLookupStart":764.7000002861023,"fetchStart":764.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":764.7000002861023,"responseEnd":1396.7000002861023,"responseStart":1396.7000002861023,"secureConnectionStart":764.7000002861023},{"duration":633.3000001907349,"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":764.9000000953674,"connectEnd":764.9000000953674,"connectStart":764.9000000953674,"domainLookupEnd":764.9000000953674,"domainLookupStart":764.9000000953674,"fetchStart":764.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":764.9000000953674,"responseEnd":1398.2000002861023,"responseStart":1398.2000002861023,"secureConnectionStart":764.9000000953674},{"duration":720.7000002861023,"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":765,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1485.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":635.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":765.2000002861023,"connectEnd":765.2000002861023,"connectStart":765.2000002861023,"domainLookupEnd":765.2000002861023,"domainLookupStart":765.2000002861023,"fetchStart":765.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":765.2000002861023,"responseEnd":1400.8000001907349,"responseStart":1400.8000001907349,"secureConnectionStart":765.2000002861023},{"duration":720.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":765.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1485.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":637.5999999046326,"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":765.5,"connectEnd":765.5,"connectStart":765.5,"domainLookupEnd":765.5,"domainLookupStart":765.5,"fetchStart":765.5,"redirectEnd":0,"redirectStart":0,"requestStart":765.5,"responseEnd":1403.0999999046326,"responseStart":1403.0999999046326,"secureConnectionStart":765.5},{"duration":1440.9000000953674,"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":766.3000001907349,"connectEnd":766.3000001907349,"connectStart":766.3000001907349,"domainLookupEnd":766.3000001907349,"domainLookupStart":766.3000001907349,"fetchStart":766.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":766.3000001907349,"responseEnd":2207.2000002861023,"responseStart":2207.2000002861023,"secureConnectionStart":766.3000001907349},{"duration":1536.2000002861023,"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":766.5,"connectEnd":766.5,"connectStart":766.5,"domainLookupEnd":766.5,"domainLookupStart":766.5,"fetchStart":766.5,"redirectEnd":0,"redirectStart":0,"requestStart":766.5,"responseEnd":2302.7000002861023,"responseStart":2302.7000002861023,"secureConnectionStart":766.5},{"duration":707.3999996185303,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1500.2000002861023,"connectEnd":1500.2000002861023,"connectStart":1500.2000002861023,"domainLookupEnd":1500.2000002861023,"domainLookupStart":1500.2000002861023,"fetchStart":1500.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1500.2000002861023,"responseEnd":2207.5999999046326,"responseStart":2207.5999999046326,"secureConnectionStart":1500.2000002861023}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":565,"responseStart":755,"responseEnd":757,"domLoading":760,"domInteractive":2326,"domContentLoadedEventStart":2326,"domContentLoadedEventEnd":2377,"domComplete":3857,"loadEventStart":3857,"loadEventEnd":3860,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2308.9000000953674},{"name":"bigPipe.sidebar-id.end","time":2309.800000190735},{"name":"bigPipe.activity-panel-pipe-id.start","time":2310.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":2312.5},{"name":"activityTabFullyLoaded","time":2386}],"measures":[],"correlationId":"25a663bd1fdd39","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}