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

Modified Files:
        All 
Added Files:
        function_syntax.sql.src function_syntax.stable.err 
        function_syntax.stable.out 
Log Message:
Test (it is green) to cover the new drop function syntax because no test 
existed before
Each new feature should always have a test to cover the syntax and the 
semantics of it.

The DROP function was modified.

DROP FUNCTION f_name;
It will drop the function f_name if there is only one function with such name.
If there are more function and error message is sent to ask you for the complete
signature.

DROP FUNCTION f_name();
It will drop the function f_name which does not have parameters.

DROP FUNCTION f_name(int, varchar(1024));
It will drop the function with this signature.
Note: The number bits for varchar it is only checked by the parser, 
semantically only the type is checked not the size.
The parser need to be fixed (maybe by Niels) to avoid this inconvenient.

DROP ALL FUNCTION f_name;
It will drop all the functions with the name f_name.

Note: In all the previous case the drop can be cascade.
Syntax:

DROP FUNCTION f_name [(type_list)] [CASCADE | RESTRICT];
DROP ALL FUNCTION f_name [CASCADE | RESTRICT]


--- NEW FILE: function_syntax.stable.err ---
stderr of test 'function_syntax` in directory 'src/test` itself:


# 13:04:59 >  
# 13:04:59 >  Mtimeout -timeout 180 mserver5 
"--config=/ufs/goncalve/scratch/MonetDB/MonetDB5/etc/monetdb5.conf" --debug=10 
--set 
"monet_mod_path=/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5:/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5/lib:/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/dbfarm" 
--set "sql_logdir=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/sql_logs" 
--set 
"xquery_logdir=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/xquery_logs" 
--set mapi_port=36428 --set xrpc_port=48805 --set monet_prompt= --trace 
"--dbname=mTests_src_test" --dbinit=' include sql;' ; echo ; echo Over..
# 13:04:59 >  

#warning: please don't forget to set your vault key!
#(see /ufs/goncalve/scratch/MonetDB/MonetDB5/etc/monetdb5.conf)

# 13:04:59 >  
# 13:04:59 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=36428 
# 13:04:59 >  

MAPI  = [EMAIL PROTECTED]:36428
QUERY = DROP FUNCTION f1;
ERROR = !DROP FUNCTION: there are more than one function called 'f1', please 
use the full signature
MAPI  = [EMAIL PROTECTED]:36428
QUERY = DROP FUNCTION f2 (int, varchar(1024));
ERROR = !DROP FUNCTION: no such function 'f2' (int(32), varchar(1024))
MAPI  = [EMAIL PROTECTED]:36428
QUERY = DROP ALL FUNCTION f1;
ERROR = !DROP FUNCTION: there are functions dependent on function f1;

# 13:04:59 >  
# 13:04:59 >  Done.
# 13:04:59 >  


Index: All
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/Tests/All,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- All 27 Apr 2007 07:27:33 -0000      1.36
+++ All 28 Apr 2007 11:24:32 -0000      1.37
@@ -80,3 +80,4 @@
 coalesce
 round
 rank
+function_syntax

--- NEW FILE: function_syntax.stable.out ---
stdout of test 'function_syntax` in directory 'src/test` itself:


# 13:04:59 >  
# 13:04:59 >  Mtimeout -timeout 180 mserver5 
"--config=/ufs/goncalve/scratch/MonetDB/MonetDB5/etc/monetdb5.conf" --debug=10 
--set 
"monet_mod_path=/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5:/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5/lib:/ufs/goncalve/scratch/MonetDB/MonetDB5/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/dbfarm" 
--set "sql_logdir=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/sql_logs" 
--set 
"xquery_logdir=/ufs/goncalve/scratch/MonetDB/MonetDB5/var/MonetDB5/xquery_logs" 
--set mapi_port=36428 --set xrpc_port=48805 --set monet_prompt= --trace 
"--dbname=mTests_src_test" --dbinit=' include sql;' ; echo ; echo Over..
# 13:04:59 >  

!WARNING: GDKlockHome: ignoring empty or invalid .gdk_lock.
!WARNING: BBPdir: initializing BBP.
# MonetDB Server v5.0.0_beta2_1
# Copyright (c) 1993-2007 CWI, all rights reserved
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked
# dbname:mTests_src_test
# Visit http://monetdb.cwi.nl/ for further information

Ready.

Over..

# 13:04:59 >  
# 13:04:59 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=36428 
# 13:04:59 >  

% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
[ "f1"  ]
[ "f2"  ]
[ "f3"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
[ "f1"  ]
[ "f2"  ]
[ "f3"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
[ "f2"  ]
[ "f3"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
[ "f2"  ]
[ "f3"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
[ "f3"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 2 # length
[ "f1"  ]
% sys.functions # table_name
% name # name
% varchar # type
% 0 # length

# 13:04:59 >  
# 13:04:59 >  Done.
# 13:04:59 >  


--- NEW FILE: function_syntax.sql.src ---
$RELSRCDIR/../function_syntax.sql


-------------------------------------------------------------------------
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