Changeset: 889a048ea303 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=889a048ea303
Modified Files:
        monetdb5/extras/compiler/mal_compiler.mx
        monetdb5/extras/crackers/crackers_pq.mx
        monetdb5/extras/rdf/rdf.mx
        monetdb5/extras/sphinx/sphinx.mx
        monetdb5/mal/mal.mx
        monetdb5/mal/mal_authorize.mx
        monetdb5/mal/mal_box.mx
        monetdb5/mal/mal_builder.mx
        monetdb5/mal/mal_errors.mx
        monetdb5/mal/mal_exception.mx
        monetdb5/mal/mal_factory.mx
        monetdb5/mal/mal_function.mx
        monetdb5/mal/mal_interpreter.mx
        monetdb5/mal/mal_linker.mx
        monetdb5/mal/mal_namespace.mx
        monetdb5/mal/mal_properties.mx
        monetdb5/mal/mal_recycle.mx
        monetdb5/mal/mal_resolve.mx
        monetdb5/mal/mal_sabaoth.mx
        monetdb5/mal/mal_scenario.mx
        monetdb5/mal/mal_session.mx
        monetdb5/mal/mal_stack.c
        monetdb5/mal/mal_stack.mx
        monetdb5/mal/mal_type.mx
        monetdb5/mal/mal_utils.mx
        monetdb5/mal/mal_xml.mx
        monetdb5/modules/atoms/blob.mx
        monetdb5/modules/atoms/color.mx
        monetdb5/modules/atoms/identifier.mx
        monetdb5/modules/atoms/inet.mx
        monetdb5/modules/atoms/xml.mx
        monetdb5/modules/kernel/alarm.mx
        monetdb5/modules/kernel/counters.mx
        monetdb5/modules/kernel/lock.mx
        monetdb5/modules/kernel/logger.mx
        monetdb5/modules/kernel/microbenchmark.mx
        monetdb5/modules/kernel/sema.mx
        monetdb5/modules/kernel/unix.mx
        monetdb5/modules/mal/Tests/bpt01.mal
        monetdb5/modules/mal/Tests/bpt01.stable.err
        monetdb5/modules/mal/Tests/bpt01.stable.out
        monetdb5/modules/mal/Tests/bpt02.mal
        monetdb5/modules/mal/Tests/bpt02.stable.err
        monetdb5/modules/mal/Tests/bpt02.stable.out
        monetdb5/modules/mal/Tests/bpt10.mal
        monetdb5/modules/mal/Tests/bpt10.stable.err
        monetdb5/modules/mal/Tests/bpt10.stable.out
        monetdb5/modules/mal/algebraExtensions.mx
        monetdb5/modules/mal/attach.mx
        monetdb5/modules/mal/batExtensions.mx
        monetdb5/modules/mal/chopper.mx
        monetdb5/modules/mal/constraints.mx
        monetdb5/modules/mal/groupby.mx
        monetdb5/modules/mal/histogram.mx
        monetdb5/modules/mal/mal_init.mx
        monetdb5/modules/mal/manual.mx
        monetdb5/modules/mal/mkey.mx
        monetdb5/modules/mal/pcre.mx
        monetdb5/modules/mal/profiler.mx
        monetdb5/modules/mal/recycle.mx
        monetdb5/modules/mal/remote.mx
        monetdb5/modules/mal/sabaoth.mx
        monetdb5/modules/mal/tablet_mk.mx
        monetdb5/modules/mal/tablet_si.mx
        monetdb5/modules/mal/tablet_sql.mx
        monetdb5/modules/mal/trader.mx
        monetdb5/modules/mal/transaction.mx
        monetdb5/modules/mal/txtsim.mx
        monetdb5/optimizer/Tests/partitions00.mal
        monetdb5/optimizer/Tests/partitions00.stable.err
        monetdb5/optimizer/Tests/partitions00.stable.out
        monetdb5/optimizer/Tests/partitions01.mal
        monetdb5/optimizer/Tests/partitions01.stable.err
        monetdb5/optimizer/Tests/partitions01.stable.out
        monetdb5/optimizer/Tests/partitions02.mal
        monetdb5/optimizer/Tests/partitions02.stable.err
        monetdb5/optimizer/Tests/partitions02.stable.out
        monetdb5/optimizer/Tests/partitions03.mal
        monetdb5/optimizer/Tests/partitions03.stable.err
        monetdb5/optimizer/Tests/partitions03.stable.out
        monetdb5/optimizer/Tests/partitions04.mal
        monetdb5/optimizer/Tests/partitions04.stable.err
        monetdb5/optimizer/Tests/partitions04.stable.out
        monetdb5/optimizer/Tests/partitions05.mal
        monetdb5/optimizer/Tests/partitions05.stable.err
        monetdb5/optimizer/Tests/partitions05.stable.out
        monetdb5/optimizer/Tests/partitions06.mal
        monetdb5/optimizer/Tests/partitions06.stable.err
        monetdb5/optimizer/Tests/partitions06.stable.out
        monetdb5/optimizer/Tests/partitions07.mal
        monetdb5/optimizer/Tests/partitions07.stable.err
        monetdb5/optimizer/Tests/partitions07.stable.out
        monetdb5/optimizer/opt_partitions.mx
        monetdb5/optimizer/opt_pipes.mx
        monetdb5/optimizer/opt_prelude.mx
        monetdb5/optimizer/opt_statistics.mx
        monetdb5/optimizer/opt_support.mx
        monetdb5/scheduler/run_adder.mx
        monetdb5/scheduler/run_isolate.mx
        monetdb5/scheduler/run_memo.mx
        monetdb5/scheduler/run_octopus.mx
        sql/backends/monet5/datacell/datacell.c
Branch: Aug2011
Log Message:

merge


diffs (truncated from 75746 to 300 lines):

diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -24,7 +24,7 @@
 }
 
 bin_mclient = {
-       SOURCES = mclient.c ReadlineTools.c
+       SOURCES = mclient.c ReadlineTools.c ReadlineTools.h
        LIBS = libmcutil ../mapilib/libmapi \
                ../../common/stream/libstream \
                $(READLINE_LIBS) \
@@ -55,6 +55,6 @@
 
 man_MANS = mclient.1 msqldump.1
 
-EXTRA_DIST = msqldump.h mprompt.h ReadlineTools.h $(man_MANS)
+EXTRA_DIST = msqldump.h mprompt.h $(man_MANS)
 
 EXTRA_DIST_DIR = Tests
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -399,7 +399,7 @@
        char *t;
        int rows = 0;           /* return number of output lines printed */
        size_t ulen;
-       int *cutafter = alloca(sizeof(int) * fields);
+       int *cutafter = malloc(sizeof(int) * fields);
 
        /* trim the text if needed */
        if (trim == 1) {
@@ -528,6 +528,8 @@
                first = 0;
                rows++;
        } while (more);
+
+       free(cutafter);
        return rows;
 }
 
@@ -966,8 +968,8 @@
        SQLseparator(len, fields, '-');
        if (mapi_get_name(hdl, 0)) {
                int i;
-               char **names = (char **) alloca(fields * sizeof(char *));
-               int *numeric = (int *) alloca(fields * sizeof(int));
+               char **names = (char **) malloc(fields * sizeof(char *));
+               int *numeric = (int *) malloc(fields * sizeof(int));
 
                for (i = 0; i < fields; i++) {
                        names[i] = mapi_get_name(hdl, i);
@@ -975,6 +977,8 @@
                }
                SQLrow(len, numeric, names, fields, 1, more);
                SQLseparator(len, fields, '=');
+               free(names);
+               free(numeric);
        }
 }
 
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -2559,18 +2559,20 @@
                         * sequence is used.
                         */
                        unsigned char md[20];   /* should be 
RIPEMD160_DIGEST_LENGTH */
-                       size_t n = strlen(mid->password) + strlen(chal);
-                       char *key = alloca(n + 1);
-                       key[0] = '\0';
+                       char *p;
+                       RIPEMD160_CTX c;
 
                        if (pversion == 9) {
-                               strcpy(key, mid->password + 1);
-                               n--;
+                               p = mid->password + 1;
                        } else {
-                               strcpy(key, mid->password);
+                               p = mid->password;
                        }
-                       strncat(key, chal, strlen(chal));
-                       RIPEMD160((unsigned char *) key, n, md);
+
+                       RIPEMD160_Init(&c);
+                       RIPEMD160_Update(&c, p, strlen(p));
+                       RIPEMD160_Update(&c, chal, strlen(chal));
+                       RIPEMD160_Final(md, &c);
+
                        hash = malloc(sizeof(char) * ( /*{RIPEMD160} */ 11 + 20 
* 2 + 1));
                        sprintf(hash, 
"{RIPEMD160}%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
                                "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -2588,18 +2590,20 @@
                         * sequence is used.
                         */
                        unsigned char md[20];   /* should be SHA_DIGEST_LENGTH 
*/
-                       size_t n = strlen(mid->password) + strlen(chal);
-                       char *key = alloca(n + 1);
-                       key[0] = '\0';
+                       char *p;
+                       SHA_CTX c;
 
                        if (pversion == 9) {
-                               strcpy(key, mid->password + 1);
-                               n--;
+                               p = mid->password + 1;
                        } else {
-                               strcpy(key, mid->password);
+                               p = mid->password;
                        }
-                       strncat(key, chal, strlen(chal));
-                       SHA1((unsigned char *) key, n, md);
+
+                       SHA1_Init(&c);
+                       SHA1_Update(&c, p, strlen(p));
+                       SHA1_Update(&c, chal, strlen(chal));
+                       SHA1_Final(md, &c);
+
                        hash = malloc(sizeof(char) * ( /*{SHA1} */ 6 + 20 * 2 + 
1));
                        sprintf(hash, 
"{SHA1}%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
                                "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -2617,18 +2621,20 @@
                         * sequence is used.
                         */
                        unsigned char md[16];   /* should be MD5_DIGEST_LENGTH 
*/
-                       size_t n = strlen(mid->password) + strlen(chal);
-                       char *key = alloca(n + 1);
-                       key[0] = '\0';
+                       char *p;
+                       MD5_CTX c;
 
                        if (pversion == 9) {
-                               strcpy(key, mid->password + 1);
-                               n--;
+                               p = mid->password + 1;
                        } else {
-                               strcpy(key, mid->password);
+                               p = mid->password;
                        }
-                       strncat(key, chal, strlen(chal));
-                       MD5((unsigned char *) key, n, md);
+
+                       MD5_Init(&c);
+                       MD5_Update(&c, p, strlen(p));
+                       MD5_Update(&c, chal, strlen(chal));
+                       MD5_Final(md, &c);
+
                        hash = malloc(sizeof(char) * ( /*{MD5} */ 5 + 16 * 2 + 
1));
                        sprintf(hash, "{MD5}%02x%02x%02x%02x%02x%02x%02x%02x"
                                "%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -2875,12 +2881,11 @@
                                }
                                return mapi_start_talking(mid);
                        } else {
-                               q = alloca(sizeof(char) * (strlen(red) + 50));
-                               snprintf(q, strlen(red) + 50,
-                                        "error while parsing redirect: %s\n",
-                                        red);
+                               char re[BUFSIZ];
+                               snprintf(re, sizeof(re),
+                                               "error while parsing redirect: 
%s\n", red);
                                mapi_close_handle(hdl);
-                               mapi_setError(mid, q, "mapi_start_talking", 
MERROR);
+                               mapi_setError(mid, re, "mapi_start_talking", 
MERROR);
                                return mid->error;
                        }
                }
diff --git a/clients/odbc/driver/SQLBrowseConnect.c 
b/clients/odbc/driver/SQLBrowseConnect.c
--- a/clients/odbc/driver/SQLBrowseConnect.c
+++ b/clients/odbc/driver/SQLBrowseConnect.c
@@ -36,7 +36,6 @@
  *
  **********************************************************************/
 
-#include <monetdb_config.h>
 #include "ODBCGlobal.h"
 #include "ODBCDbc.h"
 #include "ODBCUtil.h"
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -36,11 +36,10 @@
  *
  **********************************************************************/
 
-#include <monetdb_config.h>
-#include <monet_options.h>
 #include "ODBCGlobal.h"
 #include "ODBCDbc.h"
 #include "ODBCUtil.h"
+#include <monet_options.h>
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
diff --git a/clients/odbc/setup/drvcfg.c b/clients/odbc/setup/drvcfg.c
--- a/clients/odbc/setup/drvcfg.c
+++ b/clients/odbc/setup/drvcfg.c
@@ -28,6 +28,9 @@
  * -----------------------------------------------
  * Peter Harvey                - phar...@codebydesign.com
  **************************************************/
+
+#include "monetdb_config.h"
+
 #include <drvcfg.h>
 #include <string.h>            /* for memset(), memcpy(), strncpy() */
 
diff --git a/clients/odbc/setup/drvcfg.h b/clients/odbc/setup/drvcfg.h
--- a/clients/odbc/setup/drvcfg.h
+++ b/clients/odbc/setup/drvcfg.h
@@ -31,8 +31,6 @@
 #ifndef _ODBCINST_H
 #define _ODBCINST_H
 
-#include "monetdb_config.h"
-
 #include <unistd.h>
 #ifdef HAVE_PWD_H
 #include <pwd.h>
diff --git a/clients/odbc/winsetup/Makefile.ag 
b/clients/odbc/winsetup/Makefile.ag
--- a/clients/odbc/winsetup/Makefile.ag
+++ b/clients/odbc/winsetup/Makefile.ag
@@ -24,7 +24,7 @@
 ODBCLIBS = -lodbc32 -lodbccp32 -lversion -lshlwapi -luser32
 
 lib_MonetODBCs = {
-       SOURCES = setup.c setup.rc setup.syms
+       SOURCES = setup.c setup.rc setup.syms resource.h
        LIBS = -lodbccp32 -luser32
 }
 
diff --git a/common/options/Makefile.ag b/common/options/Makefile.ag
--- a/common/options/Makefile.ag
+++ b/common/options/Makefile.ag
@@ -19,10 +19,10 @@
 
 MTSAFE
 
-EXTRA_DIST = monet_getopt.h getopt.c getopt1.c monet_options.h
+EXTRA_DIST = getopt.c getopt1.c
 
 lib_moptions = { 
        NOINST
        NAME = moptions
-       SOURCES = monet_options.c monet_getopt.h
+       SOURCES = monet_options.c monet_options.h monet_getopt.h
 }
diff --git a/common/stream/Makefile.ag b/common/stream/Makefile.ag
--- a/common/stream/Makefile.ag
+++ b/common/stream/Makefile.ag
@@ -19,15 +19,13 @@
 
 MTSAFE
 
-EXTRA_DIST = stream_socket.h
-
 INCLUDES = $(zlib_CFLAGS) \
                   $(BZ_CFLAGS) \
                   $(openssl_CFLAGS) \
                   $(curl_CFLAGS)
 
 lib_stream  =  {
-       SOURCES = stream.c stream.h
+       SOURCES = stream.c stream.h stream_socket.h
        VERSION = $(STREAM_VERSION)
        LIBS = $(SOCKET_LIBS) \
                   $(zlib_LIBS) \
diff --git a/common/utils/Makefile.ag b/common/utils/Makefile.ag
--- a/common/utils/Makefile.ag
+++ b/common/utils/Makefile.ag
@@ -19,9 +19,7 @@
 
 MTSAFE
 
-EXTRA_DIST = mutils.h
-
 lib_mutils  =  {
        NOINST
-       SOURCES = mutils.c
+       SOURCES = mutils.c mutils.h
 }
diff --git a/de-bootstrap b/de-bootstrap
--- a/de-bootstrap
+++ b/de-bootstrap
@@ -70,4 +70,4 @@
        exit 1
 fi
 
-RM -rf `hg purge --all -p 
-I{\*\*Makefile.\*,\*\*.pyc,aclocal.m4,acout.in,autom4te.cache,buildtools/conf/{config.{guess,sub},install-sh,ltmain.sh,l[ti]\*.m4,missing,ylwrap},configure{,.ac},{doc,install}.lst,monetdb_config.h.in}`
+RM -rf `hg --config extensions.purge= purge --all -p 
-I{\*\*Makefile.\*,\*\*.pyc,aclocal.m4,acout.in,autom4te.cache,buildtools/conf/{config.{guess,sub},install-sh,ltmain.sh,l[ti]\*.m4,missing,ylwrap},configure{,.ac},{doc,install}.lst,monetdb_config.h.in}`
diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install
--- a/debian/monetdb5-server.install
+++ b/debian/monetdb5-server.install
@@ -22,7 +22,6 @@
 debian/tmp/usr/lib/monetdb5/bbp.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/blob.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/box.mal usr/lib/monetdb5
-debian/tmp/usr/lib/monetdb5/bpm.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/calc.mal usr/lib/monetdb5
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to