Changeset: cf9bf545606d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf9bf545606d
Modified Files:
        sql/ChangeLog
        sql/test/miscellaneous/Tests/deallocate.sql
        sql/test/miscellaneous/Tests/deallocate.stable.err
Branch: default
Log Message:

Updated ChangeLog and updated test


diffs (57 lines):

diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Fri Dec 13 2019 Pedro Ferreira <pedro.ferre...@monetdbsolutions.com>
+- Added deallocate statements with the syntax 'DEALLOC[ATE] [PREPARE]
+  { number | ALL }', to close an existing prepared statement or all, 
+  through the SQL layer. Previously this feature was available via MAPI 
+  exclusively with the "release" command.
+
 * Wed Nov 27 2019 Pedro Ferreira <pedro.ferre...@monetdbsolutions.com>
 - Implemented ROLLUP, CUBE and GROUPING SETS from SQL:1999. They define
   grouping subsets used at GROUP BY clause in order to compute partial
diff --git a/sql/test/miscellaneous/Tests/deallocate.sql 
b/sql/test/miscellaneous/Tests/deallocate.sql
--- a/sql/test/miscellaneous/Tests/deallocate.sql
+++ b/sql/test/miscellaneous/Tests/deallocate.sql
@@ -1,10 +1,13 @@
 prepare select "system" or ? from _tables WHERE false;
-
 EXEC **(false);
 dealloc **;
 exec **(false); --error, the last prepared statement, no longer exists;
+DEALLOCATE **; --error, last prepared statement already closed
 
 prepare select "system" or ? from _tables WHERE false;
 execute **(false);
 DEALLOCATE prepare all;
 EXECUTE **(false); --error, the last prepared statement, no longer exists;
+
+DEALLOCATE 100000; --error, it doesn't exist
+DEALLOCATE ALL;
diff --git a/sql/test/miscellaneous/Tests/deallocate.stable.err 
b/sql/test/miscellaneous/Tests/deallocate.stable.err
--- a/sql/test/miscellaneous/Tests/deallocate.stable.err
+++ b/sql/test/miscellaneous/Tests/deallocate.stable.err
@@ -30,10 +30,18 @@ MAPI  = (monetdb) /var/tmp/mtest-170269/
 QUERY = exec  3(false); --error, the last prepared statement, no longer exists;
 ERROR = !No prepared statement with id: 3
 CODE  = 07003
-MAPI  = (monetdb) /var/tmp/mtest-170269/.s.monetdb.35105
+MAPI  = (monetdb) /var/tmp/mtest-174632/.s.monetdb.34143
+QUERY = DEALLOCATE  3; --error, last prepared statement already closed
+ERROR = !No prepared statement with id: 3
+CODE  = 07003
+MAPI  = (monetdb) /var/tmp/mtest-174156/.s.monetdb.39989
 QUERY = EXECUTE  5(false); --error, the last prepared statement, no longer 
exists;
 ERROR = !No prepared statement with id: 5
 CODE  = 07003
+MAPI  = (monetdb) /var/tmp/mtest-175193/.s.monetdb.31597
+QUERY = DEALLOCATE 100000; --error, it doesn't exist
+ERROR = !No prepared statement with id: 100000
+CODE  = 07003
 
 # 13:56:29 >  
 # 13:56:29 >  "Done."
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to