CREATE OR REPLACE TABLE t1 AS SELECT 1=1;
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT 1=1 UNION SELECT 1=1;
|
SHOW CREATE TABLE t1;
|
Notice:
- The first CREATE statement made a column of the int(1) type.
- The second CREATE statement with UNION made a column the bigint(11) type. Looks excessive. An int column would be enough.
More examples:
CREATE OR REPLACE TABLE t1 AS SELECT strcmp('a','b');
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT strcmp('a','b') UNION SELECT strcmp('c','d');
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT 1+1;
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT 1+1 UNION SELECT 1+1;
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT EXISTS (SELECT 1);
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT EXISTS (SELECT 1) UNION SELECT EXISTS (SELECT 1);
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT MONTH(NOW());
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT MONTH(NOW()) UNION SELECT MONTH(NOW());
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT WEEKDAY(NOW());
|
SHOW CREATE TABLE t1;
|
CREATE OR REPLACE TABLE t1 AS SELECT WEEKDAY(NOW()) UNION SELECT WEEKDAY(NOW());
|
SHOW CREATE TABLE t1;
|
- relates to
-
MDEV-12619
UNION creates excessive integer column types for integer literals
-
-
Closed
No workflow transitions have been executed yet.
{"report":{"fcp":1527.7000000476837,"ttfb":673.2999999523163,"pageVisibility":"visible","entityId":61093,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"63c2ae68-5ef5-41e7-8f5e-0e6e187ff059","navigationType":0,"readyForUser":1636.4000000953674,"redirectCount":0,"resourceLoadedEnd":1908.1000001430511,"resourceLoadedStart":679.6000001430511,"resourceTiming":[{"duration":226.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":679.6000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":679.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":906.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":227.59999990463257,"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":679.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":679.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":907.5,"responseStart":0,"secureConnectionStart":0},{"duration":304.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":680.2000000476837,"connectEnd":680.2000000476837,"connectStart":680.2000000476837,"domainLookupEnd":680.2000000476837,"domainLookupStart":680.2000000476837,"fetchStart":680.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":680.2000000476837,"responseEnd":984.6000001430511,"responseStart":984.6000001430511,"secureConnectionStart":680.2000000476837},{"duration":400.2000000476837,"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":680.2999999523163,"connectEnd":680.2999999523163,"connectStart":680.2999999523163,"domainLookupEnd":680.2999999523163,"domainLookupStart":680.2999999523163,"fetchStart":680.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":680.2999999523163,"responseEnd":1080.5,"responseStart":1080.5,"secureConnectionStart":680.2999999523163},{"duration":403.7000000476837,"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":680.5,"connectEnd":680.5,"connectStart":680.5,"domainLookupEnd":680.5,"domainLookupStart":680.5,"fetchStart":680.5,"redirectEnd":0,"redirectStart":0,"requestStart":680.5,"responseEnd":1084.2000000476837,"responseStart":1084.2000000476837,"secureConnectionStart":680.5},{"duration":403.90000009536743,"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":680.7000000476837,"connectEnd":680.7000000476837,"connectStart":680.7000000476837,"domainLookupEnd":680.7000000476837,"domainLookupStart":680.7000000476837,"fetchStart":680.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":680.7000000476837,"responseEnd":1084.6000001430511,"responseStart":1084.6000001430511,"secureConnectionStart":680.7000000476837},{"duration":404.09999990463257,"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":680.9000000953674,"connectEnd":680.9000000953674,"connectStart":680.9000000953674,"domainLookupEnd":680.9000000953674,"domainLookupStart":680.9000000953674,"fetchStart":680.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":680.9000000953674,"responseEnd":1085,"responseStart":1085,"secureConnectionStart":680.9000000953674},{"duration":461.7999999523163,"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":681.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":681.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1142.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":404.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":681.2999999523163,"connectEnd":681.2999999523163,"connectStart":681.2999999523163,"domainLookupEnd":681.2999999523163,"domainLookupStart":681.2999999523163,"fetchStart":681.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":681.2999999523163,"responseEnd":1085.5,"responseStart":1085.5,"secureConnectionStart":681.2999999523163},{"duration":461.7000000476837,"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":681.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":681.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1143.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":403.7000000476837,"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":682.4000000953674,"connectEnd":682.4000000953674,"connectStart":682.4000000953674,"domainLookupEnd":682.4000000953674,"domainLookupStart":682.4000000953674,"fetchStart":682.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":682.4000000953674,"responseEnd":1086.1000001430511,"responseStart":1086.1000001430511,"secureConnectionStart":682.4000000953674},{"duration":1022.3000001907349,"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":683.2999999523163,"connectEnd":683.2999999523163,"connectStart":683.2999999523163,"domainLookupEnd":683.2999999523163,"domainLookupStart":683.2999999523163,"fetchStart":683.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":683.2999999523163,"responseEnd":1705.6000001430511,"responseStart":1705.6000001430511,"secureConnectionStart":683.2999999523163},{"duration":1224.7000000476837,"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":683.4000000953674,"connectEnd":683.4000000953674,"connectStart":683.4000000953674,"domainLookupEnd":683.4000000953674,"domainLookupStart":683.4000000953674,"fetchStart":683.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":683.4000000953674,"responseEnd":1908.1000001430511,"responseStart":1908.1000001430511,"secureConnectionStart":683.4000000953674},{"duration":577.0999999046326,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1186.6000001430511,"connectEnd":1186.6000001430511,"connectStart":1186.6000001430511,"domainLookupEnd":1186.6000001430511,"domainLookupStart":1186.6000001430511,"fetchStart":1186.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1186.6000001430511,"responseEnd":1763.7000000476837,"responseStart":1763.7000000476837,"secureConnectionStart":1186.6000001430511},{"duration":402.09999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1519.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1519.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1922,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":482,"responseStart":673,"responseEnd":675,"domLoading":677,"domInteractive":1943,"domContentLoadedEventStart":1944,"domContentLoadedEventEnd":1990,"domComplete":2476,"loadEventStart":2476,"loadEventEnd":2476,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1912.5},{"name":"bigPipe.sidebar-id.end","time":1913.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1913.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1914},{"name":"activityTabFullyLoaded","time":1998.2000000476837}],"measures":[],"correlationId":"49334d355b412b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":123,"dbReadsTimeInMs":19,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}