Ulf Wendel

2009/02/19
by admin
3 Comments

PHP 5.3: Persistent Connections with ext/mysqli

As of PHP 5.3 the PHP MySQL extension mysqli (ext/mysqli) supports Persistent Database Connections. Persistent Connections are new to ext/mysqli but not new to ext/mysql or PDO. The news behind the news is the usage of COM_CHANGE_USER (C-API: mysql_change_user()) by ext/mysqli – no side effects any more. The "flagship" has idiot-proof Persistent Connections.

If you do not know what Persistent Database Connections are and you speak german I would like to point you to my guest posting at http://www.phphatesme.com. If you speak english, go for the PHP manual section and glance over this MySQL Newsletter from 2002(!).

Continue Reading →

2008/12/19
by admin
Comments Off on Connector/C++ 1.0.2alpha available – “X-Mas edition”

Connector/C++ 1.0.2alpha available – “X-Mas edition”

MySQL Connector/C++ 1.0.2 alpha is available for download at http://dev.mysql.com/downloads/connector/cpp/1.0.html, please see also the official announcement. Only three weeks after the first alpha, we decided to release a X-Mas edition. Not only the winter evenings in the northern hemisphere have become quite long also the Change History got quite long. Long enough for a bug fix release which brings some minor feature additions and includes our JDBC compliance test suite for the first time. MySQL Connector/C++ 1.0.2 alpha is a source code only release, meaning that you will have to compile it yourself. Please find Unix Make and Visual Studio [Express] instructions in the blog posting MySQL Connector/C++: compiling, using and debugging.

MySQL Workbench team is using the MySQL driver for C++ for its internal development version of MySQL Workbench 5.1 alpha. The Connector/C++ has successfully passed all Workbench internal tests. Nonetheless the driver is released as an alpha version. Although we run about 640 tests on 47 different platforms (different combinations of CPU and OS), and the tests cover some 75% of our code base, there may be bugs. We currently pass about 95% of our tests. Please keep this in mind when using the driver.

Happy Christmas, happy hacking!

2008/12/08
by admin
Comments Off on MySQL Connector/C++: filtering debug output

MySQL Connector/C++: filtering debug output

You know how to build MySQL Connector/C++ and write applications, because you have read my previous post MySQL Connector/C++: compiling, using and debugging. And, of course, its not working. therefore you try the debug trace. Are you capable of handling all the information in it? I am a lamer. The only Vi command I know is ":q".And I know nothing about sed and grep, therefore none of these can help me filtering the debug log. But I know a bit of PHP. I wrote myself a PHP script for filtering MySQL Connector/C++ debug traces when we started working on MySQL Connector/OpenOffice.org again. If you are not Andrey, this may be for you.

Andrey plays in a different league. Not only that he reads the traces like news papers because he knows every call, he also knows how to use Vi and friends However, his approach to handle several thousand lines of OOo traces has been to patch the driver itself. . Check the code of mysql_debug.cpp, if you are with him. If you do not want to do the filtering in C++ or you are concerned about modifying the source, my lamer approach might become handy.

Continue Reading →

2008/12/05
by admin
2 Comments

MySQL Connector/C++: compiling, using and debugging

It sounds like a strong argument when a developer states that his company is using its own products, like "MySQL Workbench is using MySQL Connector/C++" or "Connector/OpenOffice.org is based on Connector/C++". But at the end of the day you will need to try out the product yourself. You need to evaluate if its any good for you. Here you go with in-depth build, configure and debug instructions for the MySQL driver for C++ including an example of writing programs that use the driver.

Contents

Continue Reading →

2008/12/03
by admin
Comments Off on Happy Christmas!

Happy Christmas!

Its hard to believe but sometimes we create sexy software at MySQL: think of MySQL Proxy, MySQL Workbench or MySQL 5.1! Thank you for the MySQL 5.1 chocolate pie, Santo. When I saw the pie I fell in love with it. You made me start singing It’s A Man’s Man’s Man’s World and baking another pie…

WARNING: This web site shows pictures of pie baked using a bake your dream girl cake pan. Do not enter, if you do not know how to install MySQL. Do not enter, if you do not like to be a silly boy from time to time. By clicking on “Read More” you confirm that you are old enough to decide on your own when you want to use sexy software developed by MySQL!

Continue Reading →

2008/12/02
by admin
Comments Off on MySQL Connector/C++ 1.0.1alpha is available!

MySQL Connector/C++ 1.0.1alpha is available!

The first alpha version of the MySQL Connector/C++ has been published. You can download the source code from http://dev.mysql.com/downloads/connector/cpp/1.0.html . The MySQL Driver for C++ is a new connector aiming at C++ developers who want to profit from the convenience of using C++ when connecting to the MySQL Server. The API of the MySQL Connector/C++ mimics JDBC, a widely known and well established standard. Some 75% of the core JDBC API calls are available. Please find more details in the announcement.

If you hear that our primary goal for the alpha release has been to serve the needs of our "internal customers" MySQL Workbench and MySQL Connector/OpenOffice.org, you will not be surprised to find rather few changes in the Change History. The development version of MySQL Workbench runs fine on a (pre-)alpha code snapshot of the driver and the development version of Connector/OpenOffice.org has been successfully modified to use Connector/C++ as well.

Continue Reading →

2008/11/21
by admin
Comments Off on Langweiler

Langweiler

Wenn ein Blog ein Abbild des Lebens darstellt, dann sollte ich das wordle.net Warnsignal beachten.

2008/11/19
by admin
Comments Off on MySQL Workbench is using Connector/C++ pre-alpha snapshot

MySQL Workbench is using Connector/C++ pre-alpha snapshot

Eat your own dog food. The latest development version of MySQL Workbench 5.1 successfully runs a pre-alpha snapshot of the MySQL Driver for C++ since a few weeks. Enjoy your pizza at my costs, Andrey (Hristov). I lost my bet. Less than five bugs have been found when migrating MySQL Workbench to Connector/C++.

MySQL Connector/C++ is now being used by two "internal customers": MySQL Workbench and MySQL Connector/OpenOffice.org. And our internal development version of Connector/OpenOffice.org runs on Connector/C++ as well. The preview version of Connector/OpenOffice.org was using the MySQL Client Library (C-API)

Continue Reading →

2008/10/28
by admin
1 Comment

PHP: How mysqlnd async queries help you with sharding!

Recipe for conference talks: add a buzzword like "sharding" and show how mysqlnd helps you with asynchronous queries. Only two PHP database extensions give you asynchronous queries: mysqlnd and Postgres. Slides (OpenOffice) from the International PHP Conference 2008 have the details about the asynchronous query API in ext/mysqli (using mysqlnd).

Mysqlnd Async Ipc2008

View SlideShare presentation or Upload your own.

Asynchronous, non-blocking IO is an old favourite. Although its an old idea, and it is a well known technology that is supported in many environments, it is still new for PHP database extensions. A year ago, I blogged about parallel and asynchronous queries in mysqlnd. Shortly after we had it implemented but never tested it and therefore never pushed it forward. Parallel queries, using a background thread in PHP, did not turn out to fly. But asynchronous queries have some potential.

synchronous vs. asynchronous

Continue Reading →