Hello community,
here is the log from the commit of package perl-DBD-mysql
checked in at Fri Sep 12 18:09:00 CEST 2008.
--------
--- perl-DBD-mysql/perl-DBD-mysql.changes 2008-06-19 17:06:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-DBD-mysql/perl-DBD-mysql.changes 2008-09-10 17:31:05.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Sep 10 17:02:40 CEST 2008 - anicka@suse.cz
+
+- update to 4.008
+ * Multi statement patch
+ * Disabled TAKE_IMP_DATA_VERSION because segfault with DBI < 1.607
+ * #29528: bind_param(..., SQL_FLOAT) ignores exponents - fixed
+ * Cleanups to make mysqlEmb work under Cygwin
+ * Modified and disabled tests for MySQL version < 4.1
+ for unsupported features
+
+-------------------------------------------------------------------
Old:
----
DBD-mysql-4.007.tar.bz2
New:
----
DBD-mysql-4.008.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DBD-mysql.spec ++++++
--- /var/tmp/diff_new_pack.Hc3091/_old 2008-09-12 18:08:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Hc3091/_new 2008-09-12 18:08:50.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package perl-DBD-mysql (Version 4.007)
+# spec file for package perl-DBD-mysql (Version 4.008)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -21,7 +28,7 @@
Requires: perl-DBI perl-Data-ShowTable
Requires: perl = %{perl_version}
AutoReqProv: on
-Version: 4.007
+Version: 4.008
Release: 1
Summary: Interface to the MySQL database
Group: Development/Libraries/Perl
@@ -68,6 +75,14 @@
/var/adm/perl-modules/perl-DBD-mysql
%changelog
+* Wed Sep 10 2008 anicka@suse.cz
+- update to 4.008
+ * Multi statement patch
+ * Disabled TAKE_IMP_DATA_VERSION because segfault with DBI < 1.607
+ * #29528: bind_param(..., SQL_FLOAT) ignores exponents - fixed
+ * Cleanups to make mysqlEmb work under Cygwin
+ * Modified and disabled tests for MySQL version < 4.1
+ for unsupported features
* Thu Jun 19 2008 anicka@suse.cz
- update to 4.007
* Took out mysql_server_init call where not needed
++++++ DBD-mysql-4.007.tar.bz2 -> DBD-mysql-4.008.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/ChangeLog new/DBD-mysql-4.008/ChangeLog
--- old/DBD-mysql-4.007/ChangeLog 2008-05-11 17:54:19.000000000 +0200
+++ new/DBD-mysql-4.008/ChangeLog 2008-08-15 15:58:32.000000000 +0200
@@ -1,16 +1,25 @@
-2008-5-11 Patrick Galbraith (4.007)
+2008-8-15 Patrick Galbraith (4.008)
+* Multi statement patch, thanks to Chris Heath!
+* Disabled TAKE_IMP_DATA_VERSION because segfault with DBI < 1.607
+* #29528: bind_param(..., SQL_FLOAT) ignores exponents - fixed, Thanks to
+Tokuhiro Matsuno!
+* Cleanups to make mysqlEmb work under Cygwin - Thanks to Chris Rodgers
+http://rodgers.org.uk/ !
+* Modified and disabled tests for MySQL version < 4.1 for unsupported features
+
+2008-5-11 Patrick Galbraith (4.007)
* Took out mysql_server_init call where not needed
* Complete re-write of test suit to use Test::More - tons of cleanups!
* Makefile.PL changes to use current user in 'make test' if not defined
-2007-12-26 Patrick Galbraith (4.006)
+2007-12-26 Patrick Galbraith (4.006)
* Cleanups on OS X compile
* Fixes to syntax errors on AIX
* Removed test code that was leaving trace files around
-2007-3-22 Patrick Galbraith (4.005)
+2007-3-22 Patrick Galbraith (4.005)
* Fixed mysql_warning issue < 4.1 (reminers, patches, help from ROAM, (issue 25713)
* makerealclean patch from ROAM (issue #25714)
@@ -28,7 +37,7 @@
-2007-3-22 Patrick Galbraith Jim Winstead (4.004)
+2007-3-22 Patrick Galbraith Jim Winstead (4.004)
* Work around a bug in old 3.23 servers by specifying NOT NULL for fields used
as a primary key in tests. (Bug #20325, reported by Julian Ladisch)
* Add support for mysql_warning_count statement handle attribute. (Bug #25457,
@@ -43,11 +52,11 @@
* Fixed do_error definition (Scott Hildreth, Tim Bunce)
* Conversion of test suite to Test::More
-2007-3-5 Patrick Galbraith Jim Winstead (4.003)
+2007-3-5 Patrick Galbraith Jim Winstead (4.003)
* Fix inclusion of non-primary keys in primary_key_info. (Bug #26786,
reported and patch by Dave Rolsky)
-2007-3-1 Patrick Galbraith Jim Winstead (4.002)
+2007-3-1 Patrick Galbraith Jim Winstead (4.002)
* Fix re-exec of Makefile.PL when forcing $ENV{LANG} to 'C'. (RT #25233,
reported by Slaven Rezic)
* Rewrote table_info method to support all arguments (previously it would
@@ -77,7 +86,7 @@
Dave Rolsky, and final implementation based on Connector/J code)
-2007-1-8 Jim Winstead Patrick Galbraith (4.001)
+2007-1-8 Jim Winstead Patrick Galbraith (4.001)
* Fix handling of unsigned integer values in result sets when using
server-side prepared statements (they were not retrieved at all).
* Fix handling of signed integer values when using server-side prepared
@@ -1075,7 +1084,7 @@
* lib/Msql/Statement.pm: Fixed use of Msql::TEXT_TYPE without
checking whether we are running Msql 1.
-$Id: ChangeLog 11247 2008-05-11 15:54:20Z capttofu $
+$Id: ChangeLog 11650 2008-08-15 13:58:29Z capttofu $
DBD::mysql for DBI - Written by Jochen Wiedmann
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/dbdimp.c new/DBD-mysql-4.008/dbdimp.c
--- old/DBD-mysql-4.007/dbdimp.c 2008-04-29 01:36:17.000000000 +0200
+++ new/DBD-mysql-4.008/dbdimp.c 2008-08-15 15:31:29.000000000 +0200
@@ -8,7 +8,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.c 11150 2008-04-28 23:36:14Z capttofu $
+ * $Id: dbdimp.c 11649 2008-08-15 13:31:25Z capttofu $
*/
@@ -1562,6 +1562,7 @@
imp_dbh->use_server_side_prepare);
#endif
+ /* HELMUT */
#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
if ((svp = hv_fetch(hv, "mysql_enable_utf8", 17, FALSE)) && *svp) {
/* Do not touch imp_dbh->enable_utf8 as we are called earlier
@@ -1709,7 +1710,8 @@
char* mysql_socket;
D_imp_xxh(dbh);
-#define TAKE_IMP_DATA_VERSION 1
+ /* TODO- resolve this so that it is set only if DBI is 1.607 */
+#define TAKE_IMP_DATA_VERSION 1
#if TAKE_IMP_DATA_VERSION
if (DBIc_has(imp_dbh, DBIcf_IMPSET))
{ /* eg from take_imp_data() */
@@ -1800,6 +1802,7 @@
/* Safer we flip this to TRUE perl side if we detect a mod_perl env. */
imp_dbh->auto_reconnect = FALSE;
+ /* HELMUT */
#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
imp_dbh->enable_utf8 = FALSE; /* initialize mysql_enable_utf8 */
#endif
@@ -2118,6 +2121,7 @@
else if (kl == 31 && strEQ(key,"mysql_unsafe_bind_type_guessing"))
imp_dbh->bind_type_guessing = SvIV(valuesv);
+ /*HELMUT */
#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
else if (kl == 17 && strEQ(key, "mysql_enable_utf8"))
imp_dbh->enable_utf8 = bool_value;
@@ -2208,6 +2212,7 @@
const char* msg = mysql_error(imp_dbh->pmysql);
result= sv_2mortal(newSVpv(msg, strlen(msg)));
}
+ /* HELMUT */
#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
else if (kl == strlen("enable_utf8") && strEQ(key, "enable_utf8"))
result = sv_2mortal(newSViv(imp_dbh->enable_utf8));
@@ -2668,7 +2673,7 @@
/* No more pending result set(s)*/
if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBILOGFP,
- "\n <- dbs_st_more_rows no more results\n");
+ "\n <- dbs_st_more_results no more results\n");
return 0;
}
@@ -2699,6 +2704,8 @@
next_result_return_code= mysql_next_result(svsock);
+ imp_sth->warning_count = mysql_warning_count(imp_dbh->pmysql);
+
/*
mysql_next_result returns
0 if there are more results
@@ -2709,6 +2716,7 @@
{
do_error(sth, mysql_errno(svsock), mysql_error(svsock),
mysql_sqlstate(svsock));
+
return 0;
}
else
@@ -2721,10 +2729,12 @@
do_error(sth, mysql_errno(svsock), mysql_error(svsock),
mysql_sqlstate(svsock));
+ imp_sth->row_num= mysql_affected_rows(imp_dbh->pmysql);
+
if (imp_sth->result == NULL)
{
/* No "real" rowset*/
- return 0;
+ return 1;
}
else
{
@@ -3137,7 +3147,13 @@
if (imp_sth->row_num+1 != (my_ulonglong)-1)
{
if (!imp_sth->result)
+ {
imp_sth->insertid= mysql_insert_id(imp_dbh->pmysql);
+#if MYSQL_VERSION_ID >= MULTIPLE_RESULT_SET_VERSION
+ if (mysql_more_results(imp_dbh->pmysql))
+ DBIc_ACTIVE_on(imp_sth);
+#endif
+ }
else
{
/** Store the result in the current statement handle */
@@ -3470,6 +3486,7 @@
if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBILOGFP, "\t\tst_fetch string data %s\n", fbh->data);
sv_setpvn(sv, fbh->data, fbh->length);
+ /*HELMUT*/
#ifdef sv_utf8_decode
if(imp_dbh->enable_utf8)
sv_utf8_decode(sv);
@@ -3585,6 +3602,7 @@
}
sv_setpvn(sv, col, len);
/* UTF8 */
+ /*HELMUT*/
#if defined(sv_utf8_decode) && MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
#if MYSQL_VERSION_ID >= FIELD_CHARSETNR_VERSION
@@ -3674,7 +3692,7 @@
We don't close the cursor till DESTROY.
The application may re execute it.
*/
- if (imp_sth && imp_sth->result)
+ if (imp_sth && DBIc_ACTIVE(imp_sth))
{
/*
Clean-up previous result set(s) for sth to prevent
@@ -4591,10 +4609,11 @@
{
int seen_neg;
int seen_dec;
+ int seen_e;
+ int seen_plus;
char *cp;
- seen_neg= 0;
- seen_dec= 0;
+ seen_neg= seen_dec= seen_e= seen_plus= 0;
if (len <= 0) {
len= strlen(string);
@@ -4610,17 +4629,14 @@
{
if ('-' == *cp)
{
- if (seen_neg)
- {
- /* second '-' */
- break;
- }
- else if (cp > string)
+ if (seen_neg >= 2)
{
- /* '-' after digit(s) */
+ /*
+ third '-'. number can contains two '-'.
+ because -1e-10 is valid number */
break;
}
- seen_neg= 1;
+ seen_neg += 1;
}
else if ('.' == *cp)
{
@@ -4631,7 +4647,25 @@
}
seen_dec= 1;
}
- else if (!isdigit(*cp))
+ else if ('e' == *cp)
+ {
+ if (seen_e)
+ {
+ /* second 'e' */
+ break;
+ }
+ seen_e= 1;
+ }
+ else if ('+' == *cp)
+ {
+ if (seen_plus)
+ {
+ /* second '+' */
+ break;
+ }
+ seen_plus= 1;
+ }
+ else if (!isdigit(*cp))
{
break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/INSTALL.html new/DBD-mysql-4.008/INSTALL.html
--- old/DBD-mysql-4.007/INSTALL.html 2008-05-11 17:54:22.000000000 +0200
+++ new/DBD-mysql-4.008/INSTALL.html 2008-08-15 15:59:15.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:patg@my.patg.net" />
+<link rev="made" href="mailto:root@omen.apple.com" />
</head>
<body style="background-color: white">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/lib/DBD/mysql.pm new/DBD-mysql-4.008/lib/DBD/mysql.pm
--- old/DBD-mysql-4.007/lib/DBD/mysql.pm 2008-04-09 17:19:22.000000000 +0200
+++ new/DBD-mysql-4.008/lib/DBD/mysql.pm 2008-08-15 15:30:11.000000000 +0200
@@ -9,7 +9,7 @@
use Carp ();
@ISA = qw(DynaLoader);
-$VERSION = '4.007';
+$VERSION = '4.008';
bootstrap DBD::mysql $VERSION;
@@ -1071,7 +1071,12 @@
Example:
+use DBI;
$testdsn="DBI:mysqlEmb:database=test;mysql_embedded_options=--help,--verbose";
+$dbh = DBI->connect($testdsn,"a","b");
+
+This would cause the command line help to the embedded MySQL server library
+to be printed.
=item mysql_embedded_groups
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/Makefile.PL new/DBD-mysql-4.008/Makefile.PL
--- old/DBD-mysql-4.007/Makefile.PL 2008-05-11 17:52:50.000000000 +0200
+++ new/DBD-mysql-4.008/Makefile.PL 2008-08-15 15:24:58.000000000 +0200
@@ -108,7 +108,11 @@
if ($source->{'embedded'} eq 'mysql_config')
{
#We have to use libmygcc to resolve linking problem
- $opt->{'embedded'} .= " -lmygcc";
+ # this causes problems for cygwin
+ #$opt->{'embedded'} .= " -lmygcc";
+ # Under Cygwin (at least) we have to use libstdc++ to resolve linking
+ # problem because libmysqld is built using g++ rather than gcc.
+ $opt->{'embedded'} .= " -lstdc++";
}
my @files = ($^O =~ /mswin32/i) ? qw(mysqlclient.lib) :
@@ -261,9 +265,6 @@
replace => { '\$mdriver =.*' => "\$mdriver =\'mysqlEmb\';"},
makedir => 'mysqlEmb/t'
},
- 't/10dsnlist.t' => { filename => 'mysqlEmb/t/10dsnlist.t',
- makedir => 'mysqlEmb/t'
- },
't/20createdrop.t' => { filename => 'mysqlEmb/t/20createdrop.t',
makedir => 'mysqlEmb/t'
},
@@ -294,21 +295,6 @@
't/60leaks.t' => { filename => 'mysqlEmb/t/60leaks.t',
makedir => 'mysqlEmb/t'
},
- 't/dbdadmin.t' => { filename => 'mysqlEmb/t/dbdadmin.t',
- makedir => 'mysqlEmb/t'
- },
- 't/insertid.t' => { filename => 'mysqlEmb/t/insertid.t',
- makedir => 'mysqlEmb/t'
- },
- 't/texecute.t' => { filename => 'mysqlEmb/t/texecute.t',
- makedir => 'mysqlEmb/t'
- },
- 't/prepare_noerror.t' => { filename => 'mysqlEmb/t/prepare_noerror.t',
- makedir => 'mysqlEmb/t'
- },
- 't/param_values.t' => { filename => 'mysqlEmb/t/param_values.t',
- makedir => 'mysqlEmb/t'
- },
't/00base.t' => { filename => 'mysqlEmb/t/00base.t',
makedir => 'mysqlEmb/t'
},
@@ -347,6 +333,8 @@
$e{'INC'} .= " -DDBD_MYSQL_EMBEDDED";
+ print "Preparing embedded Makefile\n";
+
#Create Makefile.conf for mysqlEmb Makefile.PL
create_makefile(Data::Dumper->Dump([\%e], ["o"]));
@@ -387,9 +375,10 @@
--libs=<libs> Use <libs> for running the linker; defaults
to the value of "mysql_config --libs" or a gussed
value
- --embedded=<libs> Build embedded version of DBD and use <libs> for this;
- defaults to the value of "mysql_config --embedded"
- (default: off)
+ --force-embedded Build version of driver supporting mysqlEmb
+ --embedded=<libs> Use these libs when building the embedded version of
+ DBD (with --force-embedded). Defaults to the value of
+ "mysql_config --embedded".
--testdb=<db> Use the database <db> for running the test suite;
defaults to $TESTDB
--testuser=<user> Use the username <user> for running the test suite;
@@ -411,7 +400,6 @@
--ps-protocol Toggle the use of driver emulated prepared statements
prepare, requires MySQL server >= 4.1.3 for
server side prepared statements, off by default
- --force-embedded Force to build embedded version of driver
--ssl Enable SSL support
--help Print this message and exit
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/META.yml new/DBD-mysql-4.008/META.yml
--- old/DBD-mysql-4.007/META.yml 2008-05-11 17:54:22.000000000 +0200
+++ new/DBD-mysql-4.008/META.yml 2008-08-15 15:59:15.000000000 +0200
@@ -1,7 +1,7 @@
# 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.007
+version: 4.008
version_from: lib/DBD/mysql.pm
installdirs: site
requires:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/mysql.xs new/DBD-mysql-4.008/mysql.xs
--- old/DBD-mysql-4.007/mysql.xs 2008-04-29 01:36:17.000000000 +0200
+++ new/DBD-mysql-4.008/mysql.xs 2008-08-15 15:00:40.000000000 +0200
@@ -1,6 +1,6 @@
/* Hej, Emacs, this is -*- C -*- mode!
- $Id: mysql.xs 11150 2008-04-28 23:36:14Z capttofu $
+ $Id: mysql.xs 11647 2008-08-15 13:00:36Z capttofu $
Copyright (c) 2003 Rudolf Lippan
Copyright (c) 1997-2003 Jochen Wiedmann
@@ -234,6 +234,9 @@
int retval;
struct imp_sth_ph_st* params= NULL;
MYSQL_RES* result= NULL;
+#if MYSQL_VERSION_ID >= MULTIPLE_RESULT_SET_VERSION
+ int next_result_rc;
+#endif
#if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
STRLEN slen;
char *str_ptr, *statement_ptr, *buffer;
@@ -247,6 +250,16 @@
MYSQL_STMT *stmt= NULL;
MYSQL_BIND *bind= NULL;
imp_sth_phb_t *fbind= NULL;
+#endif
+#if MYSQL_VERSION_ID >= MULTIPLE_RESULT_SET_VERSION
+ while (mysql_next_result(imp_dbh->pmysql)==0)
+ {
+ MYSQL_RES* res = mysql_use_result(imp_dbh->pmysql);
+ if (res)
+ mysql_free_result(res);
+ }
+#endif
+#if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
/*
* Globaly enabled using of server side prepared statement
@@ -281,8 +294,10 @@
if (mysql_stmt_prepare(stmt, str_ptr, strlen(str_ptr)))
{
- /* For commands that are not supported by server side prepared statement
- mechanism lets try to pass them through regular API */
+ /*
+ For commands that are not supported by server side prepared
+ statement mechanism lets try to pass them through regular API
+ */
if (mysql_stmt_errno(stmt) == ER_UNSUPPORTED_PS)
{
use_server_side_prepare= 0;
@@ -299,8 +314,8 @@
else
{
/*
- * 'items' is the number of arguments passed to XSUB, supplied by xsubpp
- * compiler, as listed in manpage for perlxs
+ 'items' is the number of arguments passed to XSUB, supplied
+ by xsubpp compiler, as listed in manpage for perlxs
*/
if (items > 3)
{
@@ -341,10 +356,10 @@
}
/*
- if this statement has a result set, field types will be correctly
- identified. If there is no result set, such as with an INSERT,
- fields will not be defined, and all buffer_type will default to
- MYSQL_TYPE_VAR_STRING
+ if this statement has a result set, field types will be
+ correctly identified. If there is no result set, such as
+ with an INSERT, fields will not be defined, and all
+ buffer_type will default to MYSQL_TYPE_VAR_STRING
*/
col_type= (stmt->fields) ? stmt->fields[i].type : MYSQL_TYPE_STRING;
@@ -492,6 +507,29 @@
mysql_free_result(result);
result= 0;
}
+#if MYSQL_VERSION_ID >= MULTIPLE_RESULT_SET_VERSION
+ if (retval != -2) /* -2 means error */
+ {
+ /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */
+ while ((next_result_rc= mysql_next_result(imp_dbh->pmysql)) == 0)
+ {
+ result = mysql_use_result(imp_dbh->pmysql);
+ if (result)
+ mysql_free_result(result);
+ }
+ if (next_result_rc > 0)
+ {
+ if (dbis->debug >= 2)
+ PerlIO_printf(DBILOGFP, "\t<- do() ERROR: %s\n",
+ mysql_error(imp_dbh->pmysql));
+
+ do_error(dbh, mysql_errno(imp_dbh->pmysql),
+ mysql_error(imp_dbh->pmysql),
+ mysql_sqlstate(imp_dbh->pmysql));
+ retval= -2;
+ }
+ }
+#endif
/* remember that dbd_st_execute must return <= -2 for error */
if (retval == 0) /* ok with no rows affected */
XST_mPV(0, "0E0"); /* (true but zero) */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/README new/DBD-mysql-4.008/README
--- old/DBD-mysql-4.007/README 2007-01-06 16:20:00.000000000 +0100
+++ new/DBD-mysql-4.008/README 2008-08-15 15:26:09.000000000 +0200
@@ -50,6 +50,28 @@
make test # Some minor error messages can be ignored here
make install
+ Windows/CygWin (to build with embedded MySQL too)
+
+ First, build MySQL
+ tar -xzf mysql-5.0.51b.tar.gz
+ cd mysql-5.0.51b/
+ ./configure --without-server --with-embedded-server
+ make
+ make install
+
+ Then build DBD::mysqlEmb
+ cpan
+ look DBD::mysql
+ perl Makefile.PL --force-embedded
+ make
+ make install
+
+ Test with the following snippet
+ perl -e 'use DBI; $dbh = DBI->connect("DBI:mysqlEmb:database=test;mysql_embedded=1;mysql_embedded_options=--help,--verbose","a","b");'
+
+ If your build is OK, this will print the mysql embedded help.
+
+
Linux/Red Hat (you may prefer gnorpm to use)
rpm -i mysql mysql-devel mysql-server
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/40bindparam.t new/DBD-mysql-4.008/t/40bindparam.t
--- old/DBD-mysql-4.007/t/40bindparam.t 2008-05-11 17:13:10.000000000 +0200
+++ new/DBD-mysql-4.008/t/40bindparam.t 2008-08-15 15:58:32.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 40bindparam.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id: 40bindparam.t 11650 2008-08-15 13:58:29Z capttofu $
#
@@ -17,6 +17,11 @@
if ($@) {
plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
}
+if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
+ plan skip_all =>
+ "SKIP TEST: You must have MySQL version 4.1 and greater for this test to run";
+}
+
plan tests => 41;
ok ($dbh->do("DROP TABLE IF EXISTS $table"));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/40blobs.t new/DBD-mysql-4.008/t/40blobs.t
--- old/DBD-mysql-4.007/t/40blobs.t 2008-05-11 17:13:10.000000000 +0200
+++ new/DBD-mysql-4.008/t/40blobs.t 2008-08-15 15:58:32.000000000 +0200
@@ -1,7 +1,7 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 40blobs.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id: 40blobs.t 11650 2008-08-15 13:58:29Z capttofu $
#
# This is a test for correct handling of BLOBS; namely $dbh->quote
# is expected to work correctly.
@@ -9,6 +9,7 @@
use DBI ();
+use DBI::Const::GetInfoType;
use Test::More;
use vars qw($table $test_dsn $test_user $test_password);
use lib '.', 't';
@@ -28,9 +29,15 @@
}
my $dbh;
+my $charset= 'DEFAULT CHARSET=utf8';
+
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";
}
@@ -43,7 +50,7 @@
my $create = <do($create));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/50chopblanks.t new/DBD-mysql-4.008/t/50chopblanks.t
--- old/DBD-mysql-4.007/t/50chopblanks.t 2008-05-11 17:13:10.000000000 +0200
+++ new/DBD-mysql-4.008/t/50chopblanks.t 2008-08-15 15:58:32.000000000 +0200
@@ -1,13 +1,14 @@
#!perl -w
# vim: ft=perl
#
-# $Id: 50chopblanks.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id: 50chopblanks.t 11650 2008-08-15 13:58:29Z capttofu $
#
# This driver should check whether 'ChopBlanks' works.
#
use strict;
use DBI;
+use DBI::Const::GetInfoType;
use Test::More;
use lib 't', '.';
require 'lib.pl';
@@ -38,7 +39,15 @@
ok (my $sth2= $dbh->prepare("SELECT id, name FROM $table WHERE id = ?"));
-my $rows = [ [1, ''], [2, ' '], [3, ' a b c ']];
+my $rows;
+
+if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
+ $rows = [ [1, ''], [2, ''], [3, ' a b c']];
+}
+else {
+ $rows = [ [1, ''], [2, ' '], [3, ' a b c ']];
+}
+
my $ref;
for $ref (@$rows) {
my ($id, $name) = @$ref;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/50commit.t new/DBD-mysql-4.008/t/50commit.t
--- old/DBD-mysql-4.007/t/50commit.t 2008-05-11 17:13:10.000000000 +0200
+++ new/DBD-mysql-4.008/t/50commit.t 2008-08-15 13:36:41.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 50commit.t 11244 2008-05-11 15:13:10Z capttofu $
+# $Id: 50commit.t 11645 2008-08-15 11:36:38Z capttofu $
#
# This is testing the transaction support.
#
@@ -110,7 +110,7 @@
}
else {
- plan tests => 11;
+ plan tests => 13;
ok $dbh->do("DROP TABLE IF EXISTS $table"), "drop table if exists $table";
my $create =<can('take_imp_data')) {
plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
}
+plan skip_all => "This test is disabled";
plan tests => 21;
pass("obtained driver handle");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/71impdata.t new/DBD-mysql-4.008/t/71impdata.t
--- old/DBD-mysql-4.007/t/71impdata.t 2008-05-11 16:06:21.000000000 +0200
+++ new/DBD-mysql-4.008/t/71impdata.t 2008-08-15 13:24:33.000000000 +0200
@@ -24,6 +24,7 @@
unless ($dbh->can('take_imp_data')) {
plan skip_all => "version of DBI $DBI::VERSION doesn't support this test. Can't continue test";
}
+plan skip_all => "This test is disabled";
plan tests => 10;
pass("Connected to database");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/76multi_statement.t new/DBD-mysql-4.008/t/76multi_statement.t
--- old/DBD-mysql-4.007/t/76multi_statement.t 2008-05-11 16:56:13.000000000 +0200
+++ new/DBD-mysql-4.008/t/76multi_statement.t 2008-08-15 14:59:51.000000000 +0200
@@ -19,32 +19,55 @@
if ($@) {
plan skip_all => "ERROR: $@. Can't continue test";
}
-plan tests => 7;
+plan tests => 24;
ok (defined $dbh, "Connected to database with multi statement support");
$dbh->{mysql_server_prepare}= 0;
SKIP: {
- skip "Server doesn't support multi statements", 6
+ skip "Server doesn't support multi statements", 23
if $dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1";
ok($dbh->do("DROP TABLE IF EXISTS $table"), "clean up");
ok($dbh->do("CREATE TABLE $table (a INT)"), "create table");
- ok($dbh->do("INSERT INTO $table VALUES (1); INSERT INTO $table VALUES (2);"));
+ ok($dbh->do("INSERT INTO $table VALUES (1); INSERT INTO $table VALUES (2);"), "2 inserts");
- $dbh->disconnect();
+ # Check that a second do() doesn't fail with an 'Out of sync' error
+ ok($dbh->do("INSERT INTO $table VALUES (3); INSERT INTO $table VALUES (4);"), "2 more inserts");
- $dbh= DBI->connect($test_dsn, $test_user, $test_password,
- { RaiseError => 0, PrintError => 0, AutoCommit => 0,
- mysql_multi_statements => 0 });
- ok (defined $dbh, "Connected to database without multi statement support");
-
- ok (not $dbh->do("INSERT INTO $table VALUES (1); INSERT INTO $table VALUES (2);"));
-
- ok ($dbh->do("DROP TABLE IF EXISTS $table"), "clean up");
+ # Check that more_results works for non-SELECT results too
+ my $sth;
+ ok($sth = $dbh->prepare("UPDATE $table SET a=5 WHERE a=1; UPDATE $table SET a='6-' WHERE a<4"));
+ ok($sth->execute(), "Execute updates");
+ is($sth->rows, 1, "First update affected 1 row");
+ is($sth->{mysql_warning_count}, 0, "First update had no warnings");
+ ok($sth->{Active}, "Statement handle is Active");
+ ok($sth->more_results());
+ is($sth->rows, 2, "Second update affected 2 rows");
+ is($sth->{mysql_warning_count}, 2, "Second update had 2 warnings");
+ ok(not $sth->more_results());
+ ok($sth->finish());
+
+ # Now run it again without calling more_results().
+ ok($sth->execute(), "Execute updates again");
+ ok($sth->finish());
+
+ # Check that do() doesn't fail with an 'Out of sync' error
+ is($dbh->do("DELETE FROM $table"), 4, "Delete all rows");
+
+ # Test that do() reports errors from all result sets
+ $dbh->{RaiseError} = $dbh->{PrintError} = 0;
+ ok(!$dbh->do("INSERT INTO $table VALUES (1); INSERT INTO bad_$table VALUES (2);"), "do() reports errors");
+
+ # Test that execute() reports errors from only the first result set
+ ok($sth = $dbh->prepare("UPDATE $table SET a=2; UPDATE bad_$table SET a=3"));
+ ok($sth->execute(), "Execute updates");
+ ok(!$sth->err(), "Err was not set after execute");
+ ok(!$sth->more_results());
+ ok($sth->err(), "Err was set after more_results");
};
$dbh->disconnect();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/DBD-mysql-4.007/t/mysql.mtest new/DBD-mysql-4.008/t/mysql.mtest
--- old/DBD-mysql-4.007/t/mysql.mtest 2008-05-11 17:53:03.000000000 +0200
+++ new/DBD-mysql-4.008/t/mysql.mtest 2008-08-15 15:58:58.000000000 +0200
@@ -7,8 +7,8 @@
'testhost' => '',
'nofoundrows' => 0,
'testdb' => 'test',
- 'cflags' => '-I/usr/local/mysql/include/mysql -Wreturn-type -Wtrigraphs -W -Wformat -Wsign-compare -Wunused-function -Wunused-value -Wunused-parameter -mtune=pentium-m',
- 'testuser' => 'patg',
+ 'cflags' => '-I/usr/local/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