DROP TABLE IF EXISTS t1;
|
DROP VIEW IF EXISTS v1;
|
CREATE TABLE t1 (a int(10) NOT NULL, b int(20) NOT NULL);
|
INSERT INTO t1 VALUES (1,1),(2,2);
|
CREATE VIEW v1 AS SELECT a,b FROM t1;
|
DESC v1;
|
returns
+-------+---------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+---------+------+-----+---------+-------+
|
| a | int(10) | NO | | NULL | |
|
| b | int(20) | NO | | NULL | |
|
+-------+---------+------+-----+---------+-------+
|
int(10) and int(20) looks OK as the data type.
Now if I add GROUP BY into the VIEW definition:
DROP VIEW IF EXISTS v1;
|
CREATE VIEW v1 AS
|
SELECT a, b FROM t1 GROUP BY a,b;
|
DESC v1;
|
it still returns the same data types:
+-------+---------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+---------+------+-----+---------+-------+
|
| a | int(10) | NO | | NULL | |
|
| b | int(20) | NO | | NULL | |
|
+-------+---------+------+-----+---------+-------+
|
Looks OK so far.
Now if I add ROLLUP into the VIEW definition as follows:
DROP VIEW IF EXISTS v1;
|
CREATE VIEW v1 AS
|
SELECT a, b FROM t1 GROUP BY a,b WITH ROLLUP;
|
DESC v1;
|
it returns different data types:
+-------+------------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+------------+------+-----+---------+-------+
|
| a | bigint(11) | YES | | NULL | |
|
| b | bigint(20) | YES | | NULL | |
|
+-------+------------+------+-----+---------+-------+
|
bigint looks too large. int should be enough, as in the GROUP BY query with no ROLLUP.
{"report":{"fcp":900.6999998092651,"ttfb":348.3999996185303,"pageVisibility":"visible","entityId":55234,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9ac9d4d6-d940-4326-a1ae-63f3788dcdb9","navigationType":0,"readyForUser":1021,"redirectCount":0,"resourceLoadedEnd":1052.1999998092651,"resourceLoadedStart":354.3999996185303,"resourceTiming":[{"duration":33.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":354.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":387.5999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":33.39999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":354.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":388.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":93.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":354.8999996185303,"connectEnd":354.8999996185303,"connectStart":354.8999996185303,"domainLookupEnd":354.8999996185303,"domainLookupStart":354.8999996185303,"fetchStart":354.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":354.8999996185303,"responseEnd":448.69999980926514,"responseStart":448.69999980926514,"secureConnectionStart":354.8999996185303},{"duration":142.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":355,"connectEnd":355,"connectStart":355,"domainLookupEnd":355,"domainLookupStart":355,"fetchStart":355,"redirectEnd":0,"redirectStart":0,"requestStart":355,"responseEnd":497.3999996185303,"responseStart":497.3999996185303,"secureConnectionStart":355},{"duration":145.80000019073486,"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":355.19999980926514,"connectEnd":355.19999980926514,"connectStart":355.19999980926514,"domainLookupEnd":355.19999980926514,"domainLookupStart":355.19999980926514,"fetchStart":355.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":355.19999980926514,"responseEnd":501,"responseStart":501,"secureConnectionStart":355.19999980926514},{"duration":145.89999961853027,"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":355.5,"connectEnd":355.5,"connectStart":355.5,"domainLookupEnd":355.5,"domainLookupStart":355.5,"fetchStart":355.5,"redirectEnd":0,"redirectStart":0,"requestStart":355.5,"responseEnd":501.3999996185303,"responseStart":501.3999996185303,"secureConnectionStart":355.5},{"duration":146.30000019073486,"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":355.69999980926514,"connectEnd":355.69999980926514,"connectStart":355.69999980926514,"domainLookupEnd":355.69999980926514,"domainLookupStart":355.69999980926514,"fetchStart":355.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":355.69999980926514,"responseEnd":502,"responseStart":502,"secureConnectionStart":355.69999980926514},{"duration":234.30000019073486,"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":355.79999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":355.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":590.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":146.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":356,"connectEnd":356,"connectStart":356,"domainLookupEnd":356,"domainLookupStart":356,"fetchStart":356,"redirectEnd":0,"redirectStart":0,"requestStart":356,"responseEnd":502.5,"responseStart":502.5,"secureConnectionStart":356},{"duration":234.19999980926514,"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":356.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":356.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":590.2999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":146.80000019073486,"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":356.29999923706055,"connectEnd":356.29999923706055,"connectStart":356.29999923706055,"domainLookupEnd":356.29999923706055,"domainLookupStart":356.29999923706055,"fetchStart":356.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":356.29999923706055,"responseEnd":503.0999994277954,"responseStart":503.0999994277954,"secureConnectionStart":356.29999923706055},{"duration":504.8999996185303,"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":361.69999980926514,"connectEnd":361.69999980926514,"connectStart":361.69999980926514,"domainLookupEnd":361.69999980926514,"domainLookupStart":361.69999980926514,"fetchStart":361.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":361.69999980926514,"responseEnd":866.5999994277954,"responseStart":866.5999994277954,"secureConnectionStart":361.69999980926514},{"duration":560.6999998092651,"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":361.8999996185303,"connectEnd":361.8999996185303,"connectStart":361.8999996185303,"domainLookupEnd":361.8999996185303,"domainLookupStart":361.8999996185303,"fetchStart":361.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":361.8999996185303,"responseEnd":922.5999994277954,"responseStart":922.5999994277954,"secureConnectionStart":361.8999996185303},{"duration":250,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":617,"connectEnd":617,"connectStart":617,"domainLookupEnd":617,"domainLookupStart":617,"fetchStart":617,"redirectEnd":0,"redirectStart":0,"requestStart":617,"responseEnd":867,"responseStart":867,"secureConnectionStart":617},{"duration":165.39999961853027,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":894.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":894.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1059.5999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":135.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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":916.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":916.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1052.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":70.59999942779541,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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":917.5,"connectEnd":917.5,"connectStart":917.5,"domainLookupEnd":917.5,"domainLookupStart":917.5,"fetchStart":917.5,"redirectEnd":0,"redirectStart":0,"requestStart":917.5,"responseEnd":988.0999994277954,"responseStart":988.0999994277954,"secureConnectionStart":917.5},{"duration":76.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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":918,"connectEnd":918,"connectStart":918,"domainLookupEnd":918,"domainLookupStart":918,"fetchStart":918,"redirectEnd":0,"redirectStart":0,"requestStart":918,"responseEnd":994.2999992370605,"responseStart":994.2999992370605,"secureConnectionStart":918}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":188,"responseStart":348,"responseEnd":357,"domLoading":352,"domInteractive":1095,"domContentLoadedEventStart":1095,"domContentLoadedEventEnd":1143,"domComplete":1280,"loadEventStart":1280,"loadEventEnd":1280,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1068.3999996185303},{"name":"bigPipe.sidebar-id.end","time":1069.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1069.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1070.1999998092651},{"name":"activityTabFullyLoaded","time":1158.5999994277954}],"measures":[],"correlationId":"329d788ddf8862","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The fix for
MDEV-12886fixed this problem as well. Adding tests only.Pushed into bb-10.2-ext