Please confirm if bug report does NOT exists already ?
[X] I confirm there is no existing issue for this
Describe the problem
#Result set error
mysql> select * from t1 order by c1,(select c1 from t2 limit 2);
+----+------+------+
| c1 | c2 | c3 |
+----+------+------+
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 3 | 3 | 3 |
+----+------+------+
3 rows in set (0.00 sec)
Expected behavior
mysql> select * from t1 order by c1,(select c1 from t2 limit 2);
ERROR 1242 (21000): Subquery returns more than 1 row
How To Reproduce
CREATE TABLE t1 (
c1 int primary key,
c2 int, c3 int
)engine=tianmu;
INSERT INTO t1 VALUES (1,1,1);
INSERT INTO t1 VALUES (2,2,2);
INSERT INTO t1 VALUES (3,3,3);
create table t2 (
c1 int primary key,
c2 int, c3 int
)engine=tianmu;
INSERT INTO t2 VALUES (1,1,1);
INSERT INTO t2 VALUES (2,2,2);
INSERT INTO t2 VALUES (3,3,3);
----error 1242
select * from t1 order by c1,(select c1 from t2);
----error 1242
select * from t1 order by c1,(select c1 from t2 limit 2);
----error 1242
select * from t1 order by c1,(select c1 from t5 order by c1,(select c1 from t3));
Environment
5.7.36-StoneDB-v1.0.2
Are you interested in submitting a PR to solve the problem?
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
Expected behavior
How To Reproduce
Environment
5.7.36-StoneDB-v1.0.2
Are you interested in submitting a PR to solve the problem?