ThinkPart

Andrey's blog

 

Query caching in PHP/mysqlnd - Reloaded

 

The MySQL UC 2009 is over and I got bored in the evening before I had to leave Santa Clara and decided to play again with query caching in mysqlnd. I have always said that mysqlnd is ready for it, the infrastructure is there and that we need just few changes to make it work. Well, I decided to bite the bullet and do it. Spent about 4h in the evening and on the next day 2h while waiting on the San Jose (SJC) airport and continued on the flight to Denver, where I am having vacation. On the plane I was almost ready and today I made the final changes to the preliminary patch, that seems to work :)

I did a small benchmark, a microbenchmark.


Read more ...

mysqlnd talk this afternoon

 

In a few hours I will give my talk on mysqlnd. Well, the talk is not mine but we wrote it together with Ulf Wendel, of the MySQL Connectors Team fame. Although we haven't added much functionality to mysqlnd in the recent months mysqlnd is still pretty advanced and started to mature. I will talk about why mysqlnd is unique, why is it cool, why is it fast, and why you should use it!


Read more ...

Connector/C++ talk already in the history

 

Yesterday I gave my talk, in front of not that many people, about Connector/C++ at the MySQL UC 2009. Not too many questions came from the public, but this is a new product which very specific target group. You know, almost nobody writes Web applications in C++. And Java is the server language for the Enterprise. So I should have expected not many people in the room.

If you have missed the talk, don't worry. In May there will be a webinar which you can attend and if you miss it, you can just watch it at later time. The webinars are recorded and offered freely.

Yesterday the Connector/C++ got the GA stamp and we officially support it. Although we are going to make changes, mostly backward compatible, because this GA, 1.0.5, added the basic functionality the people need to use MySQL with C++ without using the weird libmysql API, which makes your life hard, if you don't use boost and start to get exceptions - you are gonna leak big time.


Read more ...

Connector/C++ @ MySQL UC 2009

 

I will give a talk about Connector/C++ (and mysqlnd in another slot) next week at the MySQL UC 2009. We had to fit the presentation in about 20 slides to be able to fit in the small timeframe of 45 mins. So far I have given only presentations of about 90 minutes, incl. the shoot me with your questions part. I rehearsed today, both talks. Everything seems fine and I will fit. So, if you are an ISV that uses MySQL and use C++ come to see my presentation, there is something to learn. If you are open source developer, who uses C++, come to the room and allow me to introduce MySQL Connector/C++ to you. I am sure you will never get back to libmysql and MySQL Connector/C Wink

The long waited Connector/C++ review article is there

 

Hurry up. Click here to read Giri Mandalika's article on MySQL Connection C++. He is using 1.0.4-beta for his tests and shows how simple it is to use the connector. It is all about developing in C++ for MySQL that became easier!

Broken dual-head in Ubuntu and how to fix it

 

Since some time I am a dual-head user. I recently bought a 19" Ilyama 1680x1050 (cool resolution for 19") and it served me well. It is much more smaller than the 24" Dell UltraSharp I have. The differences in the resolution is not that big. The Dell is 1920x1200. Yesterday I saw that Ilyama have a Prolite series monitor, the same as the 19", 22" which has 1920x1200. I have followed in the recent times the 23" line of Samsung - the 2343 NW. Which is about 160 Euro and offers not that standard resolution (2048 x 1152 / 16:9). The resolution is strange, right? But gives the possibility to have 2 browsers at 1024 pixel width next to each other. In the last years the monitors got bigger and cheaper, more real estate. And they got wider. Probably driven by the multimedia market, although widescreen is good also for those who use IDEs.


Read more ...

How big are the basic types on the most used systems

 

After I yesterday checked the size of wchar_t on range number of platforms I decided to extend this to many more types. Again the same systems were used, a few more were added (MacOSX 10.5 x86 and x86_64 are the ones most used). The information is in pretty raw state bug my blog software is not able to present big tables correctly, thus I am going the raw way.

What is most interesting?

  • long double varies a lot. Between 8 bytes (AIX 5.2 and 5.3 (ppc32/ppc64), Windows 32 & 64) through 12 bytes (Linux/FreeBSD/Solaris but not MacOSX on  x86) to 16 byte (x86_64, ia64, hppa32, hppa64, ia64, ppc32/ppc64 (all MacOSX), sparc32, sparc64)
  • Windows is missing few types
  • MacOSX (10.4 & 10.5) doesn't have clock_id and timer_t
  • time_t is 4 bytes on x86, ppc32, hppa32
  • time_t is 8 bytes on x86_64, ia64, ppc64, hppa64, Windows 32&64
  • int is always 4 bytes :)
  • long is always 4 bytes on 32bit
  • long is always 8 bytes on 64bit except on Win64
  • long long is present on all systems and is always 8 bytes
  • float is always 4 bytes and double 8 bytes
  • as expected size_t is 4 byte on 32bit and 8byte on 64bit, the same is valid for ssize_t, where available
  • off_t is 4 byte on AIX 5.x ppc32, i5OS ppc32, x86(Linux, Solaris), sparc32, Win32 & 64
  • off_t is 8 byte on x86 (FreeBSD 6&7, MacOSX), x86_64, ia64, hppa64, ppc64, sparc64, MacOSX 10.x ppc32
  • intmax_t/uintmax_t are always 8 byte but missing on Win32 & 64
  • short is always 2 bytes

 


Read more ...

Named pipe support in MySQL Connector/C++

 

I suppose you have already heard from Ulf what MySQL Connector/C++ is. Today Ulf was looking at the test cases and out of the blue asked whether we support named pipes. Well, it wasn't tested but one can pass OPT_NAMED_PIPE to the connect method of the driver (or the MySQL_Connection constructor).


Read more ...

Of wchar_t

 

wchar_t was introduced long ago as wider version of char that should be enough while doing programs that grok Unicode. Unfortunately, as with all other C types the standard doesn't define the length. Thus some platforms have 2 byte others 4 byte wchar_t. I decided to check what are the sizes using an internal build tool at SUN/MySQL. And here are the results.


Read more ...

We just broke Connector C++'s interface

 

The topic sounds scary, right? Don't be afraid, we just wanted to mention that we introduced a change in the interface, after we released the beta yesterday. Previous examples which use ConnectionMetaData, ResultSetMetaData and ParameterMetaData won't work anymore. They used to use std::auto_ptr to keep the code from leaking.


Read more ...