• Blog
  • Get Help Now!
  • Customer Portal

BlueGecko Denmark

  • Why you need us
    • Why act now
    • Why are we unique
  • What we do
    • Products Supported 24/7
      • MySQL
      • Postgres
      • SQL Server
      • Open Source
      • OS & Storage
  • How we do it
    • Consulting
    • System Monitoring
    • Security
  • Support
    • Blog
      • Oracle
      • MySQL
      • News & Events
      • Oracle Applications
      • Amazon Web Services
      • Jeremiah Wilton’s Oradeblog
      • OurSQL Community Podcast
      • Remote DBA
    • Team viewer
    • Whitepapers
  • About Us
    • Philosophy
    • The Blue Gecko Teams
    • Employment Opportunities
    • Partners
    • News
    • Press
  • Contact Us

May 9, 2011 by pgalbraith

DBD::mysql 4.019 released

Dear Perl and MySQL enthusiasts,

I’m pleased to announce the release of DBD::mysql 4.019. I’m 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’s asynchronous functions (see Jan’s article from 2008 http://jan.kneschke.de/2008/9/9/async-mysql-queries-with-c-api/) . 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’s ready. An asynchronous query is started by either
setting the ‘async’ 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 => 1 });
  until($dbh->mysql_async_ready) {
    say 'not ready yet!';
    sleep 1;
  }
  my $rows = $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=test
    export DBD_MYSQL_TESTHOST=localhost
    export DBD_MYSQL_TESTPASSWORD=s3kr1+

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’s 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/mysql.pm

Or

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

Related posts:

  1. DBD::mysql 4.018 released
  2. DBD::mysql 4.020 Released
  3. Memcached Functions for MySQL 1.1 released!

Filed Under: MySQL

Categories

  • Amazon Web Services
  • Configuration Management
  • downtime
  • Drizzle
  • ebs
  • Education
  • elastic block store
  • elastic compute cloud
  • hosting
  • hot backup
  • ignorance
  • Infrastructure
  • IOUG
  • Jeremiah Wilton's Oradeblog
  • misconception
  • misconceptions
  • Monocle
  • MySQL
  • MySQL Council
  • News & Events
  • Oracle
  • Oracle Applications
  • Oracle Data Guard
  • Oracle Database
  • Oracle Database Appliance
  • Our People
  • OurSQL Community Podcast
  • outage
  • parallel
  • performance
  • podcast
  • proof
  • Remote DBA
  • replication
  • S3
  • Security
  • SQL Server
  • System monitoring
  • Uncategorized

Contact Blue Gecko

  • This field is for validation purposes and should be left unchanged.

Get Our Newsletter

  • This field is for validation purposes and should be left unchanged.

The Fine Print

  • Privacy Policy
  • Terms of Use
  • When is remote DBA the right solution
  • What are remote DBA services
  • Get Help

Blog Categories

  • 24/7 support
  • Blue Gecko 360° Services
  • Products Supported 24/7

Virtual runs

Contact Blue Gecko

Blue Gecko A/S
Slotsgade 21
DK – 4200 Slagelse
Denmark
Phone: (DK) +45 70 60 51 20

Networks

  • Email
  • Twitter

© Blue Gecko Group