DBD::mysql 3.000 Released

DBD::mysql 3.000 Released

am 01.07.2005 08:25:47 von Patrick Galbraith

Dear DBD::mysql Users and Developers,

I am pleased to announce the release of DBD::mysql 3.0000, now
available via CPAN!

Included in this release:

* Support for prepared statements!
* Embedded server support
* LIMIT placeholder support (emulated)
* Various Bug Fixes

This release is essentially what has been available as 2.9015, and is
now the main release. Being that prepared statement support and
embedded server are new features, support for both is turned off by
default, and can be compiled into the driver by:

perl Makefile.pl --ps-protocol (to compile in prepared server support)
perl Makefile.pl --force_embedded (to compile in embedded server
support)

Prior to running 'make test' after building, the test suit can be run
utilising the compiled-in prepared statement API by exporting:

export MYSQL_SERVER_PREPARE=1

Once either is compiled into the driver and DBD::mysql installed, to
use either in your application code, please refer to the documentation
(via perldoc) to use each. There you will find documentation on how to
take advantage of these new features.

If you have any questions, please feel free to ask on the various
mailing lists.

Thank you for using DBD::mysql!

Patrick Galbraith Senior Software Developer
patg@mysql.com http://www.mysql.com

Those who fear climbing mountains
Shall live forever in the holes - Arab Poet


--
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: DBD::mysql 3.000 Released

am 01.07.2005 11:10:09 von Steve Hay

Patrick Galbraith wrote:

>Dear DBD::mysql Users and Developers,
>
>I am pleased to announce the release of DBD::mysql 3.0000, now
>available via CPAN!
>
Oh dear.

This doesn't build at all on Win32. You still haven't incorporated the
patches that I sent here:

http://www.mail-archive.com/dbi-dev@perl.org/msg03889.html

to remove all mention of mysql_config which doesn't exist on Win32, and
to sort out problems with "long long", "strncasecmp", etc.

It also doesn't incorporate the patch that I sent here:

http://lists.mysql.com/perl/3554

without which you can't bind the undef value to insert a NULL into the
database.

Any chance of these issues being addressed anytime soon?

- Steve


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


--
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: DBD::mysql 3.000 Released

am 01.07.2005 11:32:21 von Steve Hay

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

Steve Hay wrote:

>Patrick Galbraith wrote:
>
>
>
>>Dear DBD::mysql Users and Developers,
>>
>>I am pleased to announce the release of DBD::mysql 3.0000, now
>>available via CPAN!
>>
>>
>>
>Oh dear.
>
>This doesn't build at all on Win32. You still haven't incorporated the
>patches that I sent here:
>
>http://www.mail-archive.com/dbi-dev@perl.org/msg03889.html
>
>to remove all mention of mysql_config which doesn't exist on Win32, and
>to sort out problems with "long long", "strncasecmp", etc.
>
>It also doesn't incorporate the patch that I sent here:
>
>http://lists.mysql.com/perl/3554
>
>without which you can't bind the undef value to insert a NULL into the
>database.
>
>Any chance of these issues being addressed anytime soon?
>
To assist you, here's a new patch incorporating all of the above which
applies to DBD-mysql-3.000.

With this patch applied, it builds OK (bar a few warnings) and all tests
pass OK on Win32.

Anything else I can do to help?

- Steve


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

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

diff -ruN DBD-mysql-3.0000.orig/Makefile.PL DBD-mysql-3.0000/Makefile.PL
--- DBD-mysql-3.0000.orig/Makefile.PL 2005-07-01 01:03:38.000000000 +0100
+++ DBD-mysql-3.0000/Makefile.PL 2005-07-01 10:28:20.615693100 +0100
@@ -50,36 +50,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";
+if ($^O !~ /mswin32/i)
+{
+ #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";

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
@@ -373,9 +376,11 @@
Possible options are:

--cflags= Use for running the C compiler; defaults
- to the value of "mysql_config --cflags"
+ to the value of "mysql_config --cflags" or a gussed
+ value
--libs= Use for running the linker; defaults
- to the value of "mysql_config --libs"
+ to the value of "mysql_config --libs" or a guessed
+ value
--embedded= Build embedded version of DBD and use for this;
defaults to the value of "mysql_config --embedded"
(default: off)
@@ -391,6 +396,7 @@
by default the port number is choosen from the
mysqlclient library
--mysql_config= Specify for mysql_config script
+ (Not supported on Win32)
--nocatchstderr Supress using the "myld" script that redirects
STDERR while running the linker.
--nofoundrows Change the behavoiur of \$sth->rows() so that it
@@ -403,7 +409,8 @@
--help Print this message and exit

All options may be configured on the command line. If they are
-not present on the command line, then mysql_config is called:
+not present on the command line, then mysql_config is called (if
+it can be found):

mysql_config --cflags
mysql_config --libs
@@ -438,39 +445,42 @@
return;
}

- # First try to get options values from mysql_config
- my $command = $opt->{'mysql_config'} . " --$param";
- eval
+ if ($^O !~ /mswin32/i)
{
- open(PIPE, "$command |") or die "Can't find mysql_config.";
- };
+ # 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 (!$@)
- {
- my $str = "";
- while (defined(my $line = ))
+ 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;
+ #print "Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located\n";
}
}
- else
- {
- #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")
diff -ruN DBD-mysql-3.0000.orig/dbdimp.c DBD-mysql-3.0000/dbdimp.c
--- DBD-mysql-3.0000.orig/dbdimp.c 2005-07-01 01:59:36.000000000 +0100
+++ DBD-mysql-3.0000/dbdimp.c 2005-07-01 10:28:29.834266100 +0100
@@ -492,7 +492,7 @@
if (! limit_flag)
{
if ((*statement_ptr == 'l' || *statement_ptr == 'L') &&
- !strncasecmp(statement_ptr+1, "imit", 4))
+ !Perl_ibcmp(pTHX_ statement_ptr+1, "imit", 4))
limit_flag = 1;
}
switch (*statement_ptr)
@@ -2104,10 +2104,10 @@
for ( i = 0; i < statement_length - 1; i++) {
searchptr= &statement[i];
/* prepared statements for SHOW commands are not supported */
- if (!strncasecmp(searchptr, "SHOW ", 5))
+ if (!Perl_ibcmp(pTHX_ searchptr, "SHOW ", 5))
imp_sth->use_server_side_prepare = 0;
/* if there is a 'limit' in the statement... */
- if (!limit_flag && !strncasecmp(searchptr, "limit ", 6))
+ if (!limit_flag && !Perl_ibcmp(pTHX_ searchptr, "limit ", 6))
{
limit_flag = 1;
i += 6;
@@ -2153,7 +2153,7 @@
*/

/* this is a better way to do this */
- if ( !strncasecmp(statement, "listfields ", 11) && imp_sth->use_server_side_prepare )
+ if ( !Perl_ibcmp(pTHX_ statement, "listfields ", 11) && imp_sth->use_server_side_prepare )
{
if (dbis->debug >= 2)
PerlIO_printf(DBILOGFP, "\"listfields\" Statement: %s\n setting use_server_side_prepare to 0\n", statement);
@@ -2296,7 +2296,7 @@
*result= NULL;
}

- if (slen >= 11 && !strncasecmp(sbuf, "listfields ", 11))
+ if (slen >= 11 && !Perl_ibcmp(pTHX_ sbuf, "listfields ", 11))
{
/* remove pre-space */
slen -= 10;
@@ -2704,6 +2704,10 @@
AV *av;
MYSQL_ROW cols;
unsigned long* lengths;
+ int rc;
+ imp_sth_fbh_t * fbh;
+ MYSQL_BIND *bind;
+ D_imp_dbh_from_sth;

#if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
if (imp_sth->use_server_side_prepare)
@@ -2745,13 +2749,9 @@
return Nullav;
}

- D_imp_dbh_from_sth;
(imp_dbh->mysql).net.last_errno = 0;

#if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
- int rc;
- imp_sth_fbh_t * fbh;
- MYSQL_BIND *bind;
if (imp_sth->use_server_side_prepare)
{
if (dbis->debug >= 2)
@@ -3465,15 +3465,16 @@

/*
This fixes the bug whereby no warning was issued upone binding a
- non-numeric as numeric
+ defined non-numeric as numeric
*/
- if (sql_type == SQL_NUMERIC ||
- sql_type == SQL_DECIMAL ||
- sql_type == SQL_INTEGER ||
- sql_type == SQL_SMALLINT ||
- sql_type == SQL_FLOAT ||
- sql_type == SQL_REAL ||
- sql_type == SQL_DOUBLE)
+ if (SvOK(value) &&
+ (sql_type == SQL_NUMERIC ||
+ sql_type == SQL_DECIMAL ||
+ sql_type == SQL_INTEGER ||
+ sql_type == SQL_SMALLINT ||
+ sql_type == SQL_FLOAT ||
+ sql_type == SQL_REAL ||
+ sql_type == SQL_DOUBLE) )
{
if (! looks_like_number(value))
{
diff -ruN DBD-mysql-3.0000.orig/dbdimp.h DBD-mysql-3.0000/dbdimp.h
--- DBD-mysql-3.0000.orig/dbdimp.h 2005-07-01 01:03:38.000000000 +0100
+++ DBD-mysql-3.0000/dbdimp.h 2005-07-01 10:28:20.756315400 +0100
@@ -19,7 +19,8 @@
*/
#include /* installed by the DBI module */
#include /* Comes with MySQL-devel */
-#include /* Comes MySQL */
+#include /* Comes with MySQL */
+#include /* Comes with MySQL */
#include /* Comes with MySQL-devel */

/*
@@ -173,7 +174,7 @@
char * data;
double ddata;
long ldata;
- long long lldata;
+ longlong lldata;

} imp_sth_fbh_t;



--------------090908030208010100090906
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
--------------090908030208010100090906--

Re: DBD::mysql 3.000 Released

am 01.07.2005 14:44:00 von Jochen Wiedmann

On 7/1/05, Steve Hay wrote:

> to remove all mention of mysql_config which doesn't exist on Win32, and
> to sort out problems with "long long", "strncasecmp", etc.

As Patrick seems to be an employee of MySQL AB: A possibly better
solution would be to finally add mysql_config to the Windows
distributions. I can think of absolutely no reason, why this shouldn't
be possible or even difficult. And the advantages are quite obvious,
as the required libraries are varying, in particular on Windows.


Jochen

--=20
What are the first steps on the moon, compared to your child's?

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

Re: DBD::mysql 3.000 Released

am 01.07.2005 18:02:43 von Patrick Galbraith

Steve,

Yes, I'll be doing another release soon to address these particular
issues,

Kind regards,

Patrick

On Jul 1, 2005, at 11:10 AM, Steve Hay wrote:

> Patrick Galbraith wrote:
>
>> Dear DBD::mysql Users and Developers,
>>
>> I am pleased to announce the release of DBD::mysql 3.0000, now
>> available via CPAN!
>>
> Oh dear.
>
> This doesn't build at all on Win32. You still haven't incorporated the
> patches that I sent here:
>
> http://www.mail-archive.com/dbi-dev@perl.org/msg03889.html
>
> to remove all mention of mysql_config which doesn't exist on Win32, and
> to sort out problems with "long long", "strncasecmp", etc.
>
> It also doesn't incorporate the patch that I sent here:
>
> http://lists.mysql.com/perl/3554
>
> without which you can't bind the undef value to insert a NULL into the
> database.
>
> Any chance of these issues being addressed anytime soon?
>
> - Steve
>
>
> ------------------------------------------------
> Radan Computational Ltd.
>
> The information contained in this message and any files transmitted
> with it are confidential and intended for the addressee(s) only. If
> you have received this message in error or there are any problems,
> please notify the sender immediately. The unauthorized use,
> disclosure, copying or alteration of this message is strictly
> forbidden. Note that any views or opinions presented in this email
> are solely those of the author and do not necessarily represent those
> of Radan Computational Ltd. The recipient(s) of this message should
> check it and any attached files for viruses: Radan Computational will
> accept no liability for any damage caused by any virus transmitted by
> this email.
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=patg@mysql.com
>
Patrick Galbraith Senior Software Developer
patg@mysql.com http://www.mysql.com

Those who fear climbing mountains
Shall live forever in the holes - Arab Poet


--
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: DBD::mysql 3.000 Released

am 06.07.2005 18:02:58 von Paul DuBois

At 14:44 +0200 7/1/05, Jochen Wiedmann wrote:
>On 7/1/05, Steve Hay wrote:
>
>> to remove all mention of mysql_config which doesn't exist on Win32, and
>> to sort out problems with "long long", "strncasecmp", etc.
>
>As Patrick seems to be an employee of MySQL AB: A possibly better
>solution would be to finally add mysql_config to the Windows
>distributions. I can think of absolutely no reason, why this shouldn't
>be possible or even difficult. And the advantages are quite obvious,
>as the required libraries are varying, in particular on Windows.

I suppose one problem is that Windows doesn't have /bin/sh. mysql_config
is a shell script.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
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: DBD::mysql 3.000 Released

am 06.07.2005 22:37:41 von Jochen Wiedmann

Paul DuBois wrote:

> I suppose one problem is that Windows doesn't have /bin/sh. mysql_config
> is a shell script.

It does have cmd.exe. And for the purpose of mysql_config, that is way
enough, isn't it?


Jochen


--
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: DBD::mysql 3.000 Released

am 07.07.2005 01:29:22 von Paul DuBois

At 22:37 +0200 7/6/05, Jochen Wiedmann wrote:
>Paul DuBois wrote:
>
>>I suppose one problem is that Windows doesn't have /bin/sh. mysql_config
>>is a shell script.
>
>It does have cmd.exe. And for the purpose of mysql_config, that is
>way enough, isn't it?

I guess I wasn't aware that cmd.exe ran Bourne shell scripts.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
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: DBD::mysql 3.000 Released

am 21.07.2005 07:04:31 von Randy Kobes

On Wed, 6 Jul 2005, Paul DuBois wrote:

> At 14:44 +0200 7/1/05, Jochen Wiedmann wrote:
> >On 7/1/05, Steve Hay wrote:
> >
> >> to remove all mention of mysql_config which doesn't exist on Win32, and
> >> to sort out problems with "long long", "strncasecmp",
> >> etc.
> >
> >As Patrick seems to be an employee of MySQL AB: A
> >possibly better solution would be to finally add
> >mysql_config to the Windows distributions. I can think of
> >absolutely no reason, why this shouldn't be possible or
> >even difficult. And the advantages are quite obvious, as
> >the required libraries are varying, in particular on
> >Windows.
>
> I suppose one problem is that Windows doesn't have
> /bin/sh. mysql_config is a shell script.

I've been playing around with a perl script for Win32
that emulates the mysql_config shell script - this is at
http://theoryx5.uwinnipeg.ca/mysql_config_win32.pl
What this will do is install a mysql_config.pl (and
associated .bat file) under an installed $MYSQL/bin/
directory; to do so, either put $MYSQL/bin/ in the PATH
and run
perl mysql_config_win32.pl
or else give the full path to the root MySQL directory as
perl mysql_config_win32.pl --with-mysql=C:\Path\to\MySQL

With this, and the following patch to Makefile.PL of
DBD-mysql (version 3.0002):
============================================================ ==
--- Makefile.PL.orig Sun Jul 3 16:01:18 2005
+++ Makefile.PL Wed Jul 20 23:32:10 2005
@@ -3,7 +3,7 @@
BEGIN {
use Config;

- if ($] == 5.008 && $ENV{"LANG"} ne "C") {
+ if ($] == 5.008 && $ENV{"LANG"} ne "C" && $^O ne 'MSWin32') {
$ENV{LANG} = "C";
print STDERR "\n\n\n\$ENV{LANG} is not 'C' execing 'perl Makefile.PL'".
" with ENV{LANG} == 'C'\n You can skip this check by: 'export ".
@@ -50,12 +50,13 @@

my $source = {};

-if ($^O !~ /mswin32/i)
{
#Check for mysql_config first
$source->{'mysql_config'}="guessed";
if ($opt->{'mysql_config'})
- {
+ {
+ $opt->{'mysql_config'} = Win32::GetShortPathName($opt->{'mysql_config'})
+ if $^O eq 'MSWin32';
if (-f $opt->{'mysql_config'})
{
$source->{'mysql_config'} = "Users choice";
@@ -396,7 +397,6 @@
by default the port number is choosen from the
mysqlclient library
--mysql_config= Specify for mysql_config script
- (Not supported on Win32)
--nocatchstderr Supress using the "myld" script that redirects
STDERR while running the linker.
--nofoundrows Change the behavoiur of \$sth->rows() so that it
@@ -445,7 +445,6 @@
return;
}

- if ($^O !~ /mswin32/i)
{
# First try to get options values from mysql_config
my $command = $opt->{'mysql_config'} . " --$param";

============================================================ ========
one can configure DBD-mysql on Win32 either by having
$MYSQL/bin/ in the PATH, or by running
perl Makefile.PL --mysql_config=C:\Path\to\MySQL\bin\mysql_config.bat

There may be, though, implicit assumptions in this that are
particular to my configuration - if you try this, and find
problems, please let me know.

--
best regards,
randy kobes

--
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: DBD::mysql 3.000 Released

am 21.07.2005 19:57:02 von Patrick Galbraith

Randy,

This looks very excellent. Let me play around with it, and I would need
to do a dev release with it first (which I was planning to do soon
anyway) just to make sure people have no issues with it (as I've
learned is a good practice anytime you change things ;)

thanks very very much!

Patrick

On Jul 21, 2005, at 7:04 AM, Randy Kobes wrote:

> On Wed, 6 Jul 2005, Paul DuBois wrote:
>
>> At 14:44 +0200 7/1/05, Jochen Wiedmann wrote:
>>> On 7/1/05, Steve Hay wrote:
>>>
>>>> to remove all mention of mysql_config which doesn't exist on
>>>> Win32, and
>>>> to sort out problems with "long long", "strncasecmp",
>>>> etc.
>>>
>>> As Patrick seems to be an employee of MySQL AB: A
>>> possibly better solution would be to finally add
>>> mysql_config to the Windows distributions. I can think of
>>> absolutely no reason, why this shouldn't be possible or
>>> even difficult. And the advantages are quite obvious, as
>>> the required libraries are varying, in particular on
>>> Windows.
>>
>> I suppose one problem is that Windows doesn't have
>> /bin/sh. mysql_config is a shell script.
>
> I've been playing around with a perl script for Win32
> that emulates the mysql_config shell script - this is at
> http://theoryx5.uwinnipeg.ca/mysql_config_win32.pl
> What this will do is install a mysql_config.pl (and
> associated .bat file) under an installed $MYSQL/bin/
> directory; to do so, either put $MYSQL/bin/ in the PATH
> and run
> perl mysql_config_win32.pl
> or else give the full path to the root MySQL directory as
> perl mysql_config_win32.pl --with-mysql=C:\Path\to\MySQL
>
> With this, and the following patch to Makefile.PL of
> DBD-mysql (version 3.0002):
> ============================================================ ==
> --- Makefile.PL.orig Sun Jul 3 16:01:18 2005
> +++ Makefile.PL Wed Jul 20 23:32:10 2005
> @@ -3,7 +3,7 @@
> BEGIN {
> use Config;
>
> - if ($] == 5.008 && $ENV{"LANG"} ne "C") {
> + if ($] == 5.008 && $ENV{"LANG"} ne "C" && $^O ne 'MSWin32') {
> $ENV{LANG} = "C";
> print STDERR "\n\n\n\$ENV{LANG} is not 'C' execing 'perl
> Makefile.PL'".
> " with ENV{LANG} == 'C'\n You can skip this check by: 'export ".
> @@ -50,12 +50,13 @@
>
> my $source = {};
>
> -if ($^O !~ /mswin32/i)
> {
> #Check for mysql_config first
> $source->{'mysql_config'}="guessed";
> if ($opt->{'mysql_config'})
> - {
> + {
> + $opt->{'mysql_config'} =
> Win32::GetShortPathName($opt->{'mysql_config'})
> + if $^O eq 'MSWin32';
> if (-f $opt->{'mysql_config'})
> {
> $source->{'mysql_config'} = "Users choice";
> @@ -396,7 +397,6 @@
> by default the port number is choosen from
> the
> mysqlclient library
> --mysql_config= Specify for mysql_config script
> - (Not supported on Win32)
> --nocatchstderr Supress using the "myld" script that
> redirects
> STDERR while running the linker.
> --nofoundrows Change the behavoiur of \$sth->rows() so
> that it
> @@ -445,7 +445,6 @@
> return;
> }
>
> - if ($^O !~ /mswin32/i)
> {
> # First try to get options values from mysql_config
> my $command = $opt->{'mysql_config'} . " --$param";
>
> ============================================================ ========
> one can configure DBD-mysql on Win32 either by having
> $MYSQL/bin/ in the PATH, or by running
> perl Makefile.PL
> --mysql_config=C:\Path\to\MySQL\bin\mysql_config.bat
>
> There may be, though, implicit assumptions in this that are
> particular to my configuration - if you try this, and find
> problems, please let me know.
>
> --
> best regards,
> randy kobes
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=patg@mysql.com
>
Patrick Galbraith Senior Software Developer
patg@mysql.com http://www.mysql.com

"Whatever action a great man performs, common men follow. Whatever
standards he sets by exemplary acts, all the world pursues" --
Bhagavad Gita


--
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: DBD::mysql 3.000 Released

am 07.08.2005 01:48:44 von Randy Kobes

On Thu, 21 Jul 2005, Patrick Galbraith wrote:

> On Jul 21, 2005, at 7:04 AM, Randy Kobes wrote:
[ ... ]
>> I've been playing around with a perl script for Win32
>> that emulates the mysql_config shell script - this is at
>> http://theoryx5.uwinnipeg.ca/mysql_config_win32.pl
[ ... ]
> This looks very excellent. Let me play around with it, and
> I would need to do a dev release with it first (which I
> was planning to do soon anyway) just to make sure people
> have no issues with it (as I've learned is a good practice
> anytime you change things ;)

I've since added some pod to this script, and put it up at
http://www.cpan.org/authors/id/R/RK/RKOBES/mysql_config_win3 2.pl
to make it more accessible.

--
best regards,
randy

--
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: DBD::mysql 3.000 Released

am 08.08.2005 19:57:25 von Patrick Galbraith

Randy,

I wanted to get this patch in the last dev release, but was pressed
for time. I do intend for the next dev release to contain it (however
I still need to review it ;) ). I'm wondering about whether if it's a
good solution, it might even be good to include into the server. I'll
have to go over it not just with myself, but with internal people as
well to get their thoughts.

Kind regards,

Patrick

On Aug 7, 2005, at 1:48 AM, Randy Kobes wrote:

> On Thu, 21 Jul 2005, Patrick Galbraith wrote:
>
>
>> On Jul 21, 2005, at 7:04 AM, Randy Kobes wrote:
>>
> [ ... ]
>
>>> I've been playing around with a perl script for Win32
>>> that emulates the mysql_config shell script - this is at
>>> http://theoryx5.uwinnipeg.ca/mysql_config_win32.pl
>>>
> [ ... ]
>
>> This looks very excellent. Let me play around with it, and I would
>> need to do a dev release with it first (which I was planning to do
>> soon anyway) just to make sure people have no issues with it (as
>> I've learned is a good practice anytime you change things ;)
>>
>
> I've since added some pod to this script, and put it up at
> http://www.cpan.org/authors/id/R/RK/RKOBES/mysql_config_win3 2.pl
> to make it more accessible.
>
> --
> best regards,
> randy
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=patg@mysql.com
>


--
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