ANNOUNCE: DBD::mysql 2.9005_3

ANNOUNCE: DBD::mysql 2.9005_3

am 01.11.2004 14:49:40 von Rudy Lippan

Hello everyone,

DBD::mysql 2.9005_3 should now be up on CPAN.

Changelog:

2004-10-27 Rudolf Lippan (2.9005_3)
* Removed requirement that mysql.mtest be included in the distribution.
* DBI 1.43 is required -- It is needed for support of
$dbh->last_insert_id().
* Added $dbh->{mysql_unsafe_bind_type_guessing} = 2 which will look at
each bind_param and make guess based on whether it looks like a
number, and if the parameter looks like a number, it will not be
quoted. [thanks to dragonchild for cleaning up the initial rough
draft impementation making it ready for prime time]
* Applied patch to fix column which broke with later version of mysql
[Tim Bunce]
* Merged $dbh->last_inert_id() from the 3.0 dev tree
* If you are using perl 5.008 without a $ENV{LANG} of "C". Makefile.PL
will now 1. Complain loudly, and 2. set LANG to "C" and then
exec itself with the new lang setting.
* Added '$dbh->{mysql_unsafe_bind_type_guessing}'. When this flag is
enabled any scalar that is passed to execute() and was used in
numeric context will be treated as a number when being sent to the
database backend. This can be a secuity problem in that if you
use a string in numeric context, it will NOT be quoted before being
passed to the database -- use at your own risk. The default is off.
* fixed typo in pod changing failed_auto_reconnects_failed to
auto_reconnects_failed [Paul DuBois ]



And the latest release of the 2.9 Dev Branch which has support for prepared
statements is here:

http://www.remotelinux.com/rlippan/DBD-mysql-2.9015_1.tar.gz


Changlog:

2004-10-28 Rudolf Lippan (2.9015_1)
* Merged Makefile.PL from 2.9005_3
* Bumped version number to 2.9015 for release of Dev Branch. Which
will become 2.9020 when tested and merged into HEAD.
* fixed typo/compiler warning in bind_param_guessing
'*testchar' should have been 'testchar'.

2004-10-20 Patrick Galbraith patg@mysql.com (Dev-2_9 - 2.9005)

* merged changes from 2.9005_1
* fix to blob in dbd_st_fetch (Alexey Stroganov ranger@mysql.com)
In case of BLOB/TEXT fields we allocate only 8192 bytes in dbd_describe()
for data. Here we know real size of field so we should increase buffer
size and refetch column value




2004-07-25 Patrick Galbraith patg@mysql.com (2.9004)
* Prepared statement support
* Use of mysql_stmt_* API (>= 4.1.3)
* mysql_shutdown fix
* MySQL Embedded Server support (Alexey Stroganov)
* Fixed link failure on MacOSX
* Cleaned up tests
* Fixed various compile warnings




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: ANNOUNCE: DBD::mysql 2.9005_3

am 02.11.2004 11:07:34 von Steve Hay

--------------080803070106060301040404
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-NAIMIME-Disclaimer: 1
X-NAIMIME-Modified: 1

Rudy Lippan wrote:

>Hello everyone,
>
>DBD::mysql 2.9005_3 should now be up on CPAN.
>
Attached is a patch which removes the use (or, rather, attempted use!)
of mysql_config on Win32, since that program doesn't exist on Win32.

The patch isn't as big as it looks at first -- it's just that I've
inserted a couple of "if ($^O !~ /mswin32/i)" lines and indented the
sections of code within them.

It also omits "-g" from the cflags (the VC++ compiler uses different
flags to enable debugging, and in fact Perl on Win32 uses some debugging
flags by default anyway) and omits "-lz -lm -lcrypt -lnsl" from libs
(since these libraries don't exist and aren't required on Win32).

Btw, This release passes all tests on Win32 using perl-5.8.5 and
mysql-4.1.3.

- Steve

PS. I'm still longing for some Unicode support. What are the current
plans on this? Are we waiting for a "stable" mysql-4.1.x and/or DBI v2,
or will something be done sooner?


------------------------------------------------
This email has been scanned for viruses and content by the Radan Computational Webshield Appliances.

--------------080803070106060301040404
Content-Type: text/plain;
name="diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="diff.txt"

--- Makefile.PL.orig 2004-10-28 02:34:16.000000000 +0100
+++ Makefile.PL 2004-11-02 09:58:48.150097100 +0000
@@ -48,36 +48,39 @@

my $source = {};

-#Check for mysql_config first
-$source->{'mysql_config'}="guessed";
-if ($opt->{'mysql_config'})
-{
- if (-f $opt->{'mysql_config'})
- {
- $source->{'mysql_config'} = "Users choice";
- }
- else
- {
- print <<"MSG";
+#Check for mysql_config first (except on Win32)
+if ($^O !~ /mswin32/i)
+{
+ $source->{'mysql_config'}="guessed";
+ if ($opt->{'mysql_config'})
+ {
+ if (-f $opt->{'mysql_config'})
+ {
+ $source->{'mysql_config'} = "Users choice";
+ }
+ else
+ {
+ print <<"MSG";

Specified mysql configuration script '$opt->{'mysql_config'}' doesn't exist.
Please check path/permissions. Will try to use default mysql_config
script found through PATH.
MSG
- $opt->{'mysql_config'}= "mysql_config";
+ $opt->{'mysql_config'}= "mysql_config";
+ }
}
-}
-else
-{
- if (! `mysql_config`)
+ else
{
- print < + if (! `mysql_config`)
+ {
+ print <
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
MSG
+ }
+ $opt->{'mysql_config'} = "mysql_config";
}
- $opt->{'mysql_config'} = "mysql_config";
}

foreach my $key (qw/testdb testhost testuser testpassword testsocket
@@ -139,7 +142,7 @@
my $cflags = "-I\$(DBI_INSTARCH_DIR) $opt->{'cflags'}";
$cflags .= " -DDBD_MYSQL_WITH_SSL" if $opt->{'ssl'};
$cflags .= " -DDBD_NO_CLIENT_FOUND_ROWS" if $opt->{'nofoundrows'};
-$cflags .= " -g ";
+$cflags .= " -g " unless $^O =~ /mswin32/i;
my %o = ( 'NAME' => 'DBD::mysql',
'INC' => $cflags,
'dist' => { 'SUFFIX' => ".gz",
@@ -239,40 +242,43 @@
return;
}

- # First try to get options values from mysql_config
- my $command = $opt->{'mysql_config'} . " --$param";
- eval
- {
- open(PIPE, "$command |") or die "Can't find mysql_config.";
- };
-
- if (!$@)
+ # First try to get options values from mysql_config (except on Win32)
+ if ($^O !~ /mswin32/i)
{
- my $str = "";
- while (defined(my $line = ))
+ my $command = $opt->{'mysql_config'} . " --$param";
+ eval
{
- $str .= $line;
+ open(PIPE, "$command |") or die "Can't find mysql_config.";
+ };
+
+ if (!$@)
+ {
+ my $str = "";
+ while (defined(my $line = ))
+ {
+ $str .= $line;
+ }
+ if ($str ne "" && $str !~ /Options:/)
+ {
+ $str =~ s/\s+$//s;
+ $str =~ s/^\s+//s;
+
+ # Unfortunately ExtUtils::MakeMaker doesn't deal very well
+ # with -L'...'
+ $str =~ s/\-L\'(.*?)\'/-L$1/sg;
+ $str =~ s/\-L\"(.*?)\"/-L$1/sg;
+
+ $opt->{$param} = $str;
+ $source->{$param} = "mysql_config";
+ return;
+ }
}
- if ($str ne "" && $str !~ /Options:/)
+ else
{
- $str =~ s/\s+$//s;
- $str =~ s/^\s+//s;
-
- # Unfortunately ExtUtils::MakeMaker doesn't deal very well
- # with -L'...'
- $str =~ s/\-L\'(.*?)\'/-L$1/sg;
- $str =~ s/\-L\"(.*?)\"/-L$1/sg;
-
- $opt->{$param} = $str;
- $source->{$param} = "mysql_config";
- return;
+ # need to do something here...
+ #print "Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located\n";
}
}
- else
- {
- # need to do something here...
- #print "Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located\n";
- }

# Ok, mysql_config doesn't work. We need to do our best
if ($param eq "nocatchstderr" || $param eq "nofoundrows")
@@ -316,7 +322,8 @@
$source->{$param} = "guessed";

my @files=();
- my $default_libs= "-lmysqlclient -lz -lm -lcrypt -lnsl";
+ my $default_libs = ($^O =~ /mswin32/i) ? "-lmysqlclient" :
+ "-lmysqlclient -lz -lm -lcrypt -lnsl";
@files = ($^O =~ /mswin32/i) ? qw(mysqlclient.lib) :
qw(libmysqlclient.a libmysqlclient.so);



--------------080803070106060301040404
Content-Type: text/plain; charset=us-ascii

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
--------------080803070106060301040404--