~ubuntu-branches/ubuntu/gutsy/mysql-dfsg-5.0/gutsy

« back to all changes in this revision

Viewing changes to mysql-test/r/func_misc.result

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-04-03 09:43:01 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070403094301-fnjhfr59hu72pvtg
Tags: 5.0.38-0ubuntu1
* Package the Enterprise version again (.37 was a community version), since
  Debian and we have always done so. This brings in a few more bug fixes and
  makes functional derivations less likely.
* debian/README.Maintainer: Add pointer to upstream download URL, since it
  is very hard to find the Enterprise versions.
* Disable 33_scripts__mysql_create_system_tables__no_test.dpatch, since that
  script was removed upstream.
* debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch: Adapted to
  changed formatting in new upstream version.
* Remove debian/patches/86_PATH_MAX.dpatch, fixed upstream.
* Add debian/patches/90_org_tables_definition.dpatch: Fix local variable
  declaration in libmysqld/sql_parse.cc to fix compilation with
  EMBEDDED_LIBRARY.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
  `a` bigint(21) unsigned default NULL
142
142
) ENGINE=MyISAM DEFAULT CHARSET=latin1
143
143
drop table t1;
 
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
 
152
begin
 
153
set @invoked := @invoked + 1;
 
154
return x;
 
155
end//
 
156
create function func_26093_b(x int, y int) returns int
 
157
begin
 
158
set @invoked := @invoked + 1;
 
159
return x;
 
160
end//
 
161
select avg(a) from table_26093;
 
162
avg(a)
 
163
5.5000
 
164
select benchmark(100, (select avg(a) from table_26093));
 
165
benchmark(100, (select avg(a) from table_26093))
 
166
0
 
167
set @invoked := 0;
 
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))
 
170
0
 
171
select @invoked;
 
172
@invoked
 
173
10
 
174
set @invoked := 0;
 
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))
 
177
0
 
178
select @invoked;
 
179
@invoked
 
180
1000
 
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;
144
188
End of 5.0 tests