mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34679 ER_BAD_FIELD uses non-localizable substrings
This commit is contained in:
@@ -200,7 +200,7 @@ select count(*) from t1 group by col2 having col2 = 'hello';
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t1 group by col2 having col1 = 10;
|
||||
ERROR 42S22: Unknown column 'col1' in 'having clause'
|
||||
ERROR 42S22: Unknown column 'col1' in 'HAVING'
|
||||
select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10;
|
||||
count_col1
|
||||
10
|
||||
@@ -241,7 +241,7 @@ select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10
|
||||
co2 cc
|
||||
40 4
|
||||
select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10;
|
||||
ERROR 42S22: Unknown column 't1.col1' in 'having clause'
|
||||
ERROR 42S22: Unknown column 't1.col1' in 'HAVING'
|
||||
select t1.col1 from t1
|
||||
where t1.col2 in
|
||||
(select t2.col2 from t2
|
||||
@@ -279,7 +279,7 @@ select t1.col1 as tmp_col from t1
|
||||
where t1.col2 in
|
||||
(select t2.col2 from t2
|
||||
group by t2.col1, t2.col2 having tmp_col <= 10);
|
||||
ERROR 42S22: Unknown column 'tmp_col' in 'having clause'
|
||||
ERROR 42S22: Unknown column 'tmp_col' in 'HAVING'
|
||||
select t1.col1 from t1
|
||||
where t1.col2 in
|
||||
(select t2.col2 from t2
|
||||
@@ -301,7 +301,7 @@ where t1.col2 in
|
||||
(select t2.col2 from t2
|
||||
group by t2.col1, t2.col2 having col_t1 <= 10)
|
||||
having col_t1 <= 20;
|
||||
ERROR 42S22: Unknown column 'col_t1' in 'having clause'
|
||||
ERROR 42S22: Unknown column 'col_t1' in 'HAVING'
|
||||
select t1.col1 from t1
|
||||
where t1.col2 in
|
||||
(select t2.col2 from t2
|
||||
@@ -322,7 +322,7 @@ select sum(col1) from t1
|
||||
group by col_t1
|
||||
having col_t1 in (select sum(t2.col1) from t2
|
||||
group by t2.col2, t2.col1 having t2.col1 = t1.col1);
|
||||
ERROR 42S22: Unknown column 't1.col1' in 'having clause'
|
||||
ERROR 42S22: Unknown column 't1.col1' in 'HAVING'
|
||||
select sum(col1) from t1
|
||||
group by col_t1
|
||||
having col_t1 in (select sum(t2.col1) from t2
|
||||
@@ -333,10 +333,10 @@ sum(col1)
|
||||
30
|
||||
select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1
|
||||
group by t1.col1, t2.col1 having col1 = 2;
|
||||
ERROR 23000: Column 'col1' in having clause is ambiguous
|
||||
ERROR 23000: Column 'col1' in HAVING is ambiguous
|
||||
select t1.col1*10+t2.col1 from t1,t2 where t1.col1=t2.col1
|
||||
group by t1.col1, t2.col1 having col1 = 2;
|
||||
ERROR 23000: Column 'col1' in having clause is ambiguous
|
||||
ERROR 23000: Column 'col1' in HAVING is ambiguous
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (s1 int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
@@ -348,8 +348,8 @@ s1
|
||||
0
|
||||
0
|
||||
Warnings:
|
||||
Warning 1052 Column 's1' in group statement is ambiguous
|
||||
Warning 1052 Column 's1' in having clause is ambiguous
|
||||
Warning 1052 Column 's1' in GROUP BY is ambiguous
|
||||
Warning 1052 Column 's1' in HAVING is ambiguous
|
||||
select s1*0 from t1 group by s1 having s1 = 0;
|
||||
s1*0
|
||||
select s1 from t1 group by 1 having 1 = 0;
|
||||
@@ -362,7 +362,7 @@ count(s1)
|
||||
1
|
||||
1
|
||||
select * from t1 a, t1 b group by a.s1 having s1 is null;
|
||||
ERROR 23000: Column 's1' in having clause is ambiguous
|
||||
ERROR 23000: Column 's1' in HAVING is ambiguous
|
||||
drop table t1;
|
||||
create table t1 (s1 char character set latin1 collate latin1_german1_ci);
|
||||
insert ignore into t1 values ('ü'),('y');
|
||||
|
Reference in New Issue
Block a user