141
141
`a` bigint(21) unsigned default NULL
142
142
) ENGINE=MyISAM DEFAULT CHARSET=latin1
144
drop table if exists table_26093;
145
drop function if exists func_26093_a;
146
drop function if exists func_26093_b;
147
create table table_26093(a int);
148
insert into table_26093 values
149
(1), (2), (3), (4), (5),
150
(6), (7), (8), (9), (10);
151
create function func_26093_a(x int) returns int
153
set @invoked := @invoked + 1;
156
create function func_26093_b(x int, y int) returns int
158
set @invoked := @invoked + 1;
161
select avg(a) from table_26093;
164
select benchmark(100, (select avg(a) from table_26093));
165
benchmark(100, (select avg(a) from table_26093))
168
select benchmark(100, (select avg(func_26093_a(a)) from table_26093));
169
benchmark(100, (select avg(func_26093_a(a)) from table_26093))
175
select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093));
176
benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093))
181
select benchmark(100, (select (a) from table_26093));
182
ERROR 21000: Subquery returns more than 1 row
183
select benchmark(100, (select 1, 1));
184
ERROR 21000: Operand should contain 1 column(s)
185
drop table table_26093;
186
drop function func_26093_a;
187
drop function func_26093_b;