/test/10.9_opt_san/sql/sql_analyse.cc:590:19: runtime error: signed integer overflow: 10000000000000 * 10000000000000 cannot be represented in type 'long long int'
/test/10.9_opt_san/sql/sql_analyse.h:270:37: runtime error: signed integer overflow: 10000000000000 * 10000000000000 cannot be represented in type 'long long int'
CREATETABLE t (c INT) ENGINE=InnoDB UNION=(t,t2) INSERT_METHOD=LAST;
CREATETABLE t3 LIKE t;
INSERTINTO t VALUES (1),(2),(-685113344),(0);
INSERTINTO t3 SELECT * FROM t;
INSERTINTO t SELECT * FROM t;
INSERTINTO t SELECT * FROM t;
INSERTINTO t3 SELECT * FROM t;
SELECT * FROM t3 PROCEDURE ANALYSE();
Roel Van de Paar
added a comment - Please also test any bugfix with this testcase:
CREATE TABLE t (c INT ) ENGINE=InnoDB UNION =(t,t2) INSERT_METHOD= LAST ;
CREATE TABLE t3 LIKE t;
INSERT INTO t VALUES (1),(2),(-685113344),(0);
INSERT INTO t3 SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t3 SELECT * FROM t;
SELECT * FROM t3 PROCEDURE ANALYSE();
UBSAN|signed integer overflow: X + Y cannot be represented in type 'long long int'|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|JOIN_CACHE::generate_full_extensions
Roel Van de Paar
added a comment - This testcase:
SET sql_mode= '' ;
CREATE TABLE t (c INT ) ENGINE=InnoDB UNION =(t,t2) INSERT_METHOD= LAST ;
INSERT INTO t VALUES (1);
INSERT INTO t VALUES (0xA9BD);
INSERT INTO t (c) VALUES (ADDTIME(NOW(),1));
CREATE TABLE c AS SELECT 1 A;
SELECT * FROM t a,c,t b PROCEDURE ANALYSE();
Produces a new UniqueID on 11.6:
11.6.0 29e9ade269d803b6823ec57808e0b7fad28baf9e (Optimized, UBASAN)
UBSAN|signed integer overflow: X + Y cannot be represented in type 'long long int'|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|JOIN_CACHE::generate_full_extensions
/test/11.0_dbg_san/sql/sql_analyse.cc:642:19: runtime error: signed integer overflow: 1000000000000000 * 1000000000000000 cannot be represented in type 'long long int'
UBSAN|signed integer overflow: -X * -Y cannot be represented in type 'long long int'|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|do_select
Roel Van de Paar
added a comment - Additional stack with
CREATE SEQUENCE t CACHE=1 MAXVALUE=0 INCREMENT=-1;
SELECT * FROM t PROCEDURE ANALYSE();
UBSAN|signed integer overflow: -X * -Y cannot be represented in type 'long long int'|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|do_select
UBSAN|signed integer overflow: X + Y cannot be represented in type 'longlong' (aka 'long long')|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|evaluate_join_record
Roel Van de Paar
added a comment - Additional stack with
SET sql_mode= '' ;
CREATE TABLE t (a INT ) ENGINE=FEDERATED;
INSERT INTO t VALUES ( '-9223372036854775808' );
INSERT INTO t SELECT * FROM t;
SELECT * FROM t PROCEDURE ANALYSE(2);
UBSAN|signed integer overflow: X + Y cannot be represented in type 'longlong' (aka 'long long')|sql/sql_analyse.cc|field_longlong::add|analyse::send_row|end_send|evaluate_join_record
People
Alexander Barkov
Roel Van de Paar
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":851.6999999992549,"ttfb":275.1000000014901,"pageVisibility":"visible","entityId":110146,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"00dcc489-8269-488d-8fcc-699b23949fa6","navigationType":0,"readyForUser":927.8999999985099,"redirectCount":0,"resourceLoadedEnd":389.5,"resourceLoadedStart":287.19999999925494,"resourceTiming":[{"duration":23.699999999254942,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":287.19999999925494,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":287.19999999925494,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":310.8999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":24.899999998509884,"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":287.6000000014901,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":287.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":312.5,"responseStart":0,"secureConnectionStart":0},{"duration":88.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":287.69999999925494,"connectEnd":287.69999999925494,"connectStart":287.69999999925494,"domainLookupEnd":287.69999999925494,"domainLookupStart":287.69999999925494,"fetchStart":287.69999999925494,"redirectEnd":0,"redirectStart":0,"requestStart":320.80000000074506,"responseEnd":376.30000000074506,"responseStart":331.8999999985099,"secureConnectionStart":287.69999999925494},{"duration":101,"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":288.5,"connectEnd":288.5,"connectStart":288.5,"domainLookupEnd":288.5,"domainLookupStart":288.5,"fetchStart":288.5,"redirectEnd":0,"redirectStart":0,"requestStart":321.1000000014901,"responseEnd":389.5,"responseStart":338.19999999925494,"secureConnectionStart":288.5},{"duration":42.5,"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":288.69999999925494,"connectEnd":288.69999999925494,"connectStart":288.69999999925494,"domainLookupEnd":288.69999999925494,"domainLookupStart":288.69999999925494,"fetchStart":288.69999999925494,"redirectEnd":0,"redirectStart":0,"requestStart":320.6000000014901,"responseEnd":331.19999999925494,"responseStart":330.5,"secureConnectionStart":288.69999999925494},{"duration":66.39999999850988,"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":288.80000000074506,"connectEnd":288.80000000074506,"connectStart":288.80000000074506,"domainLookupEnd":288.80000000074506,"domainLookupStart":288.80000000074506,"fetchStart":288.80000000074506,"redirectEnd":0,"redirectStart":0,"requestStart":324.30000000074506,"responseEnd":355.19999999925494,"responseStart":354.6000000014901,"secureConnectionStart":288.80000000074506},{"duration":44.5,"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":289,"connectEnd":289,"connectStart":289,"domainLookupEnd":289,"domainLookupStart":289,"fetchStart":289,"redirectEnd":0,"redirectStart":0,"requestStart":322.19999999925494,"responseEnd":333.5,"responseStart":333,"secureConnectionStart":289},{"duration":33.099999997764826,"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":289.1000000014901,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.1000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.19999999925494,"responseStart":0,"secureConnectionStart":0},{"duration":53.69999999925494,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":289.30000000074506,"connectEnd":329.80000000074506,"connectStart":329.80000000074506,"domainLookupEnd":329.80000000074506,"domainLookupStart":329.80000000074506,"fetchStart":289.30000000074506,"redirectEnd":0,"redirectStart":0,"requestStart":331.69999999925494,"responseEnd":343,"responseStart":341.69999999925494,"secureConnectionStart":329.80000000074506},{"duration":35.30000000074506,"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":289.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":324.80000000074506,"responseStart":0,"secureConnectionStart":0},{"duration":55.899999998509884,"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":289.6000000014901,"connectEnd":289.6000000014901,"connectStart":289.6000000014901,"domainLookupEnd":289.6000000014901,"domainLookupStart":289.6000000014901,"fetchStart":289.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":332.5,"responseEnd":345.5,"responseStart":343.1000000014901,"secureConnectionStart":289.6000000014901},{"duration":51.400000002235174,"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":298.19999999925494,"connectEnd":298.19999999925494,"connectStart":298.19999999925494,"domainLookupEnd":298.19999999925494,"domainLookupStart":298.19999999925494,"fetchStart":298.19999999925494,"redirectEnd":0,"redirectStart":0,"requestStart":337.30000000074506,"responseEnd":349.6000000014901,"responseStart":348.6000000014901,"secureConnectionStart":298.19999999925494},{"duration":47.69999999925494,"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":309,"connectEnd":309,"connectStart":309,"domainLookupEnd":309,"domainLookupStart":309,"fetchStart":309,"redirectEnd":0,"redirectStart":0,"requestStart":344.80000000074506,"responseEnd":356.69999999925494,"responseStart":355.80000000074506,"secureConnectionStart":309},{"duration":214.69999999925494,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":590.6999999992549,"connectEnd":590.6999999992549,"connectStart":590.6999999992549,"domainLookupEnd":590.6999999992549,"domainLookupStart":590.6999999992549,"fetchStart":590.6999999992549,"redirectEnd":0,"redirectStart":0,"requestStart":766.6000000014901,"responseEnd":805.3999999985099,"responseStart":804.8000000007451,"secureConnectionStart":590.6999999992549},{"duration":233.69999999925494,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":827.6000000014901,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":827.6000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1061.300000000745,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":11,"domainLookupEnd":86,"connectStart":86,"connectEnd":111,"secureConnectionStart":94,"requestStart":111,"responseStart":275,"responseEnd":309,"domLoading":279,"domInteractive":1003,"domContentLoadedEventStart":1003,"domContentLoadedEventEnd":1052,"domComplete":1333,"loadEventStart":1333,"loadEventEnd":1334,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":968.5},{"name":"bigPipe.sidebar-id.end","time":969.1999999992549},{"name":"bigPipe.activity-panel-pipe-id.start","time":969.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":973.1999999992549},{"name":"activityTabFullyLoaded","time":1074.1000000014901}],"measures":[],"correlationId":"cccc5a4ef0ae19","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":15,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Please also test any bugfix with this testcase: