Posts Filed in "MySQL"

12

Aug

Filed in MySQL with View Comments |

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 [...]

13

Apr

Filed in Code, MySQL, PHP, PostgreSQL with View Comments |

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 [...]

21

Feb

Filed in MySQL with View Comments |

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

Filed in Code, Curse, How-To's, MySQL with View Comments |

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

Filed in Code, How-To's, Mac, MySQL with View Comments |

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 [...]