Changeset: 57651c04823f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=57651c04823f Modified Files: NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj clients/Tests/SQL-dump.stable.out.32bit configure.ag gdk/gdk_posix.c gdk/gdk_private.h gdk/gdk_storage.c Branch: transaction-replication Log Message:
Merge with default branch diffs (265 lines): diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj b/NT/installer32/MonetDB5-Geom-Module.vdproj --- a/NT/installer32/MonetDB5-Geom-Module.vdproj +++ b/NT/installer32/MonetDB5-Geom-Module.vdproj @@ -94,11 +94,6 @@ "ComponentsUrl" = "8:" "Items" { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.2.0" - { - "Name" = "8:Windows Installer 2.0" - "ProductCode" = "8:Microsoft.Windows.Installer.2.0" - } } } } @@ -428,6 +423,7 @@ "ProductCode" = "8:{66BABD32-D69D-4A89-A7F3-2655D4CD0641}" "PackageCode" = "8:{D9B2D386-1461-43BC-9A63-93F1BA0D7921}" "UpgradeCode" = "8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}" + "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" 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 @@ -982,11 +982,6 @@ "ComponentsUrl" = "8:" "Items" { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.2.0" - { - "Name" = "8:Windows Installer 2.0" - "ProductCode" = "8:Microsoft.Windows.Installer.2.0" - } } } } diff --git a/NT/installer64/MonetDB-ODBC-Installer.vdproj b/NT/installer64/MonetDB-ODBC-Installer.vdproj --- a/NT/installer64/MonetDB-ODBC-Installer.vdproj +++ b/NT/installer64/MonetDB-ODBC-Installer.vdproj @@ -1207,7 +1207,7 @@ { "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" - "SourcePath" = "8:C:\\Program Files (x86)\\Common Files\\Merge Modules\\Microsoft_VC100_CRT_x64.msm" + "SourcePath" = "8:C:\\Program Files\\Common Files\\Merge Modules\\Microsoft_VC100_CRT_x64.msm" "Properties" { } diff --git a/NT/installer64/MonetDB5-Geom-Module.vdproj b/NT/installer64/MonetDB5-Geom-Module.vdproj --- a/NT/installer64/MonetDB5-Geom-Module.vdproj +++ b/NT/installer64/MonetDB5-Geom-Module.vdproj @@ -94,11 +94,6 @@ "ComponentsUrl" = "8:" "Items" { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.2.0" - { - "Name" = "8:Windows Installer 2.0" - "ProductCode" = "8:Microsoft.Windows.Installer.2.0" - } } } } @@ -428,6 +423,7 @@ "ProductCode" = "8:{BD1A3C71-3A8E-421D-922D-2B7A19926B5C}" "PackageCode" = "8:{471DD1DA-9C69-4289-821D-4CC329A8BA94}" "UpgradeCode" = "8:{8E6CDFDE-39B9-43D9-97B3-2440C012845C}" + "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" @@ -992,7 +988,7 @@ { "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" - "SourcePath" = "8:C:\\Program Files (x86)\\Common Files\\Merge Modules\\Microsoft_VC100_CRT_x64.msm" + "SourcePath" = "8:C:\\Program Files\\Common Files\\Merge Modules\\Microsoft_VC100_CRT_x64.msm" "Properties" { } 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 @@ -982,11 +982,6 @@ "ComponentsUrl" = "8:" "Items" { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.2.0" - { - "Name" = "8:Windows Installer 2.0" - "ProductCode" = "8:Microsoft.Windows.Installer.2.0" - } } } } diff --git a/clients/Tests/SQL-dump.stable.out.32bit b/clients/Tests/SQL-dump.stable.out.32bit --- a/clients/Tests/SQL-dump.stable.out.32bit +++ b/clients/Tests/SQL-dump.stable.out.32bit @@ -6998,8 +6998,8 @@ 6302 "text" "create function json.text(j 6306 "text" "create function json.text(js string)\nreturns string external name json.text;" "json" true 1 false false false 6230 6310 "text" "create function json.text(js int)\nreturns string external name json.text;" "json" true 1 false false false 6230 6314 "output" "-- The remainder awaits the implementation \n\ncreate aggregate json.output(js json)\nreturns string external name json.output;" "json" true 3 false false false 6230 -6318 "tojsonarray" "-- create function json.object(*) returns json external name json.objectrender;\n\n-- create function json.array(*) returns json external name json.arrayrender;\n\n-- unnesting the JSON structure\n\n-- create function json.unnest(js json)\n-- returns table( id integer, k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( v string) external name json.unnest;\n\n-- create function json.nest table( id integer, k string, v string)\n-- returns json external name json.nest;\n\ncreate aggregate json.tojsonarray( x string ) returns string external name json.aggr;" "json" true 3 false false false 6230 -6322 "tojsonarray" "create aggregate json.tojsonarray( x double ) returns string external name json.aggr;" "json" true 3 false false false 6230 +6318 "tojsonarray" "-- create function json.object(*) returns json external name json.objectrender;\n\n-- create function json.array(*) returns json external name json.arrayrender;\n\n-- unnesting the JSON structure\n\n-- create function json.unnest(js json)\n-- returns table( id integer, k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( v string) external name json.unnest;\n\n-- create function json.nest table( id integer, k string, v string)\n-- returns json external name json.nest;\n\ncreate aggregate json.tojsonarray( x string ) returns string external name aggr.jsonaggr;" "aggr" true 3 false false false 6230 +6322 "tojsonarray" "create aggregate json.tojsonarray( x double ) returns string external name aggr.jsonaggr;" "aggr" true 3 false false false 6230 6326 "md5" "\n-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the ""License""); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an ""AS IS""\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Copyright August 2008-2014 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (co) Arjen de Rijke\n-- Functions supporting jsonstore\n\ncreate function sys.md5(v string)\nreturns string external name clients.md5sum;" "clients" true 1 false false false 2000 6331 "uuid" "-- generate a new uuid\ncreate function sys.uuid()\nreturns uuid external name uuid.""new"";" "uuid" true 1 false false false 2000 6334 "isauuid" "create function sys.isauuid(u uuid)\nreturns uuid external name uuid.""isaUUID"";" "uuid" true 1 false false false 2000 diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2197,7 +2197,7 @@ org_have_sphinxclient="auto" have_sphinxclient=$org_have_sphinxclient AC_ARG_WITH(sphinxclient, AS_HELP_STRING([--with-sphinxclient=DIR],[sphinxclient library is installed in DIR]), - [have_sphinxclient="$withval"], [have_sphinxclient="auto"]) + [have_sphinxclient="$withval"]) if test "x$have_sphinxclient" != xno; then case "$have_sphinxclient" in auto|yes) @@ -2328,7 +2328,7 @@ org_have_mseed="auto" have_mseed=$org_have_mseed AC_ARG_WITH(mseed, AS_HELP_STRING([--with-mseed=DIR],[mseed library is installed in DIR]), - [have_mseed="$withval"], [have_mseed="auto"]) + [have_mseed="$withval"]) if test "x$have_mseed" != xno; then case "$have_mseed" in @@ -2835,6 +2835,7 @@ AC_CHECK_FUNCS([\ pipe \ popen \ posix_fadvise \ + posix_fallocate \ posix_madvise \ putenv \ round \ diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c --- a/gdk/gdk_posix.c +++ b/gdk/gdk_posix.c @@ -423,7 +423,7 @@ MT_mremap(const char *path, int mode, vo fprintf(stderr, "= %s:%d: MT_mremap(%s,"PTRFMT","SZFMT","SZFMT"): open() failed\n", __FILE__, __LINE__, path?path:"NULL", PTRFMTCAST old_address, old_size, *new_size); return NULL; } - if (GDKextendf(fd, *new_size) < 0) { + if (GDKextendf(fd, *new_size, path) < 0) { close(fd); fprintf(stderr, "= %s:%d: MT_mremap(%s,"PTRFMT","SZFMT","SZFMT"): GDKextendf() failed\n", __FILE__, __LINE__, path?path:"NULL", PTRFMTCAST old_address, old_size, *new_size); return NULL; @@ -522,6 +522,9 @@ MT_mremap(const char *path, int mode, vo /* if it failed, try alternative */ } if (p == MAP_FAILED && path != NULL) { +#ifdef HAVE_POSIX_FALLOCATE + int rt; +#endif /* write data to disk, then * mmap it to new address */ if (fd >= 0) @@ -537,9 +540,30 @@ MT_mremap(const char *path, int mode, vo } if (write(fd, old_address, old_size) < 0 || - ftruncate(fd, *new_size) < 0) { +#ifdef HAVE_POSIX_FALLOCATE + /* posix_fallocate returns + * error number on + * failure, not -1, and if + * it returns EINVAL, the + * underlying file system + * may not support the + * operation, so we then + * need to try + * ftruncate */ + ((rt = posix_fallocate(fd, 0, (off_t) *new_size)) == EINVAL ? ftruncate(fd, (off_t) *new_size) < 0 : rt != 0) +#else + ftruncate(fd, (off_t) *new_size) < 0 +#endif + ) { close(fd); - fprintf(stderr, "= %s:%d: MT_mremap(%s,"PTRFMT","SZFMT","SZFMT"): write() or ftruncate() failed\n", __FILE__, __LINE__, path?path:"NULL", PTRFMTCAST old_address, old_size, *new_size); + fprintf(stderr, + "= %s:%d: MT_mremap(%s,"PTRFMT","SZFMT","SZFMT"): write() or " +#ifdef HAVE_POSIX_FALLOCATE + "posix_fallocate()" +#else + "ftruncate()" +#endif + " failed\n", __FILE__, __LINE__, path?path:"NULL", PTRFMTCAST old_address, old_size, *new_size); return NULL; } p = mmap(NULL, *new_size, prot, flags, diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -100,7 +100,7 @@ void GDKclrerr(void) __attribute__((__visibility__("hidden"))); int GDKextend(const char *fn, size_t size) __attribute__((__visibility__("hidden"))); -int GDKextendf(int fd, size_t size) +int GDKextendf(int fd, size_t size, const char *fn) __attribute__((__visibility__("hidden"))); int GDKfdlocate(const char *nme, const char *mode, const char *ext) __attribute__((__visibility__("hidden"))); diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -229,35 +229,46 @@ GDKmove(const char *dir1, const char *nm } int -GDKextendf(int fd, size_t size) +GDKextendf(int fd, size_t size, const char *fn) { struct stat stb; + int rt = 0; + int t0 = 0; if (fstat(fd, &stb) < 0) { /* shouldn't happen */ return -1; } /* if necessary, extend the underlying file */ + IODEBUG t0 = GDKms(); if (stb.st_size < (off_t) size) { - return ftruncate(fd, (off_t) size); +#ifdef HAVE_POSIX_FALLOCATE + /* posix_fallocate returns error number on failure, + * not -1 :-( */ + if ((rt = posix_fallocate(fd, 0, (off_t) size)) == EINVAL) + /* on Solaris/OpenIndiana, this may mean that + * the underlying file system doesn't support + * the operation, so just resize the file */ +#endif + rt = ftruncate(fd, (off_t) size); } - return 0; + IODEBUG fprintf(stderr, "#GDKextend %s " SZFMT " -> " SZFMT " %dms%s\n", + fn, stb.st_size, size, + GDKms() - t0, rt < 0 ? " (failed)" : ""); + /* return 0 or -1 (posix_fallocate returns != 0 on failure) */ + return -(rt != 0); } int GDKextend(const char *fn, size_t size) { - int t0 = 0; int rt = -1, fd; - IODEBUG t0 = GDKms(); rt = -1; if ((fd = open(fn, O_RDWR)) >= 0) { - rt = GDKextendf(fd, size); + rt = GDKextendf(fd, size, fn); close(fd); } - IODEBUG fprintf(stderr, "#GDKextend %s " SZFMT " %dms%s\n", fn, size, - GDKms() - t0, rt < 0 ? " (failed)" : ""); return rt; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list