1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fixed processing aggregate functions with static tables (BUG#1318)

mysql-test/r/func_group.result:
  test of BUG#1318
mysql-test/r/subselect.result:
  correct results
mysql-test/t/func_group.test:
  test of BUG#1318
sql/sql_select.cc:
  hixed processing of static tables
This commit is contained in:
unknown
2003-09-20 18:30:36 +03:00
parent cbc431dbdf
commit e603c1efde
4 changed files with 24 additions and 3 deletions

View File

@ -618,3 +618,12 @@ select coercibility(max(a)) from t1;
coercibility(max(a))
3
drop table t1;
create table t1 (a int);
insert into t1 values (1);
select max(a) as b from t1 having b=1;
b
1
select a from t1 having a=1;
a
1
drop table t1;

View File

@ -1338,6 +1338,7 @@ insert into t1 values (1);
insert into t2 values (1);
select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1);
s1
1
drop table t1,t2;
create table t1 (s1 int);
create table t2 (s1 int);

View File

@ -360,3 +360,12 @@ create table t1 (a char(10));
insert into t1 values ('a'),('b'),('c');
select coercibility(max(a)) from t1;
drop table t1;
#
# aggregate functions on static tables
#
create table t1 (a int);
insert into t1 values (1);
select max(a) as b from t1 having b=1;
select a from t1 having a=1;
drop table t1;