Changeset: e2994d194c06 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e2994d194c06
Modified Files:
        monetdb5/mal/mal_client.c
        sql/test/copy/Tests/parse-besteffort.py
        sql/test/copy/Tests/parse-decimal.py
        sql/test/copy/Tests/parse-integer.py
        sql/test/copy/Tests/parse-misc.py
        sql/test/copy/Tests/parsetest_support.py
Branch: pp_hashjoin
Log Message:

Initialize locks; add to python search path; typo in exception name.


diffs (93 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -274,6 +274,8 @@ MCinitClientRecord(Client c, oid user, b
        char name[MT_NAME_LEN];
        snprintf(name, sizeof(name), "Client%d->s", (int) (c - mal_clients));
        MT_sema_init(&c->s, 0, name);
+       snprintf(name, sizeof(name), "Client%d-errlock", (int) (c - 
mal_clients));
+       MT_lock_init(&c->error_lock, name);
        return c;
 }
 
@@ -407,6 +409,7 @@ MCcloseClient(Client c)
        MT_thread_set_qry_ctx(NULL);
        //assert(strcmp(MT_thread_getname(), "main-thread") == 0 || 
c->qryctx.datasize == 0);
        MT_sema_destroy(&c->s);
+       MT_lock_destroy(&c->error_lock);
        MT_lock_set(&mal_contextLock);
        c->idle = c->login = c->lastcmd = 0;
        ma_destroy(c->qryctx.errorallocator);
diff --git a/sql/test/copy/Tests/parse-besteffort.py 
b/sql/test/copy/Tests/parse-besteffort.py
--- a/sql/test/copy/Tests/parse-besteffort.py
+++ b/sql/test/copy/Tests/parse-besteffort.py
@@ -3,7 +3,8 @@
 import decimal
 from decimal import Decimal
 import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
 from parsetest_support import setup_suite, TestCase
 
 dec = Decimal
diff --git a/sql/test/copy/Tests/parse-decimal.py 
b/sql/test/copy/Tests/parse-decimal.py
--- a/sql/test/copy/Tests/parse-decimal.py
+++ b/sql/test/copy/Tests/parse-decimal.py
@@ -3,7 +3,8 @@
 import decimal
 from decimal import Decimal
 import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
 from parsetest_support import setup_suite, TestCase
 
 suite = setup_suite()
@@ -102,7 +103,7 @@ run_test(testcase.replace(3, '41|43x').e
 
 
 # Decimal overflow
-max_digits = 38 if suite.have_hge else 19
+max_digits = 38 if suite.have_hge else 18
 decprec = decimal.getcontext().prec
 decimal.getcontext().prec = max_digits + 2
 for d in range(1, max_digits + 1):
diff --git a/sql/test/copy/Tests/parse-integer.py 
b/sql/test/copy/Tests/parse-integer.py
--- a/sql/test/copy/Tests/parse-integer.py
+++ b/sql/test/copy/Tests/parse-integer.py
@@ -3,7 +3,8 @@
 import decimal
 from decimal import Decimal
 import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
 from parsetest_support import setup_suite, TestCase
 
 suite = setup_suite()
diff --git a/sql/test/copy/Tests/parse-misc.py 
b/sql/test/copy/Tests/parse-misc.py
--- a/sql/test/copy/Tests/parse-misc.py
+++ b/sql/test/copy/Tests/parse-misc.py
@@ -3,7 +3,8 @@
 import decimal
 from decimal import Decimal
 import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
 from parsetest_support import setup_suite, TestCase
 
 suite = setup_suite()
diff --git a/sql/test/copy/Tests/parsetest_support.py 
b/sql/test/copy/Tests/parsetest_support.py
--- a/sql/test/copy/Tests/parsetest_support.py
+++ b/sql/test/copy/Tests/parsetest_support.py
@@ -275,7 +275,7 @@ class TestSuite:
         cursor = conn.cursor()
         try:
             cursor.execute('SELECT CAST(1 AS HUGEINT)')
-        except pymonetdb.OperationError:
+        except pymonetdb.OperationalError:
             self.have_hge = False
             self.conn.rollback()
         finally:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to