Changeset: 5ea3dd1344a6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ea3dd1344a6
Modified Files:
        sql/backends/monet5/Tests/pyapi09.sql
Branch: pyapi
Log Message:

Add additional test to loopback query test.


diffs (40 lines):

diff --git a/sql/backends/monet5/Tests/pyapi09.sql 
b/sql/backends/monet5/Tests/pyapi09.sql
--- a/sql/backends/monet5/Tests/pyapi09.sql
+++ b/sql/backends/monet5/Tests/pyapi09.sql
@@ -64,8 +64,35 @@ language P
 
 SELECT * FROM pyapi09load();
 
+DROP FUNCTION pyapi09create;
+DROP FUNCTION pyapi09load;
+DROP TABLE pyapi09objects;
 
+# Fourth test: Error in query, 
+# Load the data from the table
+CREATE FUNCTION pyapi09() returns TABLE(i INTEGER)
+language P
+{
+    res = _conn.execute('SELECT * FROM unknown_table;')
+    return numpy.arange(10)
+};
 
+SELECT * FROM pyapi09();
+ROLLBACK;
+
+START TRANSACTION;
+
+# Fifth test: Error in query, but we capture it, does it ruin our transaction?
+# Load the data from the table
+CREATE FUNCTION pyapi09() returns TABLE(i INTEGER)
+language P
+{
+    try: res = _conn.execute('SELECT * FROM unknown_table;')
+    except: pass
+    return numpy.arange(10)
+};
+
+SELECT * FROM pyapi09();
+SELECT 1; # yes it does...
 
 ROLLBACK;
-
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to