Changeset: aaffc3090b24 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aaffc3090b24
Modified Files:
        gdk/gdk_select.c
        sql/storage/bat/bat_logger.c
        testing/Mtest.py.in
Branch: default
Log Message:

Merge with Oct2014 branch.


diffs (175 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -221,7 +221,15 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, 
        }
        BATsetcount(bn, cnt);
        bn->tkey = 1;
-       GDKqsort(dst, NULL, NULL, BATcount(bn), SIZEOF_OID, 0, TYPE_oid);
+       if (cnt > 1) {
+               /* hash chains produce results in the order high to
+                * low, so we just need to reverse */
+               for (l = BUNfirst(bn), h = BUNlast(bn) - 1; l < h; l++, h--) {
+                       o = dst[l];
+                       dst[l] = dst[h];
+                       dst[h] = o;
+               }
+       }
        bn->tsorted = 1;
        bn->tdense = bn->trevsorted = bn->batCount <= 1;
        if (bn->batCount == 1)
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -59,11 +59,11 @@ bl_postversion( void *lg)
                BUN p,q;
 
                te = temp_descriptor(logger_find_bat(lg, N(n, NULL, s, 
"types_eclass")));
-               tn = temp_descriptor(logger_find_bat(lg, N(n, NULL, s, 
"types_eclass")));
+               tn = temp_descriptor(logger_find_bat(lg, N(n, NULL, s, 
"types_sqlname")));
                if (!te || !tn)
                        return;
                tei = bat_iterator(te);
-               tni = bat_iterator(te);
+               tni = bat_iterator(tn);
                tne = BATnew(TYPE_void, TYPE_int, BATcount(te), PERSISTENT);
                if (!tne)
                        return;
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1393,10 +1393,10 @@ def ApproveOutput (env, TST) :
                     Warn('There are other (specific) stable outputs for test  
%s\nfor which patching failed:\n  %s' % (os.path.join(TSTDIR,'Tests',TST), 
str(list)))
                     STDERR.write('  Look at the *.rej files in directory 
%s.\n\n' % os.path.join(TSTDIR,'Tests'))
                     STDERR.flush()
-            else:
+            elif verbose:
                 print "No differences detected between  %s and  stable.%s%s  
that are not ignored by Mtest.py." % (os.path.join(TSTDIR, "%s.test.%s" % (TST, 
WHAT)), WHAT, SYSTEM)
             remove(patch + ".0")
-        else:
+        elif verbose:
             i = TST.rfind('.')
             if i > 0:
                 return ApproveOutput(env, TST[:i])
@@ -2018,7 +2018,7 @@ def RunTest(env, TST, BusyPorts, COND, o
         if env['exe']['Mtimeout'][0]:
             # set timeout
             env['exe']['Mtimeout'] = env['exe']['Mtimeout'][0], 'Mtimeout 
-timeout %s ' % str(TIMEOUT)
-            SetExecEnv(env['exe'],0)
+            SetExecEnv(env['exe'],False)
         CTIMEOUT = 0
         if   CALL in ["other", "python"]:
             if TIMEOUT > 0:
@@ -2166,7 +2166,7 @@ def RunTest(env, TST, BusyPorts, COND, o
         if env['exe']['Mtimeout'][0]:
             # reset timeout
             env['exe']['Mtimeout'] = env['exe']['Mtimeout'][0], 'Mtimeout 
-timeout %s ' % str(par['TIMEOUT'])
-            SetExecEnv(env['exe'],0)
+            SetExecEnv(env['exe'],False)
 
         try:
             Mfilter.mFilter(TST+STABLEout,par['IGNORE'])
@@ -2304,7 +2304,7 @@ def RunTest(env, TST, BusyPorts, COND, o
                 ACCURACYerr = 0
             else:
                 cmd.append('-d')
-            if quiet:
+            if not verbose:
                 cmd.append('-q')
             cmd.extend(['-F^#', '-I%s' % par['IGNORE'],
                         '-C%s' % par['CONTEXT'], '-A%d' % ACCURACYerr,
@@ -3611,7 +3611,7 @@ def main(argv) :
 
     # display par's
     STDERR.flush()
-    if not quiet:
+    if verbose:
         for v in par.keys():
             #os.environ[v] = par[v]
             print"%s = %s" % (v, str(par[v]))
@@ -3665,7 +3665,7 @@ def main(argv) :
     for p in 'TSTSRCBASE', 'TSTTRGBASE':
         if os.path.isdir(env[p]):
             rp = os.path.realpath(env[p])
-            if not quiet and os.path.normcase(rp) != os.path.normcase(env[p]):
+            if verbose and os.path.normcase(rp) != os.path.normcase(env[p]):
                 Warn("%s: Replacing logical path  %s  by absolute physical 
path  %s" % (p, env[p], rp))
             env[p] = rp
         else:
@@ -3759,9 +3759,9 @@ def main(argv) :
     for v in vars_:
         if env.has_key(v):
             os.environ[v] = env[v]
-            if not quiet:
+            if verbose:
                 print "%s = %s" % (v, env[v])
-    if not quiet:
+    if verbose:
         print "%s = %s" % ('PATH', os.environ['PATH'])
         if os.environ.has_key('PYTHONPATH'):
             print "%s = %s" % ('PYTHONPATH', os.environ['PYTHONPATH'])
@@ -3857,10 +3857,7 @@ def main(argv) :
             if par['TIMEOUT'] == 0 or not exe['Mtimeout'][0]:
                 exe['Mtimeout'] = '', ''
             env['exe'] = exe
-            if not quiet:
-                SetExecEnv(exe,1)
-            else:
-                SetExecEnv(exe,0)
+            SetExecEnv(exe,verbose)
 
             #TODO:
             #exe['JAVA']       = 'java'
@@ -4003,7 +4000,7 @@ def main(argv) :
             if GetBitsAndOIDsAndModsAndStaticAndThreads(env):
                 sys.exit(1)
             STDERR.flush()
-            if not quiet:
+            if verbose:
                 print "Bits: ", env['TST_BITS']
                 print "OIDs: ", env['TST_OIDS']
                 if env['TST_INT128']:
@@ -4040,7 +4037,7 @@ def main(argv) :
                 tsts = "tests "+str(testlist)
             else:
                 tsts = "all tests"
-            if not quiet:
+            if verbose:
                 print "\nRunning %s in directory %s.\n" % (tsts , testdirs[0])
             t_, elem, diff = PerformDir(env, testdirs[0], testlist, BusyPorts)
             if elem is not None:
@@ -4049,7 +4046,7 @@ def main(argv) :
                 else:
                     body_bad.append(elem)
         else:
-            if not quiet:
+            if verbose:
                 print "\nRunning all tests in directories %s.\n" % 
str(testdirs)
             for d in testdirs:
                 t, elem, diff = PerformDir(env, d, [], BusyPorts)
@@ -4214,7 +4211,9 @@ VALUES (%s, '%s', '%s', '%s',
 """ % os.path.join(TSTTRGBASE, TSTPREF, "index.html")
                 sys.exit(1)
             else:
-                if not quiet:
+                if quiet:
+                    pass
+                elif verbose:
                     print """\
 
  No differences encountered during testing.
@@ -4222,11 +4221,12 @@ VALUES (%s, '%s', '%s', '%s',
  If necessary, you can checkin your modifications, now.
 """
                 else:
-                    print ""
+                    print "No differences encountered during testing."
                 sys.exit(0)
 
         if THISFILE == "Mapprove.py":
-            print """\
+            if not quiet:
+                print """\
 
  First, run 'hg diff` to check what you have changed.
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to