Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
None
Component/s:
None
The following test case gives us a wrong result in MariaDB 5.2/5.5
CREATE TABLE t1 (
pk int NOT NULL,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
CREATE TABLE t2 (
pk int NOT NULL AUTO_INCREMENT,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,4,4,'00:00:00','b','b');
SET @var2:=4, @var3:=8;
MariaDB [test]> SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3;
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| @var3:=12 | pk | col_int_nokey | col_int_key | col_time_key | col_varchar_key | col_varchar_nokey |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| 12 | 0 | 0 | 0 | 00:00:00 | | |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
No rows are expected in the result here.
(see also bug #13651000 from mysql-trunk)
Sergei Golubchik
made changes -
2012-10-04 14:59
Fix Version/s
5.5.29
[ 11701
]
Fix Version/s
5.3.10
[ 11500
]
Fix Version/s
5.2.13
[ 10800
]
Sergei Golubchik
made changes -
2012-10-06 15:26
Labels
Launchpad MariaDB_5.2
Launchpad
Oleksandr Byelkin
made changes -
2012-10-14 12:00
Status
Open
[ 1
]
In Progress
[ 3
]
Oleksandr Byelkin
made changes -
2012-10-14 12:50
Description
The following test case gives us a wrong result in MariaDB 5.2/5.5
CREATE TABLE t1 (
pk int NOT NULL,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
CREATE TABLE t2 (
pk int NOT NULL AUTO_INCREMENT,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,4,4,'00:00:00','b','b');
SET @var2:=4, @var3:=8;
MariaDB [test]> SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3;
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| @var3:=12 | pk | col_int_nokey | col_int_key | col_time_key | col_varchar_key | col_varchar_nokey |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| 12 | 0 | 0 | 0 | 00:00:00 | | |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
No rows are expected in the result here.
(see also bug #13651000 from mysql-trunk)
The following test case gives us a wrong result in MariaDB 5.2/5.5
{noformat}
CREATE TABLE t1 (
pk int NOT NULL,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
CREATE TABLE t2 (
pk int NOT NULL AUTO_INCREMENT,
col_int_nokey int NOT NULL,
col_int_key int NOT NULL,
col_time_key time NOT NULL,
col_varchar_key varchar(1) NOT NULL,
col_varchar_nokey varchar(1) NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key),
KEY col_time_key (col_time_key),
KEY col_varchar_key (col_varchar_key,col_int_key)
) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,4,4,'00:00:00','b','b');
SET @var2:=4, @var3:=8;
{noformat}
{noformat}
MariaDB [test]> SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3;
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| @var3:=12 | pk | col_int_nokey | col_int_key | col_time_key | col_varchar_key | col_varchar_nokey |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
| 12 | 0 | 0 | 0 | 00:00:00 | | |
+-----------+----+---------------+-------------+--------------+-----------------+-------------------+
{noformat}
No rows are expected in the result here.
(see also bug #13651000 from mysql-trunk)
Oleksandr Byelkin
made changes -
2012-10-14 13:47
Status
In Progress
[ 3
]
Open
[ 1
]
Oleksandr Byelkin
made changes -
2012-10-14 19:00
Status
Open
[ 1
]
In Progress
[ 3
]
Oleksandr Byelkin
made changes -
2012-10-14 19:30
Status
In Progress
[ 3
]
Open
[ 1
]
Oleksandr Byelkin
made changes -
2012-10-15 13:49
Resolution
Fixed
[ 1
]
Status
Open
[ 1
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2014-06-13 15:06
Workflow
defaullt
[ 21590
]
MariaDB v2
[ 45755
]
Sergei Golubchik
made changes -
2021-12-06 21:37
Workflow
MariaDB v3
[ 62955
]
MariaDB v4
[ 145037
]
{"report":{"fcp":844.9000000953674,"ttfb":229.40000009536743,"pageVisibility":"visible","entityId":20119,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7f08c1ed-55c2-47f7-93be-90064ce99173","navigationType":0,"readyForUser":927.5,"redirectCount":0,"resourceLoadedEnd":970.1000003814697,"resourceLoadedStart":237.10000038146973,"resourceTiming":[{"duration":7.899999618530273,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":237.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":245,"responseStart":0,"secureConnectionStart":0},{"duration":9.599999904632568,"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":237.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":246.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":65.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":237.60000038146973,"connectEnd":237.60000038146973,"connectStart":237.60000038146973,"domainLookupEnd":237.60000038146973,"domainLookupStart":237.60000038146973,"fetchStart":237.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":237.60000038146973,"responseEnd":303.40000009536743,"responseStart":303.40000009536743,"secureConnectionStart":237.60000038146973},{"duration":126.19999980926514,"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":237.80000019073486,"connectEnd":237.80000019073486,"connectStart":237.80000019073486,"domainLookupEnd":237.80000019073486,"domainLookupStart":237.80000019073486,"fetchStart":237.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":237.80000019073486,"responseEnd":364,"responseStart":364,"secureConnectionStart":237.80000019073486},{"duration":131.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":238.10000038146973,"connectEnd":238.10000038146973,"connectStart":238.10000038146973,"domainLookupEnd":238.10000038146973,"domainLookupStart":238.10000038146973,"fetchStart":238.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":238.10000038146973,"responseEnd":369.6000003814697,"responseStart":369.6000003814697,"secureConnectionStart":238.10000038146973},{"duration":133.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":238.2000002861023,"connectEnd":238.2000002861023,"connectStart":238.2000002861023,"domainLookupEnd":238.2000002861023,"domainLookupStart":238.2000002861023,"fetchStart":238.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":238.2000002861023,"responseEnd":371.30000019073486,"responseStart":371.30000019073486,"secureConnectionStart":238.2000002861023},{"duration":134.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":238.40000009536743,"connectEnd":238.40000009536743,"connectStart":238.40000009536743,"domainLookupEnd":238.40000009536743,"domainLookupStart":238.40000009536743,"fetchStart":238.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":238.40000009536743,"responseEnd":372.80000019073486,"responseStart":372.80000019073486,"secureConnectionStart":238.40000009536743},{"duration":224,"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":238.60000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":462.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":134.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":238.7000002861023,"connectEnd":238.7000002861023,"connectStart":238.7000002861023,"domainLookupEnd":238.7000002861023,"domainLookupStart":238.7000002861023,"fetchStart":238.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":238.7000002861023,"responseEnd":373.30000019073486,"responseStart":373.30000019073486,"secureConnectionStart":238.7000002861023},{"duration":224.30000019073486,"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":239,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":463.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":134.7999997138977,"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":239.10000038146973,"connectEnd":239.10000038146973,"connectStart":239.10000038146973,"domainLookupEnd":239.10000038146973,"domainLookupStart":239.10000038146973,"fetchStart":239.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":239.10000038146973,"responseEnd":373.90000009536743,"responseStart":373.90000009536743,"secureConnectionStart":239.10000038146973},{"duration":308.09999990463257,"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":239.90000009536743,"connectEnd":239.90000009536743,"connectStart":239.90000009536743,"domainLookupEnd":239.90000009536743,"domainLookupStart":239.90000009536743,"fetchStart":239.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":239.90000009536743,"responseEnd":548,"responseStart":548,"secureConnectionStart":239.90000009536743},{"duration":645.6000003814697,"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":240,"connectEnd":240,"connectStart":240,"domainLookupEnd":240,"domainLookupStart":240,"fetchStart":240,"redirectEnd":0,"redirectStart":0,"requestStart":240,"responseEnd":885.6000003814697,"responseStart":885.6000003814697,"secureConnectionStart":240},{"duration":50.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":512.3000001907349,"connectEnd":512.3000001907349,"connectStart":512.3000001907349,"domainLookupEnd":512.3000001907349,"domainLookupStart":512.3000001907349,"fetchStart":512.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":512.3000001907349,"responseEnd":562.7000002861023,"responseStart":562.7000002861023,"secureConnectionStart":512.3000001907349},{"duration":224.5,"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&whisper-enabled=true","startTime":745.6000003814697,"connectEnd":745.6000003814697,"connectStart":745.6000003814697,"domainLookupEnd":745.6000003814697,"domainLookupStart":745.6000003814697,"fetchStart":745.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":745.6000003814697,"responseEnd":970.1000003814697,"responseStart":970.1000003814697,"secureConnectionStart":745.6000003814697},{"duration":222.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":837.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":837.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1059.9000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":6,"responseStart":229,"responseEnd":233,"domLoading":234,"domInteractive":993,"domContentLoadedEventStart":993,"domContentLoadedEventEnd":1051,"domComplete":1433,"loadEventStart":1433,"loadEventEnd":1434,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":969.6000003814697},{"name":"bigPipe.sidebar-id.end","time":970.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":970.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":975.2000002861023},{"name":"activityTabFullyLoaded","time":1089.7000002861023}],"measures":[],"correlationId":"c4df6251a0661b","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":160,"dbReadsTimeInMs":25,"dbConnsTimeInMs":36,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Launchpad bug id: 1002546