diff options
author | unknown <malff/marcsql@weblab.(none)> | 2007-03-01 19:22:43 -0700 |
---|---|---|
committer | unknown <malff/marcsql@weblab.(none)> | 2007-03-01 19:22:43 -0700 |
commit | 93e6eb8037dfc0907ac1474a4d42faac45344319 (patch) | |
tree | 57d9f6b55ca5fd54e80b8b29ba588dc4f895ecfe /mysql-test/r/func_misc.result | |
parent | bf4996c4ebb0a0a21bbe0448adae5aafa749f9b4 (diff) | |
parent | 0a93be2869be5eb801d7955ad512504190dd0479 (diff) | |
download | mariadb-git-93e6eb8037dfc0907ac1474a4d42faac45344319.tar.gz |
Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-26093
into weblab.(none):/home/marcsql/TREE/mysql-5.1-26093-merge
mysql-test/r/func_misc.result:
Auto merged
Diffstat (limited to 'mysql-test/r/func_misc.result')
-rw-r--r-- | mysql-test/r/func_misc.result | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 84974f845c5..b4c6f0f6699 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -141,4 +141,48 @@ t1 CREATE TABLE `t1` ( `a` bigint(21) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +drop table if exists table_26093; +drop function if exists func_26093_a; +drop function if exists func_26093_b; +create table table_26093(a int); +insert into table_26093 values +(1), (2), (3), (4), (5), +(6), (7), (8), (9), (10); +create function func_26093_a(x int) returns int +begin +set @invoked := @invoked + 1; +return x; +end// +create function func_26093_b(x int, y int) returns int +begin +set @invoked := @invoked + 1; +return x; +end// +select avg(a) from table_26093; +avg(a) +5.5000 +select benchmark(100, (select avg(a) from table_26093)); +benchmark(100, (select avg(a) from table_26093)) +0 +set @invoked := 0; +select benchmark(100, (select avg(func_26093_a(a)) from table_26093)); +benchmark(100, (select avg(func_26093_a(a)) from table_26093)) +0 +select @invoked; +@invoked +10 +set @invoked := 0; +select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)); +benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)) +0 +select @invoked; +@invoked +1000 +select benchmark(100, (select (a) from table_26093)); +ERROR 21000: Subquery returns more than 1 row +select benchmark(100, (select 1, 1)); +ERROR 21000: Operand should contain 1 column(s) +drop table table_26093; +drop function func_26093_a; +drop function func_26093_b; End of 5.0 tests |