Hello community,
here is the log from the commit of package perl-DBD-mysql for openSUSE:Factory
checked in at Mon Apr 19 00:26:37 CEST 2010.
--------
--- perl-DBD-mysql/perl-DBD-mysql.changes 2010-01-15 16:17:24.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-DBD-mysql/perl-DBD-mysql.changes 2010-04-16 22:55:21.000000000 +0200
@@ -1,0 +2,25 @@
+Fri Apr 16 20:48:04 UTC 2010 - chris@computersalat.de
+
+- update to 4.014
+ * BUG 30033 Fixed handling of comments to allow comments that
+ contain characters that might otherwise cause placeholder
+ detection to not work properly
+ * BUG 53844, Fix for memory leak in stats. (Gregory Burmistrov)
+ * BUG 49719, Fix for handling of NULLs in prepared statements
+ (Gert Pache)
+ * BUG 55627, Fix for testing failure due to strict mode (Yves)
+ * BUG 51784, Fix for mysqladmin on Windows in Makefile
+ (Zeeshan Muhammad)
+ * BUG 41630, Typo in Makefile
+ * Had to define true and false in dbdimp.h. Didn't work out of
+ the box on Linux
+- cleanup spec
+ * recreated with cpanspec
+ * disabled old Provides/Obsoletes
+ mysqperl perl-Msql-Mysql-modules
+ * added eg to doc
+- rpmlint
+ * file permission
+ o chmod a-x on several files
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
DBD-mysql-4.013.tar.bz2
New:
----
DBD-mysql-4.014.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DBD-mysql.spec ++++++
--- /var/tmp/diff_new_pack.bRPMda/_old 2010-04-19 00:26:17.000000000 +0200
+++ /var/tmp/diff_new_pack.bRPMda/_new 2010-04-19 00:26:17.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-DBD-mysql (Version 4.013)
+# spec file for package perl-DBD-mysql (Version 4.014)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,25 +19,38 @@
Name: perl-DBD-mysql
-BuildRequires: mysql-devel perl-DBI perl-Data-ShowTable
-Url: http://cpan.org/modules/by-module/DBD/
-License: Artistic License ..
-Group: Development/Libraries/Perl
-Obsoletes: mysqperl perl-Msql-Mysql-modules
-Provides: mysqperl perl-Msql-Mysql-modules
-Requires: perl-DBI perl-Data-ShowTable
-Requires: perl = %{perl_version}
-AutoReqProv: on
-Version: 4.013
+%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
+Summary: MySQL driver for the Perl5 Database Interface (DBI)
+Version: 4.014
Release: 1
-Summary: Interface to the MySQL database
+License: Artistic License ..
Group: Development/Libraries/Perl
-Source: http://www.cpan.org/modules/by-module/Mysql/DBD-mysql-%{version}.tar.bz2
+Url: http://search.cpan.org/dist/DBD-mysql
+Source: %{cpan_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%define _prefix /usr
+BuildRequires: mysql-devel
+BuildRequires: perl
+%if 0%{?suse_version} < 1120
+BuildRequires: perl-macros
+%endif
+BuildRequires: perl(DBI)
+BuildRequires: perl(Data::ShowTable)
+#
+Requires: perl = %{perl_version}
+Requires: perl(DBI)
+Requires: perl(Data::ShowTable)
+## FIXME: is this really still needed
+# then enable again
+#Provides: mysqperl perl-Msql-Mysql-modules
+#Obsoletes: mysqperl perl-Msql-Mysql-modules
%description
-A Perl5 Database Interface to the MySQL database
+DBD::mysql is the Perl5 Database Interface driver for the MySQL
+database. In other words: DBD::mysql is an interface between the Perl
+programming language and the MySQL programming API that comes with
+the MySQL relational database management system. Most functions
+provided by this programming API are supported. Some rarely used
+functions are missing, mainly because noone ever requested them. :-)
@@ -46,32 +59,31 @@
Jochen Wiedmann
%prep
-%setup -q -n DBD-mysql-%{version}
-chmod a-x ChangeLog README INSTALL.html
+%setup -q -n %{cpan_name}-%{version}
+## rpmlint
+# fix file permission
+chmod a-x ChangeLog README INSTALL.html eg/*
+chmod a-x lib/Bundle/DBD/mysql.pm
+chmod a-x lib/DBD/mysql.pm
+chmod a-x lib/DBD/mysql/INSTALL.pod
%build
-perl Makefile.PL --verbose
-make %{?_smp_mflags}
-#make test
+%{__perl} Makefile.PL INSTALLDIRS=vendor --cflags="-I%{_includedir}/mysql $RPM_OPT_FLAGS"
+%{__make} %{?_smp_mflags}
+
+#check
+#{__make} test
%install
%perl_make_install
%perl_process_packlist
-chmod a-x $RPM_BUILD_ROOT/%{perl_vendorarch}//Bundle/DBD/mysql.pm
-chmod a-x $RPM_BUILD_ROOT/%{perl_vendorarch}/DBD/mysql.pm
-chmod a-x $RPM_BUILD_ROOT/%{perl_vendorarch}/DBD/mysql/INSTALL.pod
+%perl_gen_filelist
%clean
-# Clear up the mess
-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf $RPM_BUILD_ROOT
-%files
+%files -f %{name}.files
%defattr(-, root, root)
-%doc ChangeLog README INSTALL.html TODO
-%doc %{_mandir}/man?/*
-%{perl_vendorarch}/auto/DBD
-%{perl_vendorarch}/Bundle/DBD
-%{perl_vendorarch}/DBD
-/var/adm/perl-modules/perl-DBD-mysql
+%doc ChangeLog README INSTALL.html TODO eg
%changelog
++++++ DBD-mysql-4.013.tar.bz2 -> DBD-mysql-4.014.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/ChangeLog new/DBD-mysql-4.014/ChangeLog
--- old/DBD-mysql-4.013/ChangeLog 2009-09-16 18:27:55.000000000 +0200
+++ new/DBD-mysql-4.014/ChangeLog 2010-04-15 05:09:40.000000000 +0200
@@ -1,7 +1,16 @@
+2010-04-14 Patrick Galbraith (4.014)
+* BUG 30033 Fixed handling of comments to allow comments that contain characters
+ that might otherwise cause placeholder detection to not work properly
+* BUG 53844, Fix for memory leak in stats. (Gregory Burmistrov)
+* BUG 49719, Fix for handling of NULLs in prepared statements (Gert Pache)
+* BUG 55627, Fix for testing failure due to strict mode (Yves)
+* BUG 51784, Fix for mysqladmin on Windows in Makefile (Zeeshan Muhammad)
+* BUG 41630, Typo in Makefile
+* Had to define true and false in dbdimp.h. Didn't work out of the box on Linux
+
2009-09-16 Patrick Galbraith (4.013)
-* #49484: PATCH add support for MYSQL_INIT_COMMAND to
-DBD::mysql - Thanks Peter John Edwards ?
+* #49484: PATCH add support for MYSQL_INIT_COMMAND - Peter John Edwards
* #48242: 'mysql_bind_type_guessing' doesn't work correctly
with minus sign - Thanks Serguei Trouchelle!
* #45616: t/40blobs.t cannot pass without database access -
@@ -1129,7 +1138,7 @@
* lib/Msql/Statement.pm: Fixed use of Msql::TEXT_TYPE without
checking whether we are running Msql 1.
-$Id: ChangeLog 12860 2009-06-19 01:52:29Z capttofu $
+$Id$
DBD::mysql for DBI - Written by Jochen Wiedmann
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/INSTALL.html new/DBD-mysql-4.014/INSTALL.html
--- old/DBD-mysql-4.013/INSTALL.html 2009-09-16 20:33:28.000000000 +0200
+++ new/DBD-mysql-4.014/INSTALL.html 2010-04-15 05:10:23.000000000 +0200
@@ -4,7 +4,7 @@
<head>
<title>INSTALL - How to install and configure DBD::mysql</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:root@localhost" />
+<link rev="made" href="mailto:_mdnsresponder@b87.apple.com" />
</head>
<body style="background-color: white">
@@ -88,7 +88,7 @@
<hr />
<h1><a name="prerequisites">PREREQUISITES</a></h1>
<dl>
-<dt><strong><a name="item_perl">Perl</a></strong></dt>
+<dt><strong><a name="item_perl">Perl</a></strong>
<dd>
<p>Preferrably a version of Perl, that comes preconfigured with
@@ -96,7 +96,8 @@
come with Perl. For Windows, ActivePerl is recommended, see
<a href="http://www.activestate.com">http://www.activestate.com</a> for details.</p>
</dd>
-<dt><strong><a name="item_mysql">MySQL</a></strong></dt>
+</li>
+<dt><strong><a name="item_mysql">MySQL</a></strong>
<dd>
<p>You need not install the actual MySQL database server, the
@@ -106,8 +107,12 @@
to find exact package names). These are sufficient, if the MySQL
server is located on a foreign machine. You may also create client
files by compiling from the MySQL source distribution and using</p>
+</dd>
+<dd>
<pre>
configure --without-server</pre>
+</dd>
+<dd>
<p>If you are using Windows and need to compile from sources
(which is only the case if you are not using ActivePerl),
then you must ensure that the header and library files are
@@ -115,14 +120,16 @@
and selecting the appropriate option when running the
MySQL setup program.</p>
</dd>
-<dt><strong><a name="item_dbi">DBI</a></strong></dt>
+</li>
+<dt><strong><a name="item_dbi">DBI</a></strong>
<dd>
<p>DBD::mysql is a DBI driver, hence you need DBI. It is available
from the same source where you got the DBD::mysql distribution
from.</p>
</dd>
-<dt><strong><a name="item_c_compiler">C compiler</a></strong></dt>
+</li>
+<dt><strong><a name="item_c_compiler">C compiler</a></strong>
<dd>
<p>A C compiler is only required, if you install from source. In
@@ -131,17 +138,21 @@
it is the same C compiler that was used for compiling Perl and
MySQL! Otherwise you will almost definitely encounter problems
because of differences in the underlying C runtime libraries.</p>
+</dd>
+<dd>
<p>In the worst case, this might mean to compile Perl and MySQL
yourself. But believe me, experience shows that a lot of problems
are fixed this way.</p>
</dd>
-<dt><strong><a name="item_gzip_libraries">Gzip libraries</a></strong></dt>
+</li>
+<dt><strong><a name="item_gzip_libraries">Gzip libraries</a></strong>
<dd>
<p>Late versions of MySQL come with support for compression. Thus
it <strong>may</strong> be required that you have install an RPM package like
libz-devel, libgz-devel or something similar.</p>
</dd>
+</li>
</dl>
<p>
</p>
@@ -315,75 +326,107 @@
This is described later on.</p>
<p>Available switches are:</p>
<dl>
-<dt><strong><a name="item_testdb">testdb</a></strong></dt>
+<dt><strong><a name="item_testdb">testdb</a></strong>
<dd>
<p>Name of the test database, defaults to <strong>test</strong>.</p>
</dd>
-<dt><strong><a name="item_testuser">testuser</a></strong></dt>
+</li>
+<dt><strong><a name="item_testuser">testuser</a></strong>
<dd>
<p>Name of the test user, defaults to empty. If the name is empty,
then the currently logged in users name will be used.</p>
</dd>
-<dt><strong><a name="item_testpassword">testpassword</a></strong></dt>
+</li>
+<dt><strong><a name="item_testpassword">testpassword</a></strong>
<dd>
<p>Password of the test user, defaults to empty.</p>
</dd>
-<dt><strong><a name="item_testhost">testhost</a></strong></dt>
+</li>
+<dt><strong><a name="item_testhost">testhost</a></strong>
<dd>
<p>Host name or IP number of the test database; defaults to localhost.</p>
</dd>
-<dt><strong><a name="item_testport">testport</a></strong></dt>
+</li>
+<dt><strong><a name="item_testport">testport</a></strong>
<dd>
<p>Port number of the test database</p>
</dd>
-<dt><strong><a name="item_ps_2dprotcol_3d1_or_0">ps-protcol=1 or 0</a></strong></dt>
+</li>
+<dt><strong><a name="item_ps_2dprotcol_3d1_or_0">ps-protcol=1 or 0</a></strong>
<dd>
<p>Whether to run the test suite using server prepared statements or driver
emulated prepared statemetns. ps-protocol=1 means use server prepare,
ps-protocol=0 means driver emulated.</p>
</dd>
-<dt><strong><a name="item_cflags">cflags</a></strong></dt>
+</li>
+<dt><strong><a name="item_cflags">cflags</a></strong>
<dd>
<p>This is a list of flags that you want to give to the C compiler.
The most important flag is the location of the MySQL header files.
For example, on Red Hat Linux the header files are in /usr/include/mysql
and you might try</p>
+</dd>
+<dd>
<pre>
-I/usr/include/mysql</pre>
+</dd>
+<dd>
<p>On Windows the header files may be in C:\mysql\include and you might try</p>
+</dd>
+<dd>
<pre>
-IC:\mysql\include</pre>
+</dd>
+<dd>
<p>The default flags are determined by running</p>
+</dd>
+<dd>
<pre>
mysql_config --cflags</pre>
+</dd>
+<dd>
<p>More details on the C compiler flags can be found in the following
section. <a href="#compiler_flags">Compiler flags</a>.</p>
</dd>
-<dt><strong><a name="item_libs">libs</a></strong></dt>
+</li>
+<dt><strong><a name="item_libs">libs</a></strong>
<dd>
<p>This is a list of flags that you want to give to the linker
or loader. The most important flags are the locations and names
of additional libraries. For example, on Red Hat Linux your
MySQL client libraries are in /usr/lib/mysql and you might try</p>
+</dd>
+<dd>
<pre>
-L/usr/lib/mysql -lmysqlclient -lz</pre>
+</dd>
+<dd>
<p>On Windows the libraries may be in C:\mysql\lib and</p>
+</dd>
+<dd>
<pre>
-LC:\mysql\lib -lmysqlclient</pre>
+</dd>
+<dd>
<p>might be a good choice. The default flags are determined by running</p>
+</dd>
+<dd>
<pre>
mysql_config --libs</pre>
+</dd>
+<dd>
<p>More details on the linker flags can be found in a separate section.
<a href="#linker_flags">Linker flags</a>.</p>
</dd>
+</li>
</dl>
<p>If a switch is not present on the command line, then the
script <code>mysql_config</code> will be executed. This script comes
@@ -445,34 +488,52 @@
<p>The following items typically need to be configured for the
linker:</p>
<dl>
-<dt><strong><a name="item_the_mysqlclient_library">The mysqlclient library</a></strong></dt>
+<dt><strong><a name="item_the_mysqlclient_library">The mysqlclient library</a></strong>
<dd>
<p>The MySQL client library comes as part of the MySQL distribution.
Depending on your system it may be a file called</p>
+</dd>
+<dd>
<pre>
F<libmysqlclient.a> statically linked library, Unix
F<libmysqlclient.so> dynamically linked library, Unix
F<mysqlclient.lib> statically linked library, Windows
F<mysqlclient.dll> dynamically linked library, Windows</pre>
+</dd>
+<dd>
<p>or something similar.</p>
+</dd>
+<dd>
<p>As in the case of the header files, the client library is typically
not installed by default. On Windows you will need to select them
while running the MySQL setup program (Custom installation). On
Red Hat Linux an RPM archive <em>mysql-devel</em> or <em>MySQL-devel</em> must
be installed.</p>
+</dd>
+<dd>
<p>The linker needs to know the location and name of the mysqlclient
library. This can be done by adding the flags</p>
+</dd>
+<dd>
<pre>
-L<lib directory> -lmysqlclient</pre>
+</dd>
+<dd>
<p>or by adding the complete path name. Examples:</p>
+</dd>
+<dd>
<pre>
-L/usr/lib/mysql -lmysqlclient
-LC:\mysql\lib -lmysqlclient</pre>
+</dd>
+<dd>
<p>If you would like to use the static libraries (and there are
excellent reasons to do so), you need to create a separate
directory, copy the static libraries to that place and use
the -L switch above to point to your new directory. For example:</p>
+</dd>
+<dd>
<pre>
mkdir /tmp/mysql-static
cp /usr/lib/mysql/*.a /tmp/mysql-static
@@ -482,20 +543,28 @@
make install
rm -rf /tmp/mysql-static</pre>
</dd>
-<dt><strong><a name="item_the_gzip_library">The gzip library</a></strong></dt>
+</li>
+<dt><strong><a name="item_the_gzip_library">The gzip library</a></strong>
<dd>
<p>The MySQL client can use compression when talking to the MySQL
server, a nice feature when sending or receiving large texts over
a slow network.</p>
+</dd>
+<dd>
<p>On Unix you typically find the appropriate file name by running</p>
+</dd>
+<dd>
<pre>
ldconfig -p | grep libz
ldconfig -p | grep libgz</pre>
+</dd>
+<dd>
<p>Once you know the name (libz.a or libgz.a is best), just add it
to the list of linker flags. If this seems to be causing problem
you may also try to link without gzip libraries.</p>
</dd>
+</li>
</dl>
<p>
</p>
@@ -529,53 +598,64 @@
unstable.</p>
<p>Install MySQL (if you havn't already)</p>
<dl>
-<dt><strong><a name="item__2d">-</a></strong></dt>
+<dt><strong><a name="item__2d">-</a></strong>
<dd>
<p>download the MySQL Windows Binaries from
<a href="http://www.mysql.com/downloads/index.html">http://www.mysql.com/downloads/index.html</a></p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>unzip mysql-<version>-win.zip into some temporary location</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>start the setup.exe there and follow the instructions</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>start the server</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>alternatively download, install and start the server on a remote
server, on what supported OS ever</p>
</dd>
+</li>
</dl>
<p>Build MySQL clients under Cygwin:</p>
<dl>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<p>download the MySQL LINUX source from
<a href="http://www.mysql.com/downloads/index.html">http://www.mysql.com/downloads/index.html</a></p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>unpack mysql-<version>.tar.gz into some tmp location</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>cd into the unpacked dir mysql-<version></p>
+</dd>
+<dd>
<pre>
./configure --prefix=/usr/local/mysql --without-server</pre>
+</dd>
+<dd>
<p>This prepares the Makefile with the installed Cygwin features. It
takes some time, but should finish without error. The 'prefix', as
given, installs the whole Cygwin/MySQL thingy into a location not
@@ -583,35 +663,46 @@
Windows binaries. The --without-server parameter tells configure to
only build the clients.</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<pre>
make</pre>
+</dd>
+<dd>
<p>This builds all MySQL client parts ... be patient. It should finish
finally without any error.</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
make install</pre>
+</dd>
+<dd>
<p>This installs the compiled client files under /usr/local/mysql/.
Remember, you don't need anything except the library under
/usr/local/mysql/lib and the headers under /usr/local/mysql/include!</p>
+</dd>
+<dd>
<p>Essentially you are now done with this part. If you want, you may try
your compiled binaries shortly; for that, do:</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
cd /usr/local/mysql/bin
./mysql -h 127.0.0.1</pre>
+</dd>
+<dd>
<p>The host (-h) parameter 127.0.0.1 targets the local host, but forces
the mysql client to use a TCP/IP connection. The default would be a
pipe/socket connection (even if you say '-h localhost') and this
doesn't work between Cygwin and Windows (as far as I know).</p>
+</dd>
+<dd>
<p>If you have your MySQL server running on some other box, then please
substitute '127.0.0.1' with the name or IP-number of that box.</p>
</dd>
@@ -630,64 +721,77 @@
<p>You are now ready to build DBD::mysql!</p>
<p>Build DBD::mysql:</p>
<dl>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<p>download DBD-mysql-<version>.tar.gz from CPAN</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>unpack DBD-mysql-<version>.tar.gz</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<p>cd into unpacked dir DBD-mysql-<version>
you probably did that already, if you are reading this!</p>
</dd>
-<dt><strong>-</strong></dt>
+</li>
+<dt><strong>-</strong>
<dd>
<pre>
cp /usr/local/mysql/bin/mysql_config .</pre>
+</dd>
+<dd>
<p>This copies the executable script mentioned in the DBD::mysql docs
from your just built Cywin/MySQL client directory; it knows about
your Cygwin installation, especially about the right libraries to link
with.</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
perl Makefile.PL --testhost=127.0.0.1</pre>
+</dd>
+<dd>
<p>The --testhost=127.0.0.1 parameter again forces a TCP/IP connection
to the MySQL server on the local host instead of a pipe/socket
connection for the 'make test' phase.</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
make</pre>
+</dd>
+<dd>
<p>This should run without error</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
make test</pre>
+</dd>
+<dd>
<p>with DBD-mysql-2.1022 or earlier you will see several errors in
dbdadmin.t, mysql.t and mysql2.t; with later versions you should not
get errors (except possibly one, indicating, that some tables could
not be dropped. I'm hunting for a solution to that problem, but have
none yet).</p>
</dd>
-<dt><strong>-</strong></dt>
+<dt><strong>-</strong>
<dd>
<pre>
make install</pre>
+</dd>
+<dd>
<p>This installs DBD::mysql into the Perl hierarchy.</p>
</dd>
</dl>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/MANIFEST new/DBD-mysql-4.014/MANIFEST
--- old/DBD-mysql-4.013/MANIFEST 2009-09-16 18:24:55.000000000 +0200
+++ new/DBD-mysql-4.014/MANIFEST 2010-04-14 19:43:16.000000000 +0200
@@ -36,12 +36,14 @@
t/40server_prepare.t
t/40server_prepare_error.t
t/40types.t
+t/40nulls_prepare.t
t/41bindparam.t
t/41blobs_prepare.t
t/42bindparam.t
t/50chopblanks.t
t/50commit.t
t/51bind_type_guessing.t
+t/52comment.t
t/55utf8.t
t/60leaks.t
t/65types.t
@@ -54,6 +56,7 @@
t/lib.pl
t/mysql.dbtest
t/mysql.mtest
+t/mem_leak.pl
TODO
myld
constants.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/META.yml new/DBD-mysql-4.014/META.yml
--- old/DBD-mysql-4.013/META.yml 2009-09-16 20:33:28.000000000 +0200
+++ new/DBD-mysql-4.014/META.yml 2010-04-15 05:10:23.000000000 +0200
@@ -1,12 +1,23 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: DBD-mysql
-version: 4.013
-version_from: lib/DBD/mysql.pm
-installdirs: site
+--- #YAML:1.0
+name: DBD-mysql
+version: 4.014
+abstract: A MySQL driver for the Perl5 Database Interface (DBI)
+author:
+ - Rudy Lippan
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- Data::Dumper: 0
- DBI: 1.08
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+ Data::Dumper: 0
+ DBI: 1.08
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/Makefile.PL new/DBD-mysql-4.014/Makefile.PL
--- old/DBD-mysql-4.013/Makefile.PL 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/Makefile.PL 2010-04-14 21:54:29.000000000 +0200
@@ -504,7 +504,7 @@
You can also optionally set the user to run 'make test' with:
-perl Makefile.pl --testuser=username
+perl Makefile.PL --testuser=username
";
$opt->{$param} = $user;
@@ -775,7 +775,12 @@
}
$mysqladmin = Win32::GetShortPathName($mysqladmin);
- my $v = qx($mysqladmin version);
+ my $v;
+ if ( defined $opt->{'testuser'} and defined $opt->{'testpassword'}) {
+ $v = qx( sprintf('%s --user=%s --password=%s version', $mysqladmin , $opt->{'testuser'}, $opt->{'testpassword'}) );
+ } else {
+ $v = qx($mysqladmin version);
+ }
unless ($v) {
print STDERR "Problem running $mysqladmin - aborting ...\n";
exit(1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/dbdimp.c new/DBD-mysql-4.014/dbdimp.c
--- old/DBD-mysql-4.013/dbdimp.c 2009-09-16 16:26:13.000000000 +0200
+++ new/DBD-mysql-4.014/dbdimp.c 2010-04-15 05:01:50.000000000 +0200
@@ -63,15 +63,103 @@
static int
count_params(char *statement)
{
- char* ptr = statement;
- int num_params = 0;
+ bool comment_end= false;
+ char* ptr= statement;
+ int num_params= 0;
+ int comment_length= 0;
char c;
+
if (dbis->debug >= 2)
PerlIO_printf(DBILOGFP, ">count_params statement %s\n", statement);
while ( (c = *ptr++) )
{
switch (c) {
+ /* so, this is a -- comment, so let's burn up characters */
+ case '-':
+ {
+ comment_length= 1;
+ /* let's see if the next one is a dash */
+ c = *ptr++;
+
+ if (c == '-') {
+ /* if two dashes, ignore everything until newline */
+ while (c = *ptr)
+ {
+ if (dbis->debug >= 2)
+ PerlIO_printf(DBILOGFP, "%c\n", c);
+ ptr++;
+ comment_length++;
+ if (c == '\n')
+ {
+ comment_end= true;
+ break;
+ }
+ }
+ /*
+ so, if there was an end to the comment, increment by one more
+ to go past the new line
+
+ if not comment_end, the comment never ended and we need to iterate
+ back to the beginning of where we started and let the database
+ handle whatever is in the statement
+ */
+ if (comment_end)
+ ptr++;
+ else
+ ptr-= comment_length;
+ }
+ /* otherwise, only one dash/hyphen, backtrack by one */
+ else
+ ptr--;
+ break;
+ }
+ /* c-type comments */
+ case '/':
+ {
+ c = *ptr++;
+ /* let's check if the next one is an asterisk */
+ if (c == '*')
+ {
+ comment_length= 0;
+ comment_end= false;
+ /* ignore everything until closing comment */
+ while (c= *ptr)
+ {
+ ptr++;
+ comment_length++;
+
+ if (c == '*')
+ {
+ c = *ptr++;
+ /* alas, end of comment */
+ if (c == '/')
+ {
+ ptr++;
+ comment_end= true;
+ break;
+ }
+ /*
+ nope, just an asterisk, not so fast, not end of comment, go
+ back one
+ */
+ else
+ ptr--;
+ }
+ }
+ /*
+ if the end of the comment was never found, we have to backtrack
+ to whereever we first started skipping over the possible comment.
+ This means we will pass the statement to the database to see its own
+ fate and issue the error
+ */
+ if (!comment_end)
+ ptr -= comment_length;
+ }
+ else
+ ptr--;
+ break;
+ }
case '`':
case '"':
case '\'':
@@ -412,13 +500,14 @@
int num_params,
bool bind_type_guessing)
{
-
+ bool comment_end= false;
char *salloc, *statement_ptr;
char *statement_ptr_end, *ptr, *valbuf;
char *cp, *end;
int alen, i;
int slen= *slen_ptr;
int limit_flag= 0;
+ int comment_length=0;
STRLEN vallen;
imp_sth_ph_t *ph;
@@ -498,6 +587,73 @@
}
switch (*statement_ptr)
{
+ /* comment detection. Anything goes in a comment */
+ case '-':
+ {
+ comment_length= 1;
+ comment_end= false;
+ *ptr++ = *statement_ptr++;
+ if (*statement_ptr == '-')
+ {
+ /* ignore everything until newline */
+ while (*statement_ptr)
+ {
+ comment_length++;
+ *ptr++ = *statement_ptr++;
+ if (*statement_ptr == '\n')
+ {
+ comment_end= true;
+ break;
+ }
+ }
+ /* if comment end found, iterate past the \n */
+ if (comment_end)
+ {
+ *ptr++ = *statement_ptr++;
+ }
+ /* otherwise, go back to where we started, no end found */
+ else
+ {
+ statement_ptr -= comment_length;
+ ptr -= comment_length;
+ }
+ }
+ break;
+ }
+ /* c-type comments */
+ case '/':
+ {
+ comment_length= 1;
+ comment_end= false;
+ *ptr++ = *statement_ptr++;
+ if (*statement_ptr == '*')
+ {
+ /* use up characters everything until newline */
+ while (*statement_ptr)
+ {
+ *ptr++ = *statement_ptr++;
+ comment_length++;
+ if (!strncmp(statement_ptr, "*/", 2))
+ {
+ comment_length += 2;
+ comment_end= true;
+ break;
+ }
+ }
+ /* iterate past the comment end */
+ if (comment_end)
+ {
+ *ptr++ = *statement_ptr++;
+ *ptr++ = *statement_ptr++;
+ }
+ else
+ {
+ statement_ptr -= comment_length;
+ ptr -= comment_length;
+ }
+ }
+ break;
+ }
case '`':
case '\'':
case '"':
@@ -1482,6 +1638,17 @@
SV** svp;
STRLEN lna;
+ /* thanks to Peter John Edwards for mysql_init_command */
+ if ((svp = hv_fetch(hv, "mysql_init_command", 18, FALSE)) &&
+ *svp && SvTRUE(*svp))
+ {
+ char* df = SvPV(*svp, lna);
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ "imp_dbh->mysql_dr_connect: Setting" \
+ " init command (%s).\n", df);
+ mysql_options(sock, MYSQL_INIT_COMMAND, df);
+ }
if ((svp = hv_fetch(hv, "mysql_compression", 17, FALSE)) &&
*svp && SvTRUE(*svp))
{
@@ -1502,16 +1669,6 @@
mysql_options(sock, MYSQL_OPT_CONNECT_TIMEOUT,
(const char *)&to);
}
- if ((svp = hv_fetch(hv, "mysql_init_command", 18, FALSE)) &&
- *svp && SvTRUE(*svp))
- {
- char* df = SvPV(*svp, lna);
- if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
- PerlIO_printf(DBILOGFP,
- "imp_dbh->mysql_dr_connect: Setting" \
- " init command (%s).\n", df);
- mysql_options(sock, MYSQL_INIT_COMMAND, df);
- }
if ((svp = hv_fetch(hv, "mysql_read_default_file", 23, FALSE)) &&
*svp && SvTRUE(*svp))
{
@@ -2281,7 +2438,7 @@
0
);
- result= (newRV_noinc((SV*)hv));
+ result= sv_2mortal((newRV_noinc((SV*)hv)));
}
case 'h':
@@ -3169,7 +3326,6 @@
"Error happened while tried to clean up stmt", NULL);
return 0;
}
-
imp_sth->row_num= mysql_st_internal_execute41(
sth,
DBIc_NUM_PARAMS(imp_sth),
@@ -4268,6 +4424,11 @@
int buffer_length= slen;
unsigned int buffer_type= 0;
#endif
+
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ " Called: dbd_bind_ph\n");
+
attribs= attribs;
maxlen= maxlen;
@@ -4310,22 +4471,41 @@
#if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
if (imp_sth->use_server_side_prepare)
{
- if (SvOK(imp_sth->params[idx].value) && imp_sth->params[idx].value)
- {
- buffer_is_null= 0;
-
switch(sql_type) {
-
- case SQL_NUMERIC:
- case SQL_INTEGER:
- case SQL_SMALLINT:
- case SQL_BIGINT:
- case SQL_TINYINT:
+ case SQL_NUMERIC:
+ case SQL_INTEGER:
+ case SQL_SMALLINT:
+ case SQL_BIGINT:
+ case SQL_TINYINT:
+ buffer_type= MYSQL_TYPE_LONG;
+ break;
+ case SQL_DOUBLE:
+ case SQL_DECIMAL:
+ case SQL_FLOAT:
+ case SQL_REAL:
+ buffer_type= MYSQL_TYPE_DOUBLE;
+ break;
+ case SQL_CHAR:
+ case SQL_VARCHAR:
+ case SQL_DATE:
+ case SQL_TIME:
+ case SQL_TIMESTAMP:
+ case SQL_LONGVARCHAR:
+ case SQL_BINARY:
+ case SQL_VARBINARY:
+ case SQL_LONGVARBINARY:
+ buffer_type= MYSQL_TYPE_BLOB;
+ break;
+ default:
+ buffer_type= MYSQL_TYPE_STRING;
+ }
+ buffer_is_null = !(SvOK(imp_sth->params[idx].value) && imp_sth->params[idx].value);
+ if (! buffer_is_null) {
+ switch(buffer_type) {
+ case MYSQL_TYPE_LONG:
/* INT */
if (!SvIOK(imp_sth->params[idx].value) && DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND AN INT NUMBER\n");
-
- buffer_type= MYSQL_TYPE_LONG;
buffer_length = sizeof imp_sth->fbind[idx].numeric_val.lval;
imp_sth->fbind[idx].numeric_val.lval= SvIV(imp_sth->params[idx].value);
buffer=(void*)&(imp_sth->fbind[idx].numeric_val.lval);
@@ -4335,39 +4515,32 @@
sql_type, (long) (*buffer));
break;
- case SQL_DOUBLE:
- case SQL_DECIMAL:
- case SQL_FLOAT:
- case SQL_REAL:
+ case MYSQL_TYPE_DOUBLE:
if (!SvNOK(imp_sth->params[idx].value) && DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBILOGFP, "\t\tTRY TO BIND A FLOAT NUMBER\n");
-
- buffer_type= MYSQL_TYPE_DOUBLE;
buffer_length = sizeof imp_sth->fbind[idx].numeric_val.dval;
imp_sth->fbind[idx].numeric_val.dval= SvNV(imp_sth->params[idx].value);
buffer=(char*)&(imp_sth->fbind[idx].numeric_val.dval);
-
if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBILOGFP,
" SCALAR type %d ->%f<- IS A FLOAT NUMBER\n",
sql_type, (double)(*buffer));
break;
- case SQL_CHAR:
- case SQL_VARCHAR:
- case SQL_DATE:
- case SQL_TIME:
- case SQL_TIMESTAMP:
- case SQL_LONGVARCHAR:
- case SQL_BINARY:
- case SQL_VARBINARY:
- case SQL_LONGVARBINARY:
- buffer_type= MYSQL_TYPE_BLOB;
+ case MYSQL_TYPE_BLOB:
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ " SCALAR type BLOB\n");
break;
- default:
- buffer_type= MYSQL_TYPE_STRING;
+ case MYSQL_TYPE_STRING:
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ " SCALAR type STRING %d, buffertype=%d\n", sql_type, buffer_type);
break;
+
+ default:
+ croak("Bug in DBD::Mysql file dbdimp.c#dbd_bind_ph: do not know how to handle unknown buffer type.");
}
if (buffer_type == MYSQL_TYPE_STRING || buffer_type == MYSQL_TYPE_BLOB)
@@ -4382,14 +4555,25 @@
}
else
{
+ /*case: buffer_is_null != 0*/
buffer= NULL;
- buffer_is_null= 1;
- buffer_type= MYSQL_TYPE_NULL;
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ " SCALAR NULL VALUE: buffer type is: %d\n", buffer_type);
}
/* Type of column was changed. Force to rebind */
- if (imp_sth->bind[idx].buffer_type != buffer_type)
+ if (imp_sth->bind[idx].buffer_type != buffer_type) {
+ /* Note: this looks like being another bug:
+ * if type of parameter N changes, then a bind is triggered
+ * with an only partially filled bind structure ??
+ */
+ if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
+ PerlIO_printf(DBILOGFP,
+ " FORCE REBIND: buffer type changed from %d to %d, sql-type=%d\n",
+ imp_sth->bind[idx].buffer_type, buffer_type, sql_type);
imp_sth->has_been_bound = 0;
+ }
/* prepare has not been called */
if (imp_sth->has_been_bound == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/dbdimp.h new/DBD-mysql-4.014/dbdimp.h
--- old/DBD-mysql-4.013/dbdimp.h 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/dbdimp.h 2010-04-14 22:04:05.000000000 +0200
@@ -12,7 +12,7 @@
* You may distribute this under the terms of either the GNU General Public
* License or the Artistic License, as specified in the Perl README file.
*
- * $Id: dbdimp.h 12860 2009-06-19 01:52:29Z capttofu $
+ * $Id$
*/
/*
@@ -49,6 +49,9 @@
#define mysql_warning_count(svsock) 0
#endif
+#define true 1
+#define false 0
+
/*
* The following are return codes passed in $h->err in case of
* errors by DBD::mysql.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/lib/DBD/mysql/GetInfo.pm new/DBD-mysql-4.014/lib/DBD/mysql/GetInfo.pm
--- old/DBD-mysql-4.013/lib/DBD/mysql/GetInfo.pm 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/lib/DBD/mysql/GetInfo.pm 2010-04-12 19:37:14.000000000 +0200
@@ -4,9 +4,9 @@
#
#
# Generated by DBI::DBD::Metadata
-# $Author: rlippan $ <-- the person to blame
-# $Revision: 1108 $
-# $Date: 2003-03-31 20:17:27 -0500 (Mon, 31 Mar 2003) $
+# $Author$ <-- the person to blame
+# $Revision$
+# $Date$
use strict;
use DBD::mysql;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/lib/DBD/mysql.pm new/DBD-mysql-4.014/lib/DBD/mysql.pm
--- old/DBD-mysql-4.013/lib/DBD/mysql.pm 2009-09-16 20:05:44.000000000 +0200
+++ new/DBD-mysql-4.014/lib/DBD/mysql.pm 2010-04-15 05:08:37.000000000 +0200
@@ -9,7 +9,7 @@
use Carp ();
@ISA = qw(DynaLoader);
-$VERSION = '4.013';
+$VERSION = '4.014';
bootstrap DBD::mysql $VERSION;
@@ -946,11 +946,11 @@
request to the server will timeout if it has not been successful after
the given number of seconds.
-=item mysql_init_command
+ =item mysql_init_command
-If your DSN contains the option "mysql_init_command_timeout=##", then
-this SQL statement is executed when conencting to the MySQL server.
-It is automatically re-executed if reconnection occurs.
+ If your DSN contains the option "mysql_init_command_timeout=##", then
+ this SQL statement is executed when connecting to the MySQL server.
+ It is automatically re-executed if reconnection occurs.
=item mysql_read_default_file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/mysql.xs new/DBD-mysql-4.014/mysql.xs
--- old/DBD-mysql-4.013/mysql.xs 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/mysql.xs 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
/* Hej, Emacs, this is -*- C -*- mode!
- $Id: mysql.xs 11647 2008-08-15 13:00:36Z capttofu $
+ $Id$
Copyright (c) 2003 Rudolf Lippan
Copyright (c) 1997-2003 Jochen Wiedmann
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/00base.t new/DBD-mysql-4.014/t/00base.t
--- old/DBD-mysql-4.013/t/00base.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/00base.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 00base.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id$
#
# This is the base test, tries to install the drivers. Should be
# executed as the very first test.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40bindparam.t new/DBD-mysql-4.014/t/40bindparam.t
--- old/DBD-mysql-4.013/t/40bindparam.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/40bindparam.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 40bindparam.t 11650 2008-08-15 13:58:29Z capttofu $
+# $Id$
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40blobs.t new/DBD-mysql-4.014/t/40blobs.t
--- old/DBD-mysql-4.013/t/40blobs.t 2009-09-16 18:24:24.000000000 +0200
+++ new/DBD-mysql-4.014/t/40blobs.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 40blobs.t 11650 2008-08-15 13:58:29Z capttofu $
+# $Id$
#
# This is a test for correct handling of BLOBS; namely $dbh->quote
# is expected to work correctly.
@@ -34,17 +34,15 @@
eval {$dbh = DBI->connect($test_dsn, $test_user, $test_password,
{ RaiseError => 1, AutoCommit => 1}) or ServerError() ;};
+if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
+ $charset= '';
+}
if ($@) {
plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
}
-
plan tests => 14;
-if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
- $charset= '';
-}
-
my $size= 128;
ok $dbh->do("DROP TABLE IF EXISTS $table"), "Drop table if exists $table";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40listfields.t new/DBD-mysql-4.014/t/40listfields.t
--- old/DBD-mysql-4.013/t/40listfields.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/40listfields.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 40listfields.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id$
#
# This is a test for statement attributes being present appropriately.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40nulls.t new/DBD-mysql-4.014/t/40nulls.t
--- old/DBD-mysql-4.013/t/40nulls.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/40nulls.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 40nulls.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id$
#
# This is a test for correctly handling NULL values.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40nulls_prepare.t new/DBD-mysql-4.014/t/40nulls_prepare.t
--- old/DBD-mysql-4.013/t/40nulls_prepare.t 1970-01-01 01:00:00.000000000 +0100
+++ new/DBD-mysql-4.014/t/40nulls_prepare.t 2010-04-13 05:03:38.000000000 +0200
@@ -0,0 +1,79 @@
+#!perl -w
+# vim: ft=perl
+
+# this test is for bug 49719
+# https://rt.cpan.org/Ticket/Display.html?id=49719
+
+use strict;
+use Test::More;
+use DBI;
+use DBI::Const::GetInfoType;
+use Carp qw(croak);
+use Data::Dumper;
+use lib 't', '.';
+require 'lib.pl';
+
+my ($row, $sth, $dbh);
+my ($table, $def, $rows, $errstr, $ret_ref);
+use vars qw($table $test_dsn $test_user $test_password);
+
+eval {$dbh = DBI->connect($test_dsn, $test_user, $test_password,
+ { RaiseError => 1, AutoCommit => 1});};
+
+if ($@) {
+ plan skip_all =>
+ "Can't connect to database ERROR: $DBI::errstr. Can't continue test";
+}
+plan tests => 22;
+
+ok(defined $dbh, "Connected to database");
+
+ok($dbh->do("DROP TABLE IF EXISTS t1"), "Making slate clean");
+
+my $create= <do($create), "creating test table for bug 49719");
+
+my ($sth_insert, $sth_lookup);
+
+my $insert= 'INSERT INTO t1 (id, value0, value1, value2) VALUES (?, ?, ?, ?)';
+
+ok($sth_insert= $dbh->prepare($insert), "Prepare of insert");
+
+my $select= "SELECT * FROM t1 WHERE id = ?";
+
+ok($sth_lookup= $dbh->prepare($select), "Prepare of query");
+
+# Insert null value
+ok($sth_insert->bind_param(1, 42, DBI::SQL_WVARCHAR), "bind_param(1,42, SQL_WARCHAR)");
+ok($sth_insert->bind_param(2, 102, DBI::SQL_WVARCHAR), "bind_param(2,102,SQL_WARCHAR");
+ok($sth_insert->bind_param(3, undef, DBI::SQL_WVARCHAR), "bind_param(3, undef,SQL_WVARCHAR)");
+ok($sth_insert->bind_param(4, 10004, DBI::SQL_WVARCHAR), "bind_param(4, 10004,SQL_WVARCHAR)");
+ok($sth_insert->execute(), "Executing the first insert");
+
+# Insert afterwards none null value
+# The bug would insert (DBD::MySQL-4.012) corrupted data....
+# incorrect use of MYSQL_TYPE_NULL in prepared statement in dbdimp.c
+ok($sth_insert->bind_param(1, 43, DBI::SQL_WVARCHAR),"bind_param(1,43,SQL_WVARCHAR)");
+ok($sth_insert->bind_param(2, 2002, DBI::SQL_WVARCHAR),"bind_param(2,2002,SQL_WVARCHAR)");
+ok($sth_insert->bind_param(3, 20003, DBI::SQL_WVARCHAR),"bind_param(3,20003,SQL_WVARCHAR)");
+ok($sth_insert->bind_param(4, 200004, DBI::SQL_WVARCHAR),"bind_param(4,200004,SQL_WVARCHAR)");
+ok($sth_insert->execute(), "Executing the 2nd insert");
+
+# verify
+ok($sth_lookup->execute(42), "Query for record of id = 42");
+is_deeply($sth_lookup->fetchrow_arrayref(), [42, 102, undef, 10004]);
+
+ok($sth_lookup->execute(43), "Query for record of id = 43");
+is_deeply($sth_lookup->fetchrow_arrayref(), [43, 2002, 20003, 200004]);
+
+ok($sth_insert->finish());
+ok($sth_lookup->finish());
+
+ok($dbh->disconnect(), "Testing disconnect");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/40numrows.t new/DBD-mysql-4.014/t/40numrows.t
--- old/DBD-mysql-4.013/t/40numrows.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/40numrows.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 40numrows.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id$
#
# This tests, whether the number of rows can be retrieved.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/50chopblanks.t new/DBD-mysql-4.014/t/50chopblanks.t
--- old/DBD-mysql-4.013/t/50chopblanks.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/50chopblanks.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 50chopblanks.t 11650 2008-08-15 13:58:29Z capttofu $
+# $Id$
#
# This driver should check whether 'ChopBlanks' works.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/50commit.t new/DBD-mysql-4.014/t/50commit.t
--- old/DBD-mysql-4.013/t/50commit.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/50commit.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 50commit.t 11645 2008-08-15 11:36:38Z capttofu $
+# $Id$
#
# This is testing the transaction support.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/52comment.t new/DBD-mysql-4.014/t/52comment.t
--- old/DBD-mysql-4.013/t/52comment.t 1970-01-01 01:00:00.000000000 +0100
+++ new/DBD-mysql-4.014/t/52comment.t 2010-04-14 16:23:34.000000000 +0200
@@ -0,0 +1,61 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use DBI;
+use DBI::Const::GetInfoType;
+use Test::More;
+use lib 't', '.';
+require 'lib.pl';
+
+use vars qw($test_dsn $test_user $test_password $table);
+
+my $dbh;
+eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
+ { RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
+if ($@) {
+ plan skip_all =>
+ "ERROR: $DBI::errstr. Can't continue test";
+}
+plan tests => 9;
+
+ok $dbh->do("DROP TABLE IF EXISTS $table"), "drop table if exists $table";
+
+my $create= <<"EOTABLE";
+create table $table (
+ id bigint unsigned not null default 0
+ )
+EOTABLE
+
+
+ok $dbh->do($create), "creating table";
+
+my $statement= "insert into $table (id) values (?)";
+
+my $sth;
+ok $sth= $dbh->prepare($statement);
+
+my $rows;
+ok $rows= $sth->execute('1');
+cmp_ok $rows, '==', 1;
+$sth->finish();
+
+$statement= <selectrow_arrayref($statement, {}, 1);
+cmp_ok $retrow->[0], '==', 1;
+
+$statement= "SELECT id FROM $table /* it's a bug? */ WHERE id = ?";
+
+$retrow= $dbh->selectrow_arrayref($statement, {}, 1);
+cmp_ok $retrow->[0], '==', 1;
+
+ok $dbh->do("DROP TABLE IF EXISTS $table"), "drop table if exists $table";
+
+ok $dbh->disconnect;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/60leaks.t new/DBD-mysql-4.014/t/60leaks.t
--- old/DBD-mysql-4.013/t/60leaks.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/60leaks.t 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 60leaks.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id$
#
# This is a skeleton test. For writing new tests, take this file
# and modify/extend it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/70takeimp.t new/DBD-mysql-4.014/t/70takeimp.t
--- old/DBD-mysql-4.013/t/70takeimp.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/70takeimp.t 2010-04-12 19:37:14.000000000 +0200
@@ -2,7 +2,7 @@
# vim: ft=perl
#
-# $Id: 70takeimp.t 11993 2008-10-22 00:49:10Z capttofu $
+# $Id$
#
# This is a skeleton test. For writing new tests, take this file
# and modify/extend it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/76multi_statement.t new/DBD-mysql-4.014/t/76multi_statement.t
--- old/DBD-mysql-4.013/t/76multi_statement.t 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/76multi_statement.t 2010-04-14 21:41:21.000000000 +0200
@@ -19,15 +19,19 @@
if ($@) {
plan skip_all => "ERROR: $@. Can't continue test";
}
-plan tests => 24;
+plan tests => 25;
ok (defined $dbh, "Connected to database with multi statement support");
$dbh->{mysql_server_prepare}= 0;
SKIP: {
- skip "Server doesn't support multi statements", 23
- if $dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1";
+ my $v= $dbh->get_info($GetInfoType{SQL_DBMS_VER});
+ diag "Testing multicall against SQL_DBMS_VER: $v";
+ skip "Server doesn't support multi statements", 24
+ if $v lt "4.1";
+
+ ok($dbh->do("SET SQL_MODE=''"),"init connection SQL_MODE non strict");
ok($dbh->do("DROP TABLE IF EXISTS $table"), "clean up");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/85init_command.t new/DBD-mysql-4.014/t/85init_command.t
--- old/DBD-mysql-4.013/t/85init_command.t 2009-09-16 16:29:07.000000000 +0200
+++ new/DBD-mysql-4.014/t/85init_command.t 2010-04-14 19:51:03.000000000 +0200
@@ -13,7 +13,11 @@
my $dbh;
eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
- { RaiseError => 1, PrintError => 1, AutoCommit => 0, mysql_init_command => 'SET SESSION wait_timeout=7' });};
+ { RaiseError => 1,
+ PrintError => 1,
+ AutoCommit => 0,
+ mysql_init_command => 'SET SESSION wait_timeout=7' });};
+
if ($@) {
plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
}
@@ -32,3 +36,4 @@
$sth->finish();
$dbh->disconnect();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/lib.pl new/DBD-mysql-4.014/t/lib.pl
--- old/DBD-mysql-4.013/t/lib.pl 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/lib.pl 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
# Hej, Emacs, give us -*- perl mode here!
#
-# $Id: lib.pl 11207 2008-05-07 11:22:16Z capttofu $
+# $Id$
#
# lib.pl is the file where database specific things should live,
# whereever possible. For example, you define certain constants
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/mem_leak.pl new/DBD-mysql-4.014/t/mem_leak.pl
--- old/DBD-mysql-4.013/t/mem_leak.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/DBD-mysql-4.014/t/mem_leak.pl 2010-04-14 19:03:43.000000000 +0200
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use strict;
+use DBI;
+
+my $test_dsn = 'DBI:mysql:test';
+my $test_user= 'root';
+my $test_password= '';
+
+my $dbh = DBI->connect($test_dsn, $test_user, $test_password);
+
+while (1) {
+ my $tmp=$dbh->{mysql_dbd_stats};
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/mysql.dbtest new/DBD-mysql-4.014/t/mysql.dbtest
--- old/DBD-mysql-4.013/t/mysql.dbtest 2009-09-15 03:57:53.000000000 +0200
+++ new/DBD-mysql-4.014/t/mysql.dbtest 2010-04-12 19:37:14.000000000 +0200
@@ -1,6 +1,6 @@
# Hej, Emacs, give us -*- perl -*- mode here!
#
-# $Id: mysql.dbtest 11207 2008-05-07 11:22:16Z capttofu $
+# $Id$
#
# database specific definitions for a 'mysql' database
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-mysql-4.013/t/mysql.mtest new/DBD-mysql-4.014/t/mysql.mtest
--- old/DBD-mysql-4.013/t/mysql.mtest 2009-09-16 20:06:19.000000000 +0200
+++ new/DBD-mysql-4.014/t/mysql.mtest 2010-04-15 05:08:53.000000000 +0200
@@ -3,11 +3,11 @@
'embedded' => '',
'ssl' => 0,
'nocatchstderr' => 0,
- 'libs' => '-Wl,-Bsymbolic-functions -L/usr/lib/mysql -lmysqlclient',
+ 'libs' => '-L/usr/local/maria/lib/mysql -lmysqlclient -lz -lm',
'testhost' => '',
'nofoundrows' => 0,
'testdb' => 'test',
- 'cflags' => '-I/usr/include/mysql -DBIG_JOINS=1 -fPIC',
+ 'cflags' => '-I/usr/local/maria/include/mysql -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL',
'testuser' => 'root',
'testpassword' => '',
'testsocket' => ''
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org