Changeset: b5e752803bac for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b5e752803bac
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/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
gdk/gdk_posix.c
gdk/gdk_private.h
gdk/gdk_storage.c
monetdb5/tests/mapi/Tests/perl_dbi.stable.out
sql/test/mapi/Tests/perl_dbi.stable.out
Branch: default
Log Message:
Merge with Oct2014 branch.
diffs (truncated from 558 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/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,
Proto => 'tcp'
) || die "!ERROR can't connect to $host:$port $!";
- $self->{piggyback} = "";
+ $self->{piggyback} = [];
+ $self->{skip_in} = 0;
#binmode($self->{socket},":utf8");
@@ -236,7 +237,7 @@ sub propertyTest {
sub getRow {
my ($self)= @_;
my $row = $self->{lines}[$self->{next}++];
- my @chars = split(//, $row);
+ my @chars = split(//, $row,3);
if ($chars[0] eq '!') {
$self->error($row);
@@ -278,6 +279,11 @@ sub getBlock {
my $block = $self->getblock();
@{$self->{lines}} = split(/\n/, $block);
+ # skip diagnostic messages before the header
+ shift @{$self->{lines}} while @{$self->{lines}} && $self->{lines}[0] =~
/\A#/;
+
+ die "implausible return from MonetDB: $self->{lines}[0]\n" if
$self->{lines}[0] =~ /\A[^ -~]/;
+
my $header = $self->{lines}[0];
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list