Changeset: 48364454a828 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48364454a828
Modified Files:
        gdk/gdk_col.c
        geom/sql/Tests/geom_polygon.stable.err.Debian4.0
        geom/sql/Tests/geom_polygon.stable.err.Fedora10
        sql/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err.Windows
        
sql/test/BugTracker-2010/Tests/incomplete-utf8-sequence.Bug-2575.stable.err.Windows
Branch: headless
Log Message:

Merging


diffs (truncated from 3600 to 300 lines):

diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -573,12 +573,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_7F9C47C139394604A78AD5B95A87B3E8"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_7FDA7780804D42D693497FADFFBE6ABD"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -3083,26 +3077,6 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7F9C47C139394604A78AD5B95A87B3E8"
-            {
-            "SourcePath" = "8:etc\\monetdb5.conf"
-            "TargetName" = "8:monetdb5.conf"
-            "Tag" = "8:"
-            "Folder" = "8:_B5DFB5D13EE441F8B42616036AACB603"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            }
             
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7FDA7780804D42D693497FADFFBE6ABD"
             {
             "SourcePath" = "8:lib\\monetdb5\\createdb\\23_skyserver.sql"
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj 
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -573,12 +573,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_7F9C47C139394604A78AD5B95A87B3E8"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_7FDA7780804D42D693497FADFFBE6ABD"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -3083,26 +3077,6 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7F9C47C139394604A78AD5B95A87B3E8"
-            {
-            "SourcePath" = "8:etc\\monetdb5.conf"
-            "TargetName" = "8:monetdb5.conf"
-            "Tag" = "8:"
-            "Folder" = "8:_B5DFB5D13EE441F8B42616036AACB603"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            }
             
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7FDA7780804D42D693497FADFFBE6ABD"
             {
             "SourcePath" = "8:lib\\monetdb5\\createdb\\23_skyserver.sql"
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -60,7 +60,7 @@
 #define DIR_SEP_STR "\\"
 
 /* architecture-dependent files */
-#define EXEC_PREFIX "${prefix}"
+#define EXEC_PREFIX PREFIX
 
 /* Define to 1 if you have `alloca', as a function or macro. */
 #define HAVE_ALLOCA 1
@@ -641,10 +641,10 @@
 #endif
 
 /* object code libraries */
-#define LIBDIR "${exec_prefix}\\lib"
+#define LIBDIR EXEC_PREFIX "\\lib"
 
 /* modifiable single-machine data */
-#define LOCALSTATEDIR "${prefix}\\var"
+#define LOCALSTATEDIR PREFIX "\\var"
 
 #define lstat stat
 #define S_ISREG(mode)  (((mode) & _S_IFMT) == _S_IFREG)
@@ -813,7 +813,7 @@
 #define STDC_HEADERS 1
 
 /* read-only single-machine data */
-#define SYSCONFDIR "${prefix}\\etc"
+#define SYSCONFDIR PREFIX "\\etc"
 
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 /* #undef TIME_WITH_SYS_TIME */
diff --git a/clients/mapiclient/ReadlineTools.c 
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -73,7 +73,7 @@
        if (!state) {
                seekpos = 0;
                len = strlen(text);
-               if ((table_hdl = mapi_query(_mid, "SELECT \"name\" FROM 
\"sys\".\"tables\"")) == NULL || mapi_error(_mid)) {
+               if ((table_hdl = mapi_query(_mid, "SELECT t.\"name\", 
s.\"name\" FROM \"sys\".\"tables\" t, \"sys\".\"schemas\" s where t.schema_id = 
s.id")) == NULL || mapi_error(_mid)) {
                        if (table_hdl) {
                                mapi_explain_query(table_hdl, stderr);
                                mapi_close_handle(table_hdl);
@@ -89,8 +89,17 @@
                mapi_seek_row(table_hdl, seekpos++, MAPI_SEEK_SET);
                mapi_fetch_row(table_hdl);
                name = mapi_fetch_field(table_hdl, 0);
-               if (strncmp(name, text, len) == 0)
-                       return strdup(name);
+               if (strncmp(name, text, len) == 0) {
+                       char *s, *schema = mapi_fetch_field(table_hdl, 1);
+                       int l1 = strlen(name), l2 = strlen(schema);
+
+                       s = malloc(l1 + l2 + 2);
+                       s[0] = 0;
+                       strcat(s, schema); 
+                       strcat(s, ".");
+                       strcat(s, name);
+                       return s;
+               }
        }
 
        return NULL;
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4223,8 +4223,7 @@
        if (hdl->query == NULL) {
                size_t sz = size;
 
-               if (sz > 512)
-                       sz = 512;
+               sz = 512;
                hdl->query = malloc(sz + 1);
                assert(hdl->query);
                hdl->query[0] = '\0';
@@ -4235,7 +4234,6 @@
                if (sz > 0) {
                        if (size < sz)
                                sz = size;
-                       hdl->query = realloc(hdl->query, ln + sz + 1);
                        assert(hdl->query);
                        strncat(hdl->query, query, sz);
                }
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -22,6 +22,10 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
 #include "mutils.h"
 
 #ifdef NATIVE_WIN32
@@ -278,3 +282,32 @@
 }
 
 #endif
+
+#ifdef HAVE_EXECINFO_H
+
+/* Obtain a backtrace and print it to stdout. */
+void
+print_trace (void)
+{
+       void *array[10];
+       size_t size;
+       char **strings;
+       size_t i;
+
+       size = backtrace (array, 10);
+       strings = backtrace_symbols (array, size);
+
+       printf ("Obtained %zd stack frames.\n", size);
+
+       for (i = 0; i < size; i++)
+               printf ("%s\n", strings[i]);
+
+       free (strings);
+}
+#else
+void
+print_trace(void)
+{
+       printf("back traces are not supported on this platform\n");
+}
+#endif
diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -72,4 +72,6 @@
 
 mutils_export int MT_lockf(char *filename, int mode, off_t off, off_t len);
 
+mutils_export void print_trace(void);
+
 #endif /* _MUTILS_H_ */
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2507,6 +2507,7 @@
 # NOTE: these header files are in alphabetical order to ease maintenance
 AC_CHECK_HEADERS([crypt.h \
        dlfcn.h \
+       execinfo.h \
        fcntl.h \
        getopt.h \
        iconv.h \
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1142,7 +1142,7 @@
  * @end itemize
  */
 /* NOTE: `p' is evaluated after a possible upgrade of the heap */
-#define putvalue(b, p, v, copyall)                                     \
+#define COLputvalue(b, p, v, copyall)                                  \
        do {                                                            \
                if ((b)->varsized && (b)->type) {                       \
                        var_t _d;                                       \
@@ -1173,7 +1173,55 @@
                } else                                                  \
                        ATOMput((b)->type, (b)->vheap, (p), v);         \
        } while (0)
-#define replacevalue(b, p, v)                                          \
+#define COLputvalue_str(b, p, v, copyall)                              \
+       do {                                                            \
+               var_t _d;                                               \
+               ptr _ptr;                                               \
+               if (strPut((b)->vheap, &_d, (v)) == 0)                  \
+                       goto bunins_failed;                             \
+               if ((b)->width < SIZEOF_VAR_T &&                        \
+                   ((b)->width <= 2 ? _d - GDK_VAROFFSET : _d) >= ((size_t) 1 
<< (8 * (b)->width))) { \
+                       /* doesn't fit in current heap, upgrade it */   \
+                       COLaccessBegin(b, USE_HEAP, MMAP_SEQUENTIAL);   \
+                       GDKupgradevarheap((b), _d, (copyall));          \
+                       COLaccessEnd(b, USE_HEAP, MMAP_SEQUENTIAL);     \
+               }                                                       \
+               _ptr = (p);                                             \
+               switch ((b)->width) {                                   \
+               case 1:                                                 \
+                       * (unsigned char *) _ptr = (unsigned char) (_d - 
GDK_VAROFFSET); \
+                       break;                                          \
+               case 2:                                                 \
+                       * (unsigned short *) _ptr = (unsigned short) (_d - 
GDK_VAROFFSET); \
+                       break;                                          \
+               case 4:                                                 \
+                       * (unsigned int *) _ptr = (unsigned int) _d;    \
+                       break;                                          \
+               case 8:                                                 \
+                       * (var_t *) _ptr = _d;                          \
+                       break;                                          \
+               }                                                       \
+       } while (0)
+#ifdef NDEBUG
+#define COLputvalue_TYPE(b, p, v, TYPE)                (* (TYPE *) (p) = * 
(TYPE *) (v))
+#else
+#define COLputvalue_TYPE(b, p, v, TYPE)                        \
+       do {                                            \
+               assert((b)->type == TYPE_##TYPE);       \
+               (* (TYPE *) (p) = * (TYPE *) (v));      \
+       } while (0)
+#endif
+#define COLputvalue_chr(b, p, v, copyall)      COLputvalue_TYPE(b, p, v, chr)
+#define COLputvalue_bte(b, p, v, copyall)      COLputvalue_TYPE(b, p, v, bte)
+#define COLputvalue_sht(b, p, v, copyall)      COLputvalue_TYPE(b, p, v, sht)
+#define COLputvalue_int(b, p, v, copyall)      COLputvalue_TYPE(b, p, v, int)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to