Today I went through the fun task of updating my local MySQL installation to 5.1 in order to try out then new partitioning. The challenge here, was that I wanted to keep everything for fink in order (the same paths, and for the most part, the same options). So first, you need to download the [...]
Posts Filed in "MySQL"
13
Apr
php-database
This afternoon I posted my PHP database library on Google code. It’s designed to be very lightweight, and uses the PHP4 MySQL functions as well as the PostgreSQL functions, but is built for PHP5. It uses sprintf formatting, and works must like the Python database cursor’s, to help alleviate injection concerns while you are writing [...]
One of the developers at Curse was setting up a new database server today, and was trying to set all the defaults to UTF-8 for table creation/etc. While I knew about setting those, I always knew you still had to send the set names argument on your connection initialization. Well, it turns out, you don’t: [...]
17
Jan
Using LOCKs in MySQL
We ran across a fun gotcha today while performance testing some code. The issue was originally discovered when we noticed a 300ms query taking 20 seconds. After about an hour of debugging we found the issue to be with aliases in table locks. Here’s what our original SQL looked like: LOCK TABLES files_versiondownloadcount WRITE; [...]
5
Nov
MySQLdb on Leopard
As many people probably have, I ran across the problem of installing MySQLdb (Python) on Leopard today. The error: In file included from /usr/local/mysql/include/mysql.h:43, from _mysql.c:40: /usr/include/sys/types.h:92: error: duplicate ‘unsigned’ /usr/include/sys/types.h:92: error: two or more data types in declaration specifiers error: Setup script exited with error: command ‘gcc’ failed with exit status 1 Luckily, there [...]
