Changeset: 696c2552c2c4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=696c2552c2c4
Modified Files:
        sql/backends/monet5/sql.mx
Branch: sciql
Log Message:

Merge with default branch.


diffs (71 lines):

diff --git a/clients/python/monetdb/mapi2.py b/clients/python/monetdb/mapi2.py
--- a/clients/python/monetdb/mapi2.py
+++ b/clients/python/monetdb/mapi2.py
@@ -176,21 +176,12 @@ class Server:
 
         if protocol == '9':
             algo = challenges[5]
-            if algo == 'SHA512':
-                password = hashlib.sha512(password).hexdigest()
-            elif algo == 'SHA384':
-                password = hashlib.sha384(password).hexdigest()
-            elif algo == 'SHA256':
-                password = hashlib.sha256(password).hexdigest()
-            elif algo == 'SHA224':
-                password = hashlib.sha224(password).hexdigest()
-            elif algo == 'SHA1':
-                password = hashlib.sha1(password).hexdigest()
-            elif algo == 'MD5':
-                password = hashlib.md5(password).hexdigest()
-            else:
-                raise NotSupportedError("The %s hash algorithm is not " +
-                    "supported" % algo)
+            try:
+                h = hashlib.new(algo)
+                h.update(password)
+                password = h.hexdigest()
+            except ValueError, e:
+                raise NotSupportedError(e.message)
         elif protocol != "8":
             raise NotSupportedError("We only speak protocol v8 and v9")
 
diff --git a/monetdb5/optimizer/opt_evaluate.mx 
b/monetdb5/optimizer/opt_evaluate.mx
--- a/monetdb5/optimizer/opt_evaluate.mx
+++ b/monetdb5/optimizer/opt_evaluate.mx
@@ -205,19 +205,18 @@ OPTevaluateImplementation(Client cntxt, 
                                mnstr_printf(cntxt->fdout, "#result:%s\n", msg 
== MAL_SUCCEED ? "ok" : msg);
                        }
                        if (msg == MAL_SUCCEED) {
+                               int nvar;
                                ValRecord cst;
 
                                cst.vtype = 0;
                                VALcopy(&cst, &env->stk[getArg(p, 0)]);
                                /* You may not overwrite constants.  They may 
be used by
                                 * other instructions */
-                               getArg(p, 1) = defConstant(mb, getArgType(mb, 
p, 0), &cst);
-                               /* update the stack frame for next evaluations 
*/
-                               if (getArgType(mb, p, 1) == TYPE_str)
-                                       setVarCleanup(mb, getArg(p, 1));
-                               else
-                                       clrVarCleanup(mb, getArg(p, 1));
-                               VALcopy(&env->stk[getArg(p, 1)], 
&getVarConstant(mb, getArg(p, 1)));
+                               nvar = getArg(p, 1) = defConstant(mb, 
getArgType(mb, p, 0), &cst);
+                               if (nvar > env->stktop) {
+                                       VALcopy(&env->stk[getArg(p, 1)], 
&getVarConstant(mb, getArg(p, 1)));
+                                       env->stktop = getArg(p, 1);
+                               }
                                alias[getArg(p, 0)] = getArg(p, 1);
                                p->argc = 2;
                                p->token = ASSIGNsymbol;
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -3597,6 +3597,7 @@ mvc_import_table_wrap(Client cntxt, MalB
 
        codeset(&cs);
        strIconv(&filename, *fname, "UTF-8", cs);
+       GDKfree(cs);
        len = strlen((char*)(*N));
        GDKstrFromStr(ns=GDKmalloc(len+1), *N, len); len = 0;
        ss = open_rastream(filename);
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to