Changeset: 46eff133ff57 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=46eff133ff57
Added Files:
sql/test/BugTracker-2015/Tests/All
sql/test/BugTracker-2015/Tests/inet-ordering.Bug-3646.sql
sql/test/BugTracker-2015/Tests/inet-ordering.Bug-3646.stable.err
sql/test/BugTracker-2015/Tests/inet-ordering.Bug-3646.stable.out
sql/test/BugTracker-2015/Tests/sharp-alias.Bug-3467.sql
sql/test/BugTracker-2015/Tests/sharp-alias.Bug-3467.stable.err
sql/test/BugTracker-2015/Tests/sharp-alias.Bug-3467.stable.out
Modified Files:
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
buildtools/doc/windowsbuild.rst
clients/ChangeLog.Oct2014
clients/Tests/exports.stable.out
clients/mapilib/mapi.c
clients/odbc/driver/SQLGetConnectOption.c
clients/odbc/driver/SQLSetConnectOption.c
clients/perl/DBD/monetdb.pm
clients/perl/Mapi.pm
clients/perl/MonetDB-CLI-MapiPP/MonetDB/CLI/MapiPP.pm
common/stream/stream.c
gdk/gdk.h
gdk/gdk_bbp.c
gdk/gdk_calc.c
gdk/gdk_cand.h
gdk/gdk_posix.c
gdk/gdk_private.h
gdk/gdk_storage.c
monetdb5/modules/atoms/inet.c
monetdb5/modules/atoms/inet.h
monetdb5/modules/atoms/inet.mal
monetdb5/tests/mapi/Tests/perl_dbi.stable.out
sql/backends/monet5/sql_result.c
sql/test/mapi/Tests/perl_dbi.stable.out
tools/merovingian/daemon/connections.c
tools/merovingian/daemon/controlrunner.c
tools/merovingian/daemon/discoveryrunner.c
Branch: resultset
Log Message:
Merge with default
diffs (truncated from 1164 to 300 lines):
diff --git a/NT/installer32/MonetDB-ODBC-Installer.vdproj
b/NT/installer32/MonetDB-ODBC-Installer.vdproj
--- a/NT/installer32/MonetDB-ODBC-Installer.vdproj
+++ b/NT/installer32/MonetDB-ODBC-Installer.vdproj
@@ -330,7 +330,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_779449EF5BAD4B068A50802402E52278"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\bin\\libeay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\bin\\libeay32.dll"
"TargetName" = "8:libeay32.dll"
"Tag" = "8:"
"Folder" = "8:_376EC0506E4F452CA2C78ACE11515435"
@@ -370,7 +370,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B1B1C0011D7945F892A77F529772EA72"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\bin\\ssleay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\bin\\ssleay32.dll"
"TargetName" = "8:ssleay32.dll"
"Tag" = "8:"
"Folder" = "8:_376EC0506E4F452CA2C78ACE11515435"
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
@@ -1806,7 +1806,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2E0FEE7726DA47369758C263666F3DB1"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\lib\\libeay32.lib"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\lib\\libeay32.lib"
"TargetName" = "8:libeay32.lib"
"Tag" = "8:"
"Folder" = "8:_A3C9BE5CA72B42628868618D180581DA"
@@ -2066,7 +2066,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_45C820B6483D494EBFE6F9A28A30760C"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\bin\\ssleay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\bin\\ssleay32.dll"
"TargetName" = "8:ssleay32.dll"
"Tag" = "8:"
"Folder" = "8:_1EC19BD0D849484790DB6A7D69758E24"
@@ -2446,7 +2446,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_732094CE07974147A084EDD6A5F43C6F"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\lib\\ssleay32.lib"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\lib\\ssleay32.lib"
"TargetName" = "8:ssleay32.lib"
"Tag" = "8:"
"Folder" = "8:_A3C9BE5CA72B42628868618D180581DA"
@@ -4006,7 +4006,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E80B0549492B4D76B7EB93941A6BF89D"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win32\\bin\\libeay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win32\\bin\\libeay32.dll"
"TargetName" = "8:libeay32.dll"
"Tag" = "8:"
"Folder" = "8:_1EC19BD0D849484790DB6A7D69758E24"
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
@@ -330,7 +330,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_779449EF5BAD4B068A50802402E52278"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\bin\\libeay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\bin\\libeay32.dll"
"TargetName" = "8:libeay32.dll"
"Tag" = "8:"
"Folder" = "8:_376EC0506E4F452CA2C78ACE11515435"
@@ -370,7 +370,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B1B1C0011D7945F892A77F529772EA72"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\bin\\ssleay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\bin\\ssleay32.dll"
"TargetName" = "8:ssleay32.dll"
"Tag" = "8:"
"Folder" = "8:_376EC0506E4F452CA2C78ACE11515435"
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
@@ -1786,7 +1786,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2E0FEE7726DA47369758C263666F3DB1"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\lib\\libeay32.lib"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\lib\\libeay32.lib"
"TargetName" = "8:libeay32.lib"
"Tag" = "8:"
"Folder" = "8:_A3C9BE5CA72B42628868618D180581DA"
@@ -2066,7 +2066,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_45C820B6483D494EBFE6F9A28A30760C"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\bin\\ssleay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\bin\\ssleay32.dll"
"TargetName" = "8:ssleay32.dll"
"Tag" = "8:"
"Folder" = "8:_1EC19BD0D849484790DB6A7D69758E24"
@@ -2426,7 +2426,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_732094CE07974147A084EDD6A5F43C6F"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\lib\\ssleay32.lib"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\lib\\ssleay32.lib"
"TargetName" = "8:ssleay32.lib"
"Tag" = "8:"
"Folder" = "8:_A3C9BE5CA72B42628868618D180581DA"
@@ -3966,7 +3966,7 @@
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E80B0549492B4D76B7EB93941A6BF89D"
{
- "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1j.win64\\bin\\libeay32.dll"
+ "SourcePath" =
"8:C:\\Libraries\\openssl-1.0.1k.win64\\bin\\libeay32.dll"
"TargetName" = "8:libeay32.dll"
"Tag" = "8:"
"Folder" = "8:_1EC19BD0D849484790DB6A7D69758E24"
diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst
--- a/buildtools/doc/windowsbuild.rst
+++ b/buildtools/doc/windowsbuild.rst
@@ -295,17 +295,17 @@ required for the MonetDB5 component, and
the clients component when it needs to talk to a MonetDB5 server.
Download the source from http://www.openssl.org/. We used the latest
-stable version (1.0.1j). Follow the instructions in the file
+stable version (1.0.1k). Follow the instructions in the file
``INSTALL.W32`` or ``INSTALL.W64``. We used the option
``enable-static-engine`` as described in the instructions.
.. The actual commands used were::
- perl Configure VC-WIN32 no-asm enable-static-engine
--prefix=C:\Libraries\openssl-1.0.1j.win32
+ perl Configure VC-WIN32 no-asm enable-static-engine
--prefix=C:\Libraries\openssl-1.0.1k.win32
ms\do_ms.bat
nmake /f ms\ntdll.mak
nmake /f ms\ntdll.mak install
and::
- perl Configure VC-WIN64A enable-static-engine
--prefix=C:\Libraries\openssl-1.0.1j.win64
+ perl Configure VC-WIN64A enable-static-engine
--prefix=C:\Libraries\openssl-1.0.1k.win64
ms\do_win64a
nmake /f ms\ntdll.mak
nmake /f ms\ntdll.mak install
diff --git a/clients/ChangeLog.Oct2014 b/clients/ChangeLog.Oct2014
--- a/clients/ChangeLog.Oct2014
+++ b/clients/ChangeLog.Oct2014
@@ -1,3 +1,30 @@
# ChangeLog file for clients
# This file is updated with Maddlog
+* Tue Jan 13 2015 Sjoerd Mullender <[email protected]>
+- Changes to the Perl interface, thanks to Stefan O'Rear:
+ 1. removes "use sigtrap", because this has global effects and should
+ not be used by modules, only by the application.
+ 2. allows Perl 5.8.1+ Unicode strings to be passed to quote() and
+ included in statements (UTF-8 encoded, as expected by Monet's str
+ module)
+ 3. quote and unquote now use the same quoting rules as the MonetDB
+ server, allowing for all characters except NUL to be round-tripped
+ 4. several character loops have been reimplemented in regex for much
+ greater performance
+ 5. micro-optimizations to the result fetch loop
+ 6. block boundaries are preserved in piggyback data so that Xclose is
+ not appended or prepended to a SQL command
+ 7. diagnostic messages #foo before a result header are ignored, this
+ is necessary to use recycler_pipe
+ 8. fail quickly and loudly if we receive a continuation prompt (or any
+ other response that starts with a non-ASCII character)
+ 9. header lines must start with %, not merely contain %, fixing a bug
+ when querying a table where string values contain %
+ 10. after closing a large resultset, account for the fact that a reply
+ will come and do not lose sync
+ 11. allow a MAPI_TRACE environment variable to dump wire protocol
+ frames to standard output
+ 12. fixes maximum MAPI block size to match the server limit of 16k.
+ previously would crash on blocks larger than 16k
+
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1307,6 +1307,7 @@ str INET_inet(inet *d, inet *s);
str INET_isnil(bit *retval, inet *val);
str INETabbrev(str *retval, inet *val);
str INETbroadcast(inet *retval, inet *val);
+int INETcompare(inet *l, inet *r);
int INETfromString(str src, int *len, inet **retval);
str INEThost(str *retval, inet *val);
str INEThostmask(inet *retval, inet *val);
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4279,7 +4279,11 @@ mapi_query_part(MapiHdl hdl, const char
mid->active = hdl;
/* remember the query just for the error messages */
if (hdl->query == NULL) {
- hdl->query = strdup(query);
+ hdl->query = malloc(size + 1);
+ if (hdl->query) {
+ strncpy(hdl->query, query, size);
+ hdl->query[size] = 0;
+ }
} else {
size_t sz = strlen(hdl->query);
char *q;
diff --git a/clients/odbc/driver/SQLGetConnectOption.c
b/clients/odbc/driver/SQLGetConnectOption.c
--- a/clients/odbc/driver/SQLGetConnectOption.c
+++ b/clients/odbc/driver/SQLGetConnectOption.c
@@ -40,7 +40,7 @@
#ifdef _MSC_VER
/* can't call them by their real name with Visual Studio 12.0 since we
* would then get a warning which we translate to an error during
- * compilation (also see ODBS.syms) */
+ * compilation (also see ODBC.syms) */
#define SQLGetConnectOption SQLGetConnectOption_deprecated
#define SQLGetConnectOptionA SQLGetConnectOptionA_deprecated
#define SQLGetConnectOptionW SQLGetConnectOptionW_deprecated
diff --git a/clients/odbc/driver/SQLSetConnectOption.c
b/clients/odbc/driver/SQLSetConnectOption.c
--- a/clients/odbc/driver/SQLSetConnectOption.c
+++ b/clients/odbc/driver/SQLSetConnectOption.c
@@ -44,7 +44,7 @@
#ifdef _MSC_VER
/* can't call them by their real name with Visual Studio 12.0 since we
* would then get a warning which we translate to an error during
- * compilation (also see ODBS.syms) */
+ * compilation (also see ODBC.syms) */
#define SQLSetConnectOption SQLSetConnectOption_deprecated
#define SQLSetConnectOptionA SQLSetConnectOptionA_deprecated
#define SQLSetConnectOptionW SQLSetConnectOptionW_deprecated
diff --git a/clients/perl/DBD/monetdb.pm b/clients/perl/DBD/monetdb.pm
--- a/clients/perl/DBD/monetdb.pm
+++ b/clients/perl/DBD/monetdb.pm
@@ -1,8 +1,8 @@
package DBD::monetdb;
use strict;
-use sigtrap;
use DBI();
+use Encode();
use MonetDB::CLI();
our $VERSION = '0.10';
@@ -99,11 +99,11 @@ sub quote {
return $dbh->{monetdb_language} eq 'sql' ? 'NULL' : 'nil'
unless defined $value;
+ $value = Encode::encode_utf8($value);
+
for ($value) {
- s/ /\\t/g;
s/\\/\\\\/g;
s/\n/\\n/g;
- s/\r/\\r/g;
s/"/\\"/g;
s/'/''/g;
}
@@ -122,22 +122,15 @@ sub quote {
sub _count_param {
- my @statement = split //, shift;
+ my $statement = shift;
my $num = 0;
- while (defined(my $c = shift @statement)) {
- if ($c eq '"' || $c eq "'") {
- my $end = $c;
- while (defined(my $c = shift @statement)) {
- last if $c eq $end;
- @statement = splice @statement, 2 if $c eq '\\';
- }
- }
- elsif ($c eq '?') {
- $num++;
- }
- }
- return $num;
+ $statement =~ s{
+ ' (?: \\. | [^\\']++ )*+ ' |
+ " (?: \\. | [^\\"]++ )*+ '
+ }{}gx;
+
+ return $statement =~ tr/?/?/;
}
@@ -614,7 +607,7 @@ sub fetch {
$sth->set_err(-1, $@) if $@;
return;
}
- my @row = map $hdl->field($_), 0 .. $field_count-1;
+ my @row = map $hdl->{currow}[$_], 0 .. $field_count-1; # encapsulation
break but saves a microsecond per cell
map { s/\s+$// } @row if $sth->FETCH('ChopBlanks');
$sth->{monetdb_rows}++;
diff --git a/clients/perl/Mapi.pm b/clients/perl/Mapi.pm
--- a/clients/perl/Mapi.pm
+++ b/clients/perl/Mapi.pm
@@ -96,7 +96,8 @@ sub new {
PeerPort => $port,
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list