Update of /cvsroot/monetdb/sql/src/test
In directory sc8-pr-cvs16:/tmp/cvs-serv7012

Added Files:
        procedure_syntax.sql 
Log Message:
Test for the new implementation.

All the features supported for functions are now supported for procedures. 
However, procedure and functions differ in two aspects (well, maybe one):
Procedure do not have return type and no return statements in their 
runtime_body.

A new field to the struct sql_func was added to simply the distinguish between t
hem and also to help in the dependencies check.



--- NEW FILE: procedure_syntax.sql ---
create PROCEDURE p1()
BEGIN
        declare id int;
        set id = 0;
END;

create PROCEDURE p1(id int)
BEGIN
        declare id int;
        set id = 0;
END;


create PROCEDURE p2(id int)
BEGIN
        set id = 0;
END;

create PROCEDURE p3(id int, name varchar(1024))
BEGIN
        declare id int;
        set id = 0;
END;

select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP PROCEDURE p1;

select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP PROCEDURE p1();

select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP PROCEDURE p2 (int, varchar(1024));

select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP PROCEDURE p2 (int);

select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP PROCEDURE p3 (int, varchar(1024));

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;

--DROP ALL PROCEDURE p1;

DROP ALL PROCEDURE p1 CASCADE;

select name from functions where name = 'p1' or name = 'f1';

create PROCEDURE p1()
BEGIN
        declare id int;
        set id = 0;
END;

DROP FUNCTION p1;
DROP FUNCTION p1 ();
DROP ALL FUNCTION p1;
select name from functions where name = 'p1' or name = 'p2' or name = 'p3';

DROP 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

Reply via email to