Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

192.168.1.41:8000, Www.xxxcon., %s wwwxxxcon, %s wwwxxxcon, www.xxxcon, xxxxdup, bitlord outgoing port settings, ckowwwxxx, 192.168.1.41:8000/nor-482.html, php.ini "Unable to initialize module"

Links

XODOX
Impressum

#1: DBD::mysql 4.019 Released

Posted on 2011-05-09 20:24:21 by Patrick Galbraith

Dear Perl and MySQL enthusiasts,

I=92m pleased to announce the release of DBD::mysql 4.019. I=92m
especially pleased because there are some new enhancements and
features that have been provided by contributions from the community:

* Asynchronous support, added by Rob Hoelz. This is a new feature to
DBD::mysql that takes advantage of libmysql=92s asynchronous functions
(see Jan=92s article from 2008
http://jan.kneschke.de/2008/9/9/async-mysql-queries-with-c-a pi/) .
From the DBD::mysql documentation:

You can make a single asynchronous query per MySQL connection; this
allows you to submit a long-running query to the server and have an
event loop
inform you when it=92s ready. An asynchronous query is started by either
setting the =91async=92 attribute to a true value in the DBI do() method,
or in the DBI prepare() method. Statements created with async set to
true in prepare always run their queries asynchronously when DBI
execute() is called. The driver also offers three additional methods:
mysql_async_result, mysql_async_ready(), and mysql_fd.
mysql_async_result() returns what do or execute would have; that is,
the number of rows affected. mysql_async_ready() returns true if
mysql_async_result() will not block, and zero otherwise. They both
return undef if that handle is not currently running an asynchronous
query. mysql_fd returns the file descriptor number for the MySQL
connection; you can use this in an event loop.

use feature 'say';
$dbh->do('SELECT SLEEP(10)', { async =3D> 1 });
until($dbh->mysql_async_ready) {
say 'not ready yet!';
sleep 1;
}
my $rows =3D $dbh->mysql_async_result;

* Enable environment variables for installation options from Amiri
Barksdale. This is a feature that makes installation easier. For
instance, you can set:

export DBD_MYSQL_TESTDB=3Dtest
export DBD_MYSQL_TESTHOST=3Dlocalhost
export DBD_MYSQL_TESTPASSWORD=3Ds3kr1+

And then when you build and test DBD::mysql, the installation process
will automatically pick these values up. There are many more
environment variables documented on the DBD::mysql POD

* Other various cleanups, fix from Pedro Melo which fixed code from
4.018 that broke in newer versions of Perl
* Cleanup of some warnings that persnickety compilers complained about

It=92s great moving this project along, and I appreciate the patches and
suggestions from the community!

The code can be found at:

http://search.cpan.org/~capttofu/DBD-mysql-4.019/lib/DBD/mys ql.pm

Or

git clone https://github.com/CaptTofu/DBD-mysql

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

Report this message

#2: Re: DBD::mysql 4.019 Released

Posted on 2011-05-09 21:08:54 by Tim Bunce

On Mon, May 09, 2011 at 02:24:21PM -0400, Patrick Galbraith wrote:
>=20
> You can make a single asynchronous query per MySQL connection; this
> allows you to submit a long-running query to the server and have an
> event loop inform you when itâ€=99s ready.

That's great, but...

> An asynchronous query is started by either
> setting the â€=98asyncâ€=99 attribute to a true value

.... that should be 'mysql_async'. I.e., the name of the driver-private
attribute should include the drivers prefix.

Please add mysql_async and deprecate async in the next release.

Tim.

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

Report this message

#3: Re: DBD::mysql 4.019 Released

Posted on 2011-05-11 07:10:28 by Curtis Jewell

On Mon, 09 May 2011 14:24 -0400, "Patrick Galbraith" <patg@patg.net>
wrote:
> Dear Perl and MySQL enthusiasts,
>=20
> Iâ€=99m pleased to announce the release of DBD::mysql 4.019. Iâ€=
=99m
> especially pleased because there are some new enhancements and
> features that have been provided by contributions from the community:

And I'm sorry to say that it DOES NOT COMPILE on Strawberry Perl 5.10.x
32-bit or 5.12.x 64-bit:

Putting it in the compilation chain:
http://hg.curtisjewell.name/Perl-Dist-Strawberry/rev/5659321 f22fa

Taking it back out:
http://hg.curtisjewell.name/Perl-Dist-Strawberry/rev/6eabb35 2a96d

Why? (64-bit output, 32-bit is similar)

STDOUT:
cp lib/DBD/mysql.pm blib\lib\DBD\mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib\lib\DBD\mysql\GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib\lib\DBD\mysql\INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib\lib\Bundle\DBD\mysql.pm
gcc -c -IC:\strawberry\perl\vendor\lib\auto\DBI
-IC:\strawberry\c\bin\..\include\mysql_5 -DDBD_MYSQL_INSERT_ID_IS_GOOD
-g -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 =20=
=20
-DVERSION=3D\"4.019\" -DXS_VERSION=3D\"4.019\"=20
"-IC:\strawberry\perl\lib\CORE" dbdimp.c

STDERR:
dbdimp.c:28:20: error: poll.h: No such file or directory
dbdimp.c: In function 'mysql_db_disconnect':
dbdimp.c:2166: warning: cast from pointer to integer of different size
dbdimp.c: In function 'mysql_st_internal_execute':
dbdimp.c:3108: warning: '_errno' redeclared without dllimport attribute:
previous dllimport ignored
dbdimp.c: In function 'mysql_st_execute':
dbdimp.c:3420: warning: cast from pointer to integer of different size
dbdimp.c: In function 'mysql_st_fetch':
dbdimp.c:3717: warning: cast from pointer to integer of different size
dbdimp.c:3862: warning: cast from pointer to integer of different size
dbdimp.c:3870: warning: cast from pointer to integer of different size
dbdimp.c: In function 'mysql_st_STORE_attrib':
dbdimp.c:4180: warning: cast from pointer to integer of different size
dbdimp.c:4190: warning: cast from pointer to integer of different size
dbdimp.c: In function 'mysql_st_FETCH_attrib':
dbdimp.c:4387: warning: cast from pointer to integer of different size
dbdimp.c: In function 'mysql_db_async_ready':
dbdimp.c:5097: error: storage size of 'fds' isn't known
dbdimp.c:5101: error: 'POLLIN' undeclared (first use in this function)
dbdimp.c:5101: error: (Each undeclared identifier is reported only once
dbdimp.c:5101: error: for each function it appears in.)
dmake.exe: Error code 129, while making 'dbdimp.o'

Apparently I don't have the C compiler headers required for the
asynchronous stuff. And I know other compilers may very well be in the
same boat. Anything magic I should do to deactivate it for
5.12.3.1/5.12.4.0 and 5.14.0.0? Or do I wait for 4.020 for the magic to
be provided? (I'm not taking that level of change this late in the game,
sorry. 4.018 it is for the 5.10.1.5 and 5.12.3.0 versions that I'm
building tonight.)

--Curtis
--
Curtis Jewell
csjewell@cpan.org http://csjewell.dreamwidth.org/
perl@csjewell.fastmail.us http://csjewell.comyr.org/perl/

"Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c

Strawberry Perl for Windows betas: http://strawberryperl.com/beta/


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

Report this message