monetdb-java: default - Improve performance of ResulSet methods ...
Changeset: 9df089b0d69d for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=9df089b0d69d Modified Files: src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java Branch: default Log Message: Improve performance of ResulSet methods getDate(), getTime() getTimestamp() in case the value is NULL. diffs (54 lines): diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java @@ -2782,6 +2782,16 @@ public class MonetResultSet extends Mone public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException { + // to avoid unnecessary work, check for NULL value and invalid columnIndex first + try { + if (tlp.values[columnIndex - 1] == null) { + lastReadWasNull = true; + return null; + } + } catch (IndexOutOfBoundsException e) { + throw newSQLInvalidColumnIndexException(columnIndex); + } + if (cal == null) { cal = Calendar.getInstance(); } @@ -2860,6 +2870,16 @@ public class MonetResultSet extends Mone public Time getTime(int columnIndex, Calendar cal) throws SQLException { + // to avoid unnecessary work, check for NULL value and invalid columnIndex first + try { + if (tlp.values[columnIndex - 1] == null) { + lastReadWasNull = true; + return null; + } + } catch (IndexOutOfBoundsException e) { + throw newSQLInvalidColumnIndexException(columnIndex); + } + if (cal == null) { cal = Calendar.getInstance(); } @@ -2938,6 +2958,16 @@ public class MonetResultSet extends Mone public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + // to avoid unnecessary work, check for NULL value and invalid columnIndex first + try { + if (tlp.values[columnIndex - 1] == null) { + lastReadWasNull = true; + return null; + } + } catch (IndexOutOfBoundsException e) { + throw newSQLInvalidColumnIndexException(columnIndex); + } + if (cal == null) { cal = Calendar.getInstance(); } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
monetdb-java: default - Updated ChangeLog in preparation of new ...
Changeset: f97c111db06f for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=f97c111db06f Modified Files: ChangeLog ChangeLog-Archive Branch: default Log Message: Updated ChangeLog in preparation of new release diffs (43 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,12 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog -* Thu Mar 30 2017 Sjoerd Mullender-- Compiled and released new jars: monetdb-jdbc-2.25.jar, monetdb-mcl-1.15.jar - and updated jdbcclient.jar +* Fri Jul 28 2017 Sjoerd Mullender +- Compiled and released new jars: monetdb-jdbc-2.26.jar and updated jdbcclient.jar -* Thu Mar 9 2017 Martin van Dinther -- Corrected ResultSetMetaData methods getColumnLabel(int), getColomnName(int), - getTableName(int) and getSchemaName(int) for names which contain special - characters such as a space, a tab, a comma, a double quote, etc. - See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6183 +* Thu Jul 13 2017 Martin van Dinther +- Corrected implementation of PreparedStatement method + setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) + for the case the targetSqlType is Types.CLOB. + See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6349 diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -1,6 +1,15 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past monetdb-java ChangeLog entries +* Fri Jul 28 2017 Sjoerd Mullender +- Compiled and released new jars: monetdb-jdbc-2.26.jar and updated jdbcclient.jar + +* Thu Jul 13 2017 Martin van Dinther +- Corrected implementation of PreparedStatement method + setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) + for the case the targetSqlType is Types.CLOB. + See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6349 + * Thu Mar 30 2017 Sjoerd Mullender - Compiled and released new jars: monetdb-jdbc-2.25.jar, monetdb-mcl-1.15.jar and updated jdbcclient.jar ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Update knowledge about double width glyphs in...
Changeset: 234f1a53a929 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=234f1a53a929 Modified Files: clients/mapiclient/mclient.c sql/backends/monet5/sql_result.c Branch: Jul2017 Log Message: Update knowledge about double width glyphs in Unicode. Note that you may have a new enough system to get correct results (i.e., the display is incorrect for some characters on Fedora 24 but correct on Fedora 26). diffs (244 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -390,12 +390,48 @@ utf8strlenmax(char *s, char *e, size_t m if (--n == 0) { /* last byte of a multi-byte character */ len++; - /* the following code points are all East -* Asian Fullwidth and East Asian Wide -* characters as defined in Unicode 8.0 */ + /* this list was created by combining +* the code points marked as +* Emoji_Presentation in +* /usr/share/unicode/emoji/emoji-data.txt +* and code points marked either F or +* W in EastAsianWidth.txt; this list +* is up-to-date with Unicode 9.0 */ if ((0x1100 <= c && c <= 0x115F) || - c == 0x2329 || - c == 0x232A || + (0x231A <= c && c <= 0x231B) || + (0x2329 <= c && c <= 0x232A) || + (0x23E9 <= c && c <= 0x23EC) || + c == 0x23F0 || + c == 0x23F3 || + (0x25FD <= c && c <= 0x25FE) || + (0x2614 <= c && c <= 0x2615) || + (0x2648 <= c && c <= 0x2653) || + c == 0x267F || + c == 0x2693 || + c == 0x26A1 || + (0x26AA <= c && c <= 0x26AB) || + (0x26BD <= c && c <= 0x26BE) || + (0x26C4 <= c && c <= 0x26C5) || + c == 0x26CE || + c == 0x26D4 || + c == 0x26EA || + (0x26F2 <= c && c <= 0x26F3) || + c == 0x26F5 || + c == 0x26FA || + c == 0x26FD || + c == 0x2705 || + (0x270A <= c && c <= 0x270B) || + c == 0x2728 || + c == 0x274C || + c == 0x274E || + (0x2753 <= c && c <= 0x2755) || + c == 0x2757 || + (0x2795 <= c && c <= 0x2797) || + c == 0x27B0 || + c == 0x27BF || + (0x2B1B <= c && c <= 0x2B1C) || + c == 0x2B50 || + c == 0x2B55 || (0x2E80 <= c && c <= 0x2E99) || (0x2E9B <= c && c <= 0x2EF3) || (0x2F00 <= c && c <= 0x2FD5) || @@ -409,7 +445,8 @@ utf8strlenmax(char *s, char *e, size_t m (0x31C0 <= c && c <= 0x31E3) || (0x31F0 <= c && c <= 0x321E) || (0x3220 <= c && c <= 0x3247) || - (0x3250 <= c && c <= 0x4DBF) || + (0x3250 <= c && c <= 0x32FE) || + (0x3300 <= c && c <= 0x4DBF) || (0x4E00 <= c && c <= 0xA48C) || (0xA490 <= c && c <= 0xA4C6) || (0xA960 <= c && c <= 0xA97C) || @@ -419,12 +456,52 @@ utf8strlenmax(char *s, char *e, size_t m (0xFE30 <= c && c <= 0xFE52) || (0xFE54 <= c && c <= 0xFE66) || (0xFE68 <= c && c <= 0xFE6B) || - (0xFF01 <= c && c <= 0xFFE6) || + (0xFF01 <= c && c <= 0xFF60) || + (0xFFE0 <= c && c <=
monetdb-java: default - Improved robustness of ResultSet methods:
Changeset: 688cd5675466 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=688cd5675466 Modified Files: src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java Branch: default Log Message: Improved robustness of ResultSet methods: - getDate(int columnIndex, Calendar cal) - getTime(int columnIndex, Calendar cal) - getTimestamp(int columnIndex, Calendar cal) for when cal is null. Also a ResultSet object now uses less memory when created and the methods getDate() or getTime() or getTimestamp() are never called, which happens in most use cases. diffs (203 lines): diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java @@ -39,7 +39,6 @@ import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.sql.Types; -import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Map; @@ -234,8 +233,8 @@ public class MonetResultSet extends Mone */ @Override public boolean absolute(int row) throws SQLException { - if (row != curRow + 1 && type == TYPE_FORWARD_ONLY) throw - new SQLException("(Absolute) positioning not allowed on forward " + + if (row != curRow + 1 && type == TYPE_FORWARD_ONLY) + throw new SQLException("(Absolute) positioning not allowed on forward " + " only result sets!", "M1M05"); if (header.isClosed()) @@ -247,15 +246,18 @@ public class MonetResultSet extends Mone row = tupleCount + row + 1; } // now place the row not farther than just before or after the result - if (row < 0) row = 0; // before first - else if (row > tupleCount + 1) row = tupleCount + 1;// after last + if (row < 0) + row = 0;// before first + else if (row > tupleCount + 1) + row = tupleCount + 1; // after last String tmpLine = header.getLine(row - 1); // store it curRow = row; - if (tmpLine == null) return false; + if (tmpLine == null) + return false; try { tlp.parse(tmpLine); } catch (MCLParseException e) { @@ -2569,12 +2571,9 @@ public class MonetResultSet extends Mone } // This behaviour is according table B-6 of Sun JDBC Specification 3.0 - private SimpleDateFormat ts = - new SimpleDateFormat("-MM-dd HH:mm:ss"); - private SimpleDateFormat t = - new SimpleDateFormat("HH:mm:ss"); - private SimpleDateFormat d = - new SimpleDateFormat("-MM-dd"); + private SimpleDateFormat dateFormat; + private SimpleDateFormat timeFormat; + private SimpleDateFormat timestampFormat; /** * Helper method which parses the date/time value for columns of type * TIME, DATE and TIMESTAMP. For the types CHAR, VARCHAR and @@ -2595,8 +2594,8 @@ public class MonetResultSet extends Mone private int getJavaDate(Calendar cal, int columnIndex, int type) throws SQLException { - if (cal == null) throw - new IllegalArgumentException("No Calendar object given!"); + if (cal == null) + throw new IllegalArgumentException("No Calendar object given!"); final String monetDate; final String MonetDBType; @@ -2637,19 +2636,31 @@ public class MonetResultSet extends Mone } java.util.Date pdate = null; - ParsePosition ppos = new ParsePosition(0); + final java.text.ParsePosition ppos = new java.text.ParsePosition(0); switch(JdbcType) { case Types.DATE: - d.setTimeZone(ptz); - pdate = d.parse(monetDate, ppos); + if (dateFormat == null) { + // first time usage, create and keep the dateFormat object for next usage + dateFormat = new SimpleDateFormat("-MM-dd"); + } + dateFormat.setTimeZone(ptz); + pdate = dateFormat.parse(monetDate, ppos); break; case Types.TIME: - t.setTimeZone(ptz); - pdate = t.parse(monetDate, ppos); + if (timeFormat ==
MonetDB: Jul2017 - Fixed yet another crash when using triggers.
Changeset: 6eab56daa982 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6eab56daa982 Modified Files: sql/server/rel_optimizer.c Branch: Jul2017 Log Message: Fixed yet another crash when using triggers. diffs (15 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -8761,9 +8761,9 @@ rewrite_topdown(mvc *sql, sql_rel *rel, switch (rel->op) { case op_basetable: case op_table: - if (rel->op == op_table && rel->l) + if (rel->op == op_table && rel->l && rel->flag != 2) rel->l = rewrite(sql, rel->l, rewriter, has_changes); - if (rel->op == op_table && rel->l) + if (rel->op == op_table && rel->l && rel->flag != 2) rel->l = rewrite_topdown(sql, rel->l, rewriter, has_changes); break; case op_join: ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Update documentation. The -Pmonetdb option is...
Changeset: 5837c4491cc8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5837c4491cc8 Modified Files: sql/NT/dump-restore.rst Branch: default Log Message: Update documentation. The -Pmonetdb option is not supported by mclient or msqldump. diffs (33 lines): diff --git a/sql/NT/dump-restore.rst b/sql/NT/dump-restore.rst --- a/sql/NT/dump-restore.rst +++ b/sql/NT/dump-restore.rst @@ -33,7 +33,9 @@ It is also possible to dump from the com Server, and then issue the command :: - msqldump -umonetdb -Pmonetdb > dump.sql + msqldump -umonetdb > dump.sql + +You will need to provide the password (monetdb). This command will connect to the SQL Server and dump the database into the file dump.sql in the current directory. @@ -52,10 +54,16 @@ In the SQL Client, type the following co <.../dump.sql That is, a less than symbol followed by the absolute (!) path name of -the dump file that was produced using the dump instructions. +the dump file that was produced using the dump instructions. Again, +unless you use an absolute path name, the file name is relative to +where the SQL client was started, which on Windows may not be where +you expect. It is also possible to restore from the command line. Start a SQL Server, and then issue the command :: - mclient -lsql -umonetdb -Pmonetdb < dump.sql + mclient -lsql -umonetdb < dump.sql + +You will need to provide the password (monetdb). + ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jul2017 branch, not changing any f...
Changeset: efad9a563042 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=efad9a563042 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Jul2017 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Post release build.
Changeset: b4163335a71d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4163335a71d Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: Jul2017 Log Message: Post release build. diffs (229 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1,5 +1,5 @@ %define name MonetDB -%define version 11.27.5 +%define version 11.27.6 %{!?buildno: %global buildno %(date +%Y%m%d)} # groups of related archs 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 @@ -753,7 +753,7 @@ #define MONETDB5_PASSWDHASH_TOKEN SHA512 /* Release name or "unreleased" */ -#define MONETDB_RELEASE "Jul2017-SP1" +#define MONETDB_RELEASE "unreleased" /* Suffix for C++ files */ #define MX_CXX_SUFFIX "cxx" @@ -765,7 +765,7 @@ #define PACKAGE "MonetDB" /* Define to the version of this package. */ -#define PACKAGE_VERSION "11.27.5" +#define PACKAGE_VERSION "11.27.6" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "https://bugs.monetdb.org/; diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -6,7 +6,7 @@ # # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. -VERSION=11.27.5 +VERSION=11.27.6 # ^^ # Maintained via vertoo. Please don't modify by hand! # Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -3,8 +3,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 VERSIONINFO - FILEVERSION 11,27,5,1 - PRODUCTVERSION 11,27,5,1 + FILEVERSION 11,27,6,1 + PRODUCTVERSION 11,27,6,1 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,7 +18,7 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", "11.27.5\0" + VALUE "FileVersion", "11.27.6\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. @@ -28,7 +28,7 @@ BEGIN VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", "11.27.5\0" + VALUE "ProductVersion", "11.27.6\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc --- a/clients/odbc/driver/driver.rc +++ b/clients/odbc/driver/driver.rc @@ -3,8 +3,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 VERSIONINFO - FILEVERSION 11,27,5,1 - PRODUCTVERSION 11,27,5,1 + FILEVERSION 11,27,6,1 + PRODUCTVERSION 11,27,6,1 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,7 +18,7 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", "11.27.5\0" + VALUE "FileVersion", "11.27.6\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. @@ -28,7 +28,7 @@ BEGIN VALUE "OriginalFilename", "libMonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB SQL Server\0" - VALUE "ProductVersion", "11.27.5\0" + VALUE "ProductVersion", "11.27.6\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -62,8 +62,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 11,27,5,1 - PRODUCTVERSION 11,27,5,1 + FILEVERSION 11,27,6,1 + PRODUCTVERSION 11,27,6,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -80,12 +80,12 @@ BEGIN BEGIN VALUE "CompanyName", "MonetDB B.V." VALUE "FileDescription", "MonetDB ODBC Setup DLL" -VALUE "FileVersion", "11.27.5" +VALUE "FileVersion", "11.27.6" VALUE "InternalName", "libMonetODBCs.dll" VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2017"
MonetDB: default - Merge with Jul2017 branch.
Changeset: 8eb46a0a24c8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8eb46a0a24c8 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Jul2017 branch. diffs (57 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -677,3 +677,6 @@ e6552cdd3180bcd35f959954807cab986a6042a5 e6552cdd3180bcd35f959954807cab986a6042a5 Jul2017_release 1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_3 1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_SP1_release +269ab71a82190d6024b3a920837089d657893493 Jul2017_5 +1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_SP1_release +269ab71a82190d6024b3a920837089d657893493 Jul2017_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1039,6 +1039,10 @@ done %postun -p /sbin/ldconfig %changelog +* Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727 +- Rebuilt. +- BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters + * Tue Jul 25 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725 - Rebuilt. - BZ#6325: Merge table unusable in other connections diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monetdb (11.27.5) unstable; urgency=low + + * Rebuilt. + * BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters + + -- Sjoerd Mullender <sjo...@acm.org> Thu, 27 Jul 2017 12:56:09 +0200 + monetdb (11.27.3) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=15:1:0 +GDK_VERSION=15:2:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=9:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=23:1:0 +MONETDB5_VERSION=23:2:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=10:1:2 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Setting tags Jul2017_5 and Jul2017_SP1 for th...
Changeset: 8f4580e0bc9f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f4580e0bc9f Modified Files: .hgtags Branch: Jul2017 Log Message: Setting tags Jul2017_5 and Jul2017_SP1 for the release build. diffs (10 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -677,3 +677,6 @@ e6552cdd3180bcd35f959954807cab986a6042a5 e6552cdd3180bcd35f959954807cab986a6042a5 Jul2017_release 1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_3 1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_SP1_release +269ab71a82190d6024b3a920837089d657893493 Jul2017_5 +1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_SP1_release +269ab71a82190d6024b3a920837089d657893493 Jul2017_SP1_release ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Moved contents of ChangeLog.Jul2017 to MonetD...
Changeset: 269ab71a8219 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=269ab71a8219 Modified Files: MonetDB.spec debian/changelog Branch: Jul2017 Log Message: Moved contents of ChangeLog.Jul2017 to MonetDB.spec, debian/changelog and ChangeLog-Archive. diffs (28 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1039,6 +1039,10 @@ done %postun -p /sbin/ldconfig %changelog +* Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727 +- Rebuilt. +- BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters + * Tue Jul 25 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725 - Rebuilt. - BZ#6325: Merge table unusable in other connections diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monetdb (11.27.5) unstable; urgency=low + + * Rebuilt. + * BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters + + -- Sjoerd Mullender <sjo...@acm.org> Thu, 27 Jul 2017 12:56:09 +0200 + monetdb (11.27.3) unstable; urgency=low * Rebuilt. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Updated library versions.
Changeset: 9a1adf558321 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a1adf558321 Modified Files: libversions Branch: Jul2017 Log Message: Updated library versions. diffs (19 lines): diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=15:1:0 +GDK_VERSION=15:2:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=9:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=23:1:0 +MONETDB5_VERSION=23:2:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=10:1:2 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jul2017 branch, not changing any f...
Changeset: a05728a9b6a7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a05728a9b6a7 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Jul2017 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Pre-release version number update.
Changeset: 455edaa1d0d2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=455edaa1d0d2 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: Jul2017 Log Message: Pre-release version number update. diffs (229 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1,5 +1,5 @@ %define name MonetDB -%define version 11.27.4 +%define version 11.27.5 %{!?buildno: %global buildno %(date +%Y%m%d)} # groups of related archs 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 @@ -753,7 +753,7 @@ #define MONETDB5_PASSWDHASH_TOKEN SHA512 /* Release name or "unreleased" */ -#define MONETDB_RELEASE "unreleased" +#define MONETDB_RELEASE "Jul2017-SP1" /* Suffix for C++ files */ #define MX_CXX_SUFFIX "cxx" @@ -765,7 +765,7 @@ #define PACKAGE "MonetDB" /* Define to the version of this package. */ -#define PACKAGE_VERSION "11.27.4" +#define PACKAGE_VERSION "11.27.5" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "https://bugs.monetdb.org/; diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -6,7 +6,7 @@ # # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. -VERSION=11.27.4 +VERSION=11.27.5 # ^^ # Maintained via vertoo. Please don't modify by hand! # Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -3,8 +3,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 VERSIONINFO - FILEVERSION 11,27,4,1 - PRODUCTVERSION 11,27,4,1 + FILEVERSION 11,27,5,1 + PRODUCTVERSION 11,27,5,1 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,7 +18,7 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", "11.27.4\0" + VALUE "FileVersion", "11.27.5\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. @@ -28,7 +28,7 @@ BEGIN VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", "11.27.4\0" + VALUE "ProductVersion", "11.27.5\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc --- a/clients/odbc/driver/driver.rc +++ b/clients/odbc/driver/driver.rc @@ -3,8 +3,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 VERSIONINFO - FILEVERSION 11,27,4,1 - PRODUCTVERSION 11,27,4,1 + FILEVERSION 11,27,5,1 + PRODUCTVERSION 11,27,5,1 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,7 +18,7 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", "11.27.4\0" + VALUE "FileVersion", "11.27.5\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. @@ -28,7 +28,7 @@ BEGIN VALUE "OriginalFilename", "libMonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB SQL Server\0" - VALUE "ProductVersion", "11.27.4\0" + VALUE "ProductVersion", "11.27.5\0" // // Maintained via vertoo. Please don't modify by hand! // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -62,8 +62,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 11,27,4,1 - PRODUCTVERSION 11,27,4,1 + FILEVERSION 11,27,5,1 + PRODUCTVERSION 11,27,5,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -80,12 +80,12 @@ BEGIN BEGIN VALUE "CompanyName", "MonetDB B.V." VALUE "FileDescription", "MonetDB ODBC Setup DLL" -VALUE "FileVersion", "11.27.4" +VALUE "FileVersion", "11.27.5" VALUE "InternalName", "libMonetODBCs.dll" VALUE "LegalCopyright", "Copyright © MonetDB B.V.
MonetDB: default - Merge with Jul2017 branch.
Changeset: 89358d4f40bb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89358d4f40bb Modified Files: NT/monetdb_config.h.in gdk/gdk_posix.c gdk/gdk_posix.h gdk/gdk_system.h gdk/gdk_utils.c monetdb5/extras/rapi/rapi.c monetdb5/mal/mal.c monetdb5/mal/mal_client.c monetdb5/mal/mal_debugger.c monetdb5/mal/mal_private.h monetdb5/mal/mal_readline.c monetdb5/mal/mal_scenario.c monetdb5/mal/mal_session.c monetdb5/modules/atoms/mcurl.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/vaults/lidar/lidar.c sql/common/sql_list.c sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/sql_parser.y sql/storage/store.c tools/mserver/mserver5.c tools/mserver/shutdowntest.c Branch: default Log Message: Merge with Jul2017 branch. diffs (truncated from 1089 to 300 lines): 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 @@ -347,9 +347,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define to 1 if you have the `mallopt' function. */ -/* #undef HAVE_MALLOPT */ - /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c --- a/gdk/gdk_posix.c +++ b/gdk/gdk_posix.c @@ -1002,8 +1002,11 @@ int win_stat(const char *pathname, struct _stat64 *st) { char buf[128], *p = reduce_dir_name(pathname, buf, sizeof(buf)); - int ret = _stat64(p, st); + int ret; + if (p == NULL) + return -1; + ret = _stat64(p, st); if (p != buf) free(p); return ret; @@ -1013,8 +1016,11 @@ int win_rmdir(const char *pathname) { char buf[128], *p = reduce_dir_name(pathname, buf, sizeof(buf)); - int ret = _rmdir(p); + int ret; + if (p == NULL) + return -1; + ret = _rmdir(p); if (ret < 0 && errno != ENOENT) { /* it could be the indexing * service which prevents us from doing what we have a @@ -1080,9 +1086,12 @@ int win_mkdir(const char *pathname, const int mode) { char buf[128], *p = reduce_dir_name(pathname, buf, sizeof(buf)); - int ret = _mkdir(p); + int ret; (void) mode; + if (p == NULL) + return -1; + ret = _mkdir(p); if (p != buf) free(p); return ret; diff --git a/gdk/gdk_posix.h b/gdk/gdk_posix.h --- a/gdk/gdk_posix.h +++ b/gdk/gdk_posix.h @@ -41,29 +41,6 @@ #include #endif -/* Some systems (SGI, Sun) call malloc before we get a chance to call - * mallopt, and mallopt should be called before the first call to - * malloc. Therefore we do as if we don't have mallopt, even though - * in reality we do. */ -#ifdef HAVE_MALLOPT -#undef HAVE_MALLOPT -#endif - -#ifndef M_MXFAST -#define M_MXFAST 1 /* set size of blocks to be fast */ -#endif -#ifndef M_NLBLKS -#define M_NLBLKS 2 /* set number of block in a holding block */ -#endif -#ifndef M_GRAIN -#define M_GRAIN3 /* set number of sizes mapped to one, for */ - /* small blocks */ -#endif -#ifndef M_KEEP -#define M_KEEP 4 /* retain contents of block after a free */ - /* until another allocation */ -#endif - /* * @- locking, sleep */ diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h --- a/gdk/gdk_system.h +++ b/gdk/gdk_system.h @@ -209,8 +209,11 @@ gdk_export ATOMIC_TYPE volatile GDKlocks /* SQL storage allocator, and hence we have no control */ \ /* over when the lock is destroyed and the memory freed */ \ if (strncmp((n), "sa_", 3) != 0) { \ + MT_Lock * volatile _p; \ while (ATOMIC_TAS(GDKlocklistlock, dummy) != 0) \ ; \ + for (_p = GDKlocklist; _p; _p = _p->next) \ + assert(_p != (l)); \ (l)->next = GDKlocklist;\ GDKlocklist = (l); \ ATOMIC_CLEAR(GDKlocklistlock, dummy); \ @@ -225,19 +228,12 @@ gdk_export ATOMIC_TYPE volatile GDKlocks /* SQL storage allocator, and hence we have no control */ \ /* over when the lock is destroyed and the memory freed */ \ if (strncmp((l)->name, "sa_", 3) != 0) {\ - MT_Lock * volatile _p; \ - /* save a copy for
MonetDB: Jul2017 - Removed unused variable.
Changeset: 762ae9cd1df2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=762ae9cd1df2 Modified Files: sql/backends/monet5/UDF/pyapi/pyapi.c Branch: Jul2017 Log Message: Removed unused variable. diffs (23 lines): diff --git a/sql/backends/monet5/UDF/pyapi/pyapi.c b/sql/backends/monet5/UDF/pyapi/pyapi.c --- a/sql/backends/monet5/UDF/pyapi/pyapi.c +++ b/sql/backends/monet5/UDF/pyapi/pyapi.c @@ -69,7 +69,6 @@ static char *FunctionBasePath(void) } static MT_Lock pyapiLock MT_LOCK_INITIALIZER("pyapiLock"); -static MT_Lock queryLock MT_LOCK_INITIALIZER("queryLock"); static int pyapiInitialized = FALSE; int PYFUNCNAME(PyAPIInitialized)(void) { @@ -1303,10 +1302,8 @@ PYFUNCNAME(PyAPIprelude)(void *ret) { #ifdef NEED_MT_LOCK_INIT static int initialized = 0; /* since we don't destroy the lock, only initialize it once */ - if (!initialized) { + if (!initialized) MT_lock_init(, "pyapi_lock"); - MT_lock_init(, "query_lock"); - } initialized = 1; #endif (void) ret; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Code cleanup.
Changeset: 23ff333cc343 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23ff333cc343 Modified Files: tools/mserver/shutdowntest.c Branch: Jul2017 Log Message: Code cleanup. diffs (48 lines): diff --git a/tools/mserver/shutdowntest.c b/tools/mserver/shutdowntest.c --- a/tools/mserver/shutdowntest.c +++ b/tools/mserver/shutdowntest.c @@ -44,10 +44,10 @@ static void* monetdb_connect(void) { return NULL; } conn = MCforkClient(_clients[0]); - if (!MCvalid((Client) conn)) { + if (!MCvalid(conn)) { return NULL; } - if ((SQLinitClient_ptr)(conn) != MAL_SUCCEED) { + if ((*SQLinitClient_ptr)(conn) != MAL_SUCCEED) { return NULL; } ((backend *) conn->sqlcontext)->mvc->session->auto_commit = 1; @@ -59,11 +59,11 @@ static str monetdb_query(Client c, str q mvc* m = ((backend *) c->sqlcontext)->mvc; res_table* res = NULL; int i; - retval = (SQLstatementIntern_ptr)(c, + retval = (*SQLstatementIntern_ptr)(c, , "name", 1, 0, ); - (SQLautocommit_ptr)(c, m); + (*SQLautocommit_ptr)(c, m); if (retval != MAL_SUCCEED) { printf("Failed to execute SQL query: %s\n", query); freeException(retval); @@ -77,7 +77,7 @@ static str monetdb_query(Client c, str q printf("%s", res->cols[i].name); printf(i + 1 == res->nr_cols ? ")\n" : ","); } - (res_table_destroy_ptr)(res); + (*res_table_destroy_ptr)(res); } return MAL_SUCCEED; } @@ -86,7 +86,7 @@ static void monetdb_disconnect(void* con if (!MCvalid((Client) conn)) { return; } - (SQLexitClient_ptr)((Client) conn); + (*SQLexitClient_ptr)((Client) conn); MCcloseClient((Client) conn); } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Fix memory leak.
Changeset: e2f4dd9fcfde for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2f4dd9fcfde Modified Files: tools/mserver/shutdowntest.c Branch: Jul2017 Log Message: Fix memory leak. diffs (11 lines): diff --git a/tools/mserver/shutdowntest.c b/tools/mserver/shutdowntest.c --- a/tools/mserver/shutdowntest.c +++ b/tools/mserver/shutdowntest.c @@ -66,6 +66,7 @@ static str monetdb_query(Client c, str q (SQLautocommit_ptr)(c, m); if (retval != MAL_SUCCEED) { printf("Failed to execute SQL query: %s\n", query); + freeException(retval); exit(1); return MAL_SUCCEED; } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Make sure locks are initialized only once.
Changeset: 3277ea9bc090 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3277ea9bc090 Modified Files: gdk/gdk_system.h gdk/gdk_utils.c monetdb5/extras/rapi/rapi.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/vaults/lidar/lidar.c Branch: Jul2017 Log Message: Make sure locks are initialized only once. diffs (154 lines): diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h --- a/gdk/gdk_system.h +++ b/gdk/gdk_system.h @@ -209,8 +209,11 @@ gdk_export ATOMIC_TYPE volatile GDKlocks /* SQL storage allocator, and hence we have no control */ \ /* over when the lock is destroyed and the memory freed */ \ if (strncmp((n), "sa_", 3) != 0) { \ + MT_Lock * volatile _p; \ while (ATOMIC_TAS(GDKlocklistlock, dummy) != 0) \ ; \ + for (_p = GDKlocklist; _p; _p = _p->next) \ + assert(_p != (l)); \ (l)->next = GDKlocklist;\ GDKlocklist = (l); \ ATOMIC_CLEAR(GDKlocklistlock, dummy); \ diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -700,6 +700,7 @@ GDKreset(int status, int exit) Thread t, s; struct serverthread *st; int farmid; + int i; if( GDKkey){ BBPunfix(GDKkey->batCacheid); @@ -788,8 +789,16 @@ GDKreset(int status, int exit) GDKnrofthreads = 0; close_stream((stream *) THRdata[0]); close_stream((stream *) THRdata[1]); - memset((char*) GDKbatLock,0, sizeof(GDKbatLock)); - memset((char*) GDKbbpLock,0,sizeof(GDKbbpLock)); + for (i = 0; i <= BBP_BATMASK; i++) { + MT_lock_destroy([i].swap); + MT_lock_destroy([i].hash); + MT_lock_destroy([i].imprints); + } + for (i = 0; i <= BBP_THREADMASK; i++) { + MT_lock_destroy([i].alloc); + MT_lock_destroy([i].trim); + GDKbbpLock[i].free = 0; + } memset((char*) GDKthreads, 0, sizeof(GDKthreads)); memset((char*) THRdata, 0, sizeof(THRdata)); @@ -798,6 +807,19 @@ GDKreset(int status, int exit) MT_lock_unset(); //gdk_system_reset(); CHECK OUT } +#ifdef NEED_MT_LOCK_INIT + MT_lock_destroy(_system_lock); +#if defined(USE_PTHREAD_LOCKS) && defined(ATOMIC_LOCK) + MT_lock_destroy(); + MT_lock_destroy(); +#endif + MT_lock_destroy(); + MT_lock_destroy(); + MT_lock_destroy(); +#ifndef NDEBUG + MT_lock_destroy(); +#endif +#endif #ifndef HAVE_EMBEDDED if (exit) { MT_global_exit(status); diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c --- a/monetdb5/extras/rapi/rapi.c +++ b/monetdb5/extras/rapi/rapi.c @@ -57,7 +57,7 @@ int RAPIEnabled(void) { } // The R-environment should be single threaded, calling for some protective measures. -static MT_Lock rapiLock; +static MT_Lock rapiLock MT_LOCK_INITIALIZER("rapiLock"); static int rapiInitialized = FALSE; static char* rtypenames[] = { "NIL", "SYM", "LIST", "CLO", "ENV", "PROM", "LANG", "SPECIAL", "BUILTIN", "CHAR", "LGL", "unknown", "unknown", @@ -511,8 +511,14 @@ void* RAPIloopback(void *query) { str RAPIprelude(void *ret) { +#ifdef NEED_MT_LOCK_INIT + static int initialized = 0; + /* since we don't destroy the lock, only initialize it once */ + if (!initialized) + MT_lock_init(, "rapi_lock"); + initialized = 1; +#endif (void) ret; - MT_lock_init(, "rapi_lock"); if (RAPIEnabled()) { MT_lock_set(); diff --git a/sql/backends/monet5/UDF/pyapi/pyapi.c b/sql/backends/monet5/UDF/pyapi/pyapi.c --- a/sql/backends/monet5/UDF/pyapi/pyapi.c +++ b/sql/backends/monet5/UDF/pyapi/pyapi.c @@ -68,8 +68,8 @@ static char *FunctionBasePath(void) return basepath; } -static MT_Lock pyapiLock; -static MT_Lock queryLock; +static MT_Lock pyapiLock MT_LOCK_INITIALIZER("pyapiLock"); +static MT_Lock queryLock MT_LOCK_INITIALIZER("queryLock"); static int pyapiInitialized = FALSE; int PYFUNCNAME(PyAPIInitialized)(void) { @@ -1300,9 +1300,16 @@ wrapup: str PYFUNCNAME(PyAPIprelude)(void *ret) { +#ifdef NEED_MT_LOCK_INIT + static int initialized = 0; + /* since we don't destroy the lock, only initialize it once */ + if (!initialized) { + MT_lock_init(, "pyapi_lock"); + MT_lock_init(, "query_lock"); + } +
MonetDB: Jul2017 - When destroying a lock, only remove it from t...
Changeset: 2f350cfbdd63 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f350cfbdd63 Modified Files: gdk/gdk_system.h Branch: Jul2017 Log Message: When destroying a lock, only remove it from the list, don't add copy. diffs (29 lines): diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h --- a/gdk/gdk_system.h +++ b/gdk/gdk_system.h @@ -224,20 +224,13 @@ gdk_export ATOMIC_TYPE volatile GDKlocks /* since the lock is in memory that is governed by the */ \ /* SQL storage allocator, and hence we have no control */ \ /* over when the lock is destroyed and the memory freed */ \ - if (0 && strncmp((l)->name, "sa_", 3) != 0) { \ - MT_Lock * volatile _p; \ - /* save a copy for statistical purposes */ \ - _p = GDKmalloc(sizeof(MT_Lock));\ + if (strncmp((l)->name, "sa_", 3) != 0) {\ + MT_Lock * volatile *_p; \ while (ATOMIC_TAS(GDKlocklistlock, dummy) != 0) \ ; \ - if (_p) { \ - memcpy(_p, l, sizeof(MT_Lock)); \ - _p->next = GDKlocklist; \ - GDKlocklist = _p; \ - } \ - for (_p = GDKlocklist; _p; _p = _p->next) \ - if (_p->next == (l)) { \ - _p->next = (l)->next; \ + for (_p = *_p; _p = &(*_p)->next) \ + if ((l) == *_p) { \ + *_p = (l)->next;\ break; \ } \ ATOMIC_CLEAR(GDKlocklistlock, dummy); \ ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: trails - Dealing continuous queries calls with the SQL ...
Changeset: 9b53c0dd6ad7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b53c0dd6ad7 Added Files: sql/backends/monet5/Tests/cqcreate.stable.err sql/backends/monet5/Tests/cqcreate.stable.out sql/backends/monet5/Tests/cquery06.stable.err sql/backends/monet5/Tests/cquery06.stable.out sql/backends/monet5/Tests/cquery07.stable.err sql/backends/monet5/Tests/cquery07.stable.out Modified Files: sql/backends/monet5/Tests/cqstream02.sql sql/backends/monet5/Tests/cqstream03.sql sql/backends/monet5/Tests/cqstream03.stable.err sql/backends/monet5/Tests/cquery00.stable.err sql/backends/monet5/Tests/cquery05.sql sql/backends/monet5/Tests/cquery10.sql sql/backends/monet5/Tests/cquery20.sql sql/backends/monet5/Tests/cquery20.stable.out sql/backends/monet5/sql_cquery.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_scenario.c sql/server/sql_parser.y sql/server/sql_qc.c sql/server/sql_qc.h Branch: trails Log Message: Dealing continuous queries calls with the SQL query cache. Default heartbeat increased to 1 second diffs (truncated from 574 to 300 lines): diff --git a/sql/backends/monet5/Tests/cqcreate.stable.err b/sql/backends/monet5/Tests/cqcreate.stable.err new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/cqcreate.stable.err @@ -0,0 +1,34 @@ +stderr of test 'cqcreate` in directory 'sql/backends/monet5` itself: + + +# 10:26:34 > +# 10:26:34 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=39287" "--set" "mapi_usock=/var/tmp/mtest-24395/.s.monetdb.39287" "--set" "monet_prompt=" "--forcemito" "--dbpath=/home/ferreira/MonetDB-trails/BUILD/var/MonetDB/mTests_sql_backends_monet5" +# 10:26:34 > + +# builtin opt gdk_dbpath = /home/ferreira/MonetDB-trails/BUILD/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 5 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 39287 +# cmdline opt mapi_usock = /var/tmp/mtest-24395/.s.monetdb.39287 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /home/ferreira/MonetDB-trails/BUILD/var/MonetDB/mTests_sql_backends_monet5 +# cmdline opt gdk_debug = 536870922 + +# 10:26:34 > +# 10:26:34 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24395" "--port=39287" +# 10:26:34 > + + +# 10:26:34 > +# 10:26:34 > "Done." +# 10:26:34 > + diff --git a/sql/backends/monet5/Tests/cqcreate.stable.out b/sql/backends/monet5/Tests/cqcreate.stable.out new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/cqcreate.stable.out @@ -0,0 +1,35 @@ +stdout of test 'cqcreate` in directory 'sql/backends/monet5` itself: + + +# 10:26:34 > +# 10:26:34 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=39287" "--set" "mapi_usock=/var/tmp/mtest-24395/.s.monetdb.39287" "--set" "monet_prompt=" "--forcemito" "--dbpath=/home/ferreira/MonetDB-trails/BUILD/var/MonetDB/mTests_sql_backends_monet5" +# 10:26:34 > + +# MonetDB 5 server v11.28.0 +# This is an unreleased version +# Serving database 'mTests_sql_backends_monet5', using 8 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers +# Found 15.499 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved +# Visit https://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://dhcp-120.eduroam.cwi.nl:39287/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-24395/.s.monetdb.39287 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +# MonetDB/Timetrails module loaded + +Ready. + +# 10:26:34 > +# 10:26:34 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24395" "--port=39287" +# 10:26:34 > + +#CREATE stream TABLE testing (a int); +#CREATE TABLE results (b int); +#CREATE PROCEDURE stressing() BEGIN INSERT INTO results SELECT a FROM testing; END; + +# 10:26:34 > +# 10:26:34 > "Done." +# 10:26:34 > + diff --git a/sql/backends/monet5/Tests/cqstream02.sql b/sql/backends/monet5/Tests/cqstream02.sql --- a/sql/backends/monet5/Tests/cqstream02.sql +++ b/sql/backends/monet5/Tests/cqstream02.sql @@ -17,10 +17,7 @@ insert into stmp10 values('2005-09-23 12 insert into stmp10 values('2005-09-23 12:34:28.000',1,13.0); insert into stmp10 values('2005-09-23 12:34:28.000',1,15.0); -start continuous sys.cq_collector(); - --- Run the query a few times -call cquery."cycles"(3); +start continuous