Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.10, 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
10.1.15, 10.1.21
Description
Output:
===
mysql> create table t1(c1 int, c2 int, primary key(c2)); |
Query OK, 0 rows affected (0.01 sec) |
|
mysql> insert into t1 values(2,1),(1,2); |
(select c1 frQuery OK, 2 rows affected (0.00 sec) |
Records: 2 Duplicates: 0 Warnings: 0 |
|
mysql> select (select c1 from t1 group by c1,c2 order by c1 limit 1) as x; |
+------+
|
| x |
|
+------+
|
| 2 | |
+------+
|
1 row in set (0.00 sec) |
|
mysql> (select c1 from t1 group by c1,c2 order by c1 limit 1); |
+------+
|
| c1 |
|
+------+
|
| 1 | |
+------+
|
1 row in set (0.00 sec) |
|
mysql> select version();
|
+---------------------+
|
| version() |
|
+---------------------+
|
| 10.1.10-MariaDB-log | |
+---------------------+
|
1 row in set (0.00 sec) |
|
Recreate:
===
|
drop table t1;
|
create table t1(c1 int, c2 int, primary key(c2)); |
insert into t1 values(2,1),(1,2); |
select (select c1 from t1 group by c1,c2 order by c1 limit 1) as x; |
(select c1 from t1 group by c1,c2 order by c1 limit 1); |
Problem:
===
1 is expected for both queries.