Update of /cvsroot/monetdb/sql/src/test
In directory sc8-pr-cvs16:/tmp/cvs-serv23380
Modified Files:
procedure_syntax.sql
Log Message:
Modify test to also cover the new changes.
Changes to support CALL inside procedures and function bodies.
It is also possible to call as a normal statement, for example:
create procedure p1(id)
begin
insert into t1 values(id);
end;
create procedure p1()
begin
declare id int;
set id = 0;
call p1(id);
end;
call p1();
The end result is the insertion of value 1 into the table t1.
Index: procedure_syntax.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/procedure_syntax.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- procedure_syntax.sql 3 May 2007 23:42:28 -0000 1.1
+++ procedure_syntax.sql 4 May 2007 14:26:04 -0000 1.2
@@ -1,3 +1,5 @@
+create table t1 (id int);
+
create PROCEDURE p1()
BEGIN
declare id int;
@@ -6,8 +8,7 @@
create PROCEDURE p1(id int)
BEGIN
- declare id int;
- set id = 0;
+ insert into t1 values(id);
END;
@@ -44,17 +45,25 @@
select name from functions where name = 'p1' or name = 'p2' or name = 'p3';
---to test the dependencies
---create PROCEDURE p1()
---BEGIN
--- declare id int;
--- set id = p1(1);
---END;
+create PROCEDURE p1()
+BEGIN
+ declare id int;
+ set id = 1;
+ call p1(1);
+END;
---DROP ALL PROCEDURE p1;
+call p1();
+
+select * from t1;
+
+DROP table t1;
+
+DROP ALL PROCEDURE p1;
DROP ALL PROCEDURE p1 CASCADE;
+DROP table t1;
+
select name from functions where name = 'p1' or name = 'f1';
create PROCEDURE p1()
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins