~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/ndb/r/ndb_sp.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
create table t1 (
 
3
a int not null primary key,
 
4
b int not null
 
5
) engine=ndb;
 
6
insert into t1 values (1,10), (2,20), (3,100), (4, 100);
 
7
create procedure test_proc1 (in var_in int)
 
8
begin
 
9
select * from t1 where a = var_in;
 
10
end;
 
11
create procedure test_proc2 (out var_out int)
 
12
begin
 
13
select b from t1 where a = 1 into var_out;
 
14
end;
 
15
create procedure test_proc3 (inout var_inout int)
 
16
begin
 
17
select b from t1 where a = var_inout into var_inout;
 
18
end;
 
19
//
 
20
call test_proc1(1);
 
21
a       b
 
22
1       10
 
23
call test_proc2(@test_var);
 
24
select @test_var;
 
25
@test_var
 
26
10
 
27
set @test_var = 1;
 
28
call test_proc3(@test_var);
 
29
select @test_var;
 
30
@test_var
 
31
10
 
32
alter procedure test_proc1 comment 'new comment';
 
33
show create procedure test_proc1;
 
34
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
 
35
test_proc1              CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`(in var_in int)
 
36
    COMMENT 'new comment'
 
37
begin
 
38
select * from t1 where a = var_in;
 
39
end     latin1  latin1_swedish_ci       latin1_swedish_ci
 
40
drop procedure test_proc1;
 
41
drop procedure test_proc2;
 
42
drop procedure test_proc3;
 
43
drop table t1;
 
44
End of 5.1 tests