Here's the mysql session log:
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 5
|
Server version: 10.0.8-MariaDB-log Source distribution
|
|
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [(none)]> create database test;
|
Query OK, 1 row affected (0.00 sec)
|
|
MariaDB [(none)]> use test;
|
Database changed
|
MariaDB [test]> CREATE TABLE t (id bigint(20), name varchar(30),
|
parent bigint(20), primary key (id)) ENGINE=InnoDB;
|
Query OK, 0 rows affected (0.27 sec)
|
|
MariaDB [test]> INSERT INTO t values (1, 'a', NULL), (4, 'b', 1), (5,
|
'c', 4), (10, 'd', 1);
|
Query OK, 4 rows affected (0.04 sec)
|
Records: 4 Duplicates: 0 Warnings: 0
|
MariaDB [test]> SELECT t1.id, t1.name, t2.id, t2.name FROM t t1 LEFT
|
OUTER JOIN t t2 ON (t1.parent = t2.id and t2.name <> 'a') GROUP BY
|
t1.id;
|
+----+------+------+------+
|
| id | name | id | name |
|
+----+------+------+------+
|
| 1 | a | NULL | NULL |
|
| 4 | b | NULL | NULL |
|
| 5 | c | NULL | NULL |
|
| 10 | d | NULL | NULL |
|
+----+------+------+------+
|
4 rows in set (0.00 sec)
|
MariaDB [test]> SELECT t1.id, t1.name, t2.id, t2.name FROM t t1 LEFT
|
OUTER JOIN t t2 ON (t1.parent = t2.id and t2.name <> 'a');
|
+----+------+------+------+
|
| id | name | id | name |
|
+----+------+------+------+
|
| 1 | a | NULL | NULL |
|
| 4 | b | NULL | NULL |
|
| 5 | c | 4 | b |
|
| 10 | d | NULL | NULL |
|
+----+------+------+------+
|
4 rows in set (0.00 sec)
|
MariaDB [test]> SELECT t1.id, t1.name, t2.id, t2.name FROM t t1 LEFT
|
OUTER JOIN t t2 ON (t1.parent = t2.id and t2.name <> 'a') GROUP BY
|
t1.id, t1.name;
|
+----+------+------+------+
|
| id | name | id | name |
|
+----+------+------+------+
|
| 1 | a | NULL | NULL |
|
| 4 | b | NULL | NULL |
|
| 5 | c | 4 | b |
|
| 10 | d | NULL | NULL |
|
+----+------+------+------+
|
4 rows in set (0.00 sec)
|
MariaDB [test]> SELECT t1.id, t1.name, t2.id, t2.name FROM t t1 LEFT
|
OUTER JOIN t t2 ON (t1.parent = t2.id) GROUP BY t1.id;
|
+----+------+------+------+
|
| id | name | id | name |
|
+----+------+------+------+
|
| 1 | a | NULL | NULL |
|
| 4 | b | 1 | a |
|
| 5 | c | 4 | b |
|
| 10 | d | 1 | a |
|
+----+------+------+------+
|
4 rows in set (0.00 sec)
|
As you see the first query returns NULLs instead of real values which
can be seen in second query without GROUP BY. And if I add another
column to GROUP BY or remove one condition from JOIN I can see real
values again. I've also tested with the table without PRIMARY KEY and
it also returned real values in the first query.
{"report":{"fcp":1893.6000003814697,"ttfb":669.4000005722046,"pageVisibility":"visible","entityId":31100,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a87bee9a-1284-4a91-8a41-558c50aab2a4","navigationType":0,"readyForUser":1993.8000001907349,"redirectCount":0,"resourceLoadedEnd":2561.699999809265,"resourceLoadedStart":674.3000001907349,"resourceTiming":[{"duration":709.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":674.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":674.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1383.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":709.6999998092651,"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":674.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":674.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1384.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":770.2000007629395,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":674.6999998092651,"connectEnd":674.6999998092651,"connectStart":674.6999998092651,"domainLookupEnd":674.6999998092651,"domainLookupStart":674.6999998092651,"fetchStart":674.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":674.6999998092651,"responseEnd":1444.9000005722046,"responseStart":1444.9000005722046,"secureConnectionStart":674.6999998092651},{"duration":804.7999992370605,"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":674.9000005722046,"connectEnd":674.9000005722046,"connectStart":674.9000005722046,"domainLookupEnd":674.9000005722046,"domainLookupStart":674.9000005722046,"fetchStart":674.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":674.9000005722046,"responseEnd":1479.6999998092651,"responseStart":1479.6999998092651,"secureConnectionStart":674.9000005722046},{"duration":808.4000005722046,"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":675,"connectEnd":675,"connectStart":675,"domainLookupEnd":675,"domainLookupStart":675,"fetchStart":675,"redirectEnd":0,"redirectStart":0,"requestStart":675,"responseEnd":1483.4000005722046,"responseStart":1483.4000005722046,"secureConnectionStart":675},{"duration":808.5,"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":675.3000001907349,"connectEnd":675.3000001907349,"connectStart":675.3000001907349,"domainLookupEnd":675.3000001907349,"domainLookupStart":675.3000001907349,"fetchStart":675.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":675.3000001907349,"responseEnd":1483.8000001907349,"responseStart":1483.8000001907349,"secureConnectionStart":675.3000001907349},{"duration":808.6000003814697,"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":675.5,"connectEnd":675.5,"connectStart":675.5,"domainLookupEnd":675.5,"domainLookupStart":675.5,"fetchStart":675.5,"redirectEnd":0,"redirectStart":0,"requestStart":675.5,"responseEnd":1484.1000003814697,"responseStart":1484.1000003814697,"secureConnectionStart":675.5},{"duration":912.1000003814697,"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":675.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":675.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1587.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":808.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":675.8000001907349,"connectEnd":675.8000001907349,"connectStart":675.8000001907349,"domainLookupEnd":675.8000001907349,"domainLookupStart":675.8000001907349,"fetchStart":675.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":675.8000001907349,"responseEnd":1484.6999998092651,"responseStart":1484.6999998092651,"secureConnectionStart":675.8000001907349},{"duration":912,"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":676,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":676,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1588,"responseStart":0,"secureConnectionStart":0},{"duration":809.0999994277954,"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":676.1000003814697,"connectEnd":676.1000003814697,"connectStart":676.1000003814697,"domainLookupEnd":676.1000003814697,"domainLookupStart":676.1000003814697,"fetchStart":676.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":676.1000003814697,"responseEnd":1485.1999998092651,"responseStart":1485.1999998092651,"secureConnectionStart":676.1000003814697},{"duration":1765.6000003814697,"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":682,"connectEnd":682,"connectStart":682,"domainLookupEnd":682,"domainLookupStart":682,"fetchStart":682,"redirectEnd":0,"redirectStart":0,"requestStart":682,"responseEnd":2447.6000003814697,"responseStart":2447.6000003814697,"secureConnectionStart":682},{"duration":1879.5,"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":682.1999998092651,"connectEnd":682.1999998092651,"connectStart":682.1999998092651,"domainLookupEnd":682.1999998092651,"domainLookupStart":682.1999998092651,"fetchStart":682.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":682.1999998092651,"responseEnd":2561.699999809265,"responseStart":2561.699999809265,"secureConnectionStart":682.1999998092651},{"duration":850.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1599.3000001907349,"connectEnd":1599.3000001907349,"connectStart":1599.3000001907349,"domainLookupEnd":1599.3000001907349,"domainLookupStart":1599.3000001907349,"fetchStart":1599.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1599.3000001907349,"responseEnd":2449.800000190735,"responseStart":2449.800000190735,"secureConnectionStart":1599.3000001907349},{"duration":691.1000003814697,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1887.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1887.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2578.800000190735,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":192,"responseStart":669,"responseEnd":679,"domLoading":673,"domInteractive":2585,"domContentLoadedEventStart":2585,"domContentLoadedEventEnd":2630,"domComplete":3645,"loadEventStart":3645,"loadEventEnd":3647,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2566.699999809265},{"name":"bigPipe.sidebar-id.end","time":2567.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":2567.699999809265},{"name":"bigPipe.activity-panel-pipe-id.end","time":2570.1000003814697},{"name":"activityTabFullyLoaded","time":2637.699999809265}],"measures":[],"correlationId":"d192ecb52c3efa","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":15,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}