PDO_MYSQL: now with native prepared statements (mysql 4.1 and up)

I've had a number of people ask me about this feature recently, and now it's here. What took so long? I just didn't have mysql 4.1 installed anywhere, or enough time to set aside to look into it. A patch from Guy Harrison (for multiple rowsets) caught me at just the right time today, and set me up for some hacking.

In CVS (and showing up on snaps soon), the pdo_mysql driver now has support for the following features when compiled against mysql 4.1 or higher:

  • Support for queries returning multiple rowsets, via PDOStatement::nextRowset().
  • Supports "native" sqlstate error codes, for "better" error reporting.
  • Supports native prepared statements and bound parameters.

I'm looking for feedback on these changes; even if you have an older mysql installation, please try the snapshot, as I want to ensure that it continues to build and work fine there (should be fine, but there's nothing better than physically confirming it).

Any problems, then hop along to http://bugs.php.net/ and file a bug report; thanks!

(PS: installing mysql 4.1 on a gentoo box when you only have a 56k modem takes a while)