Burning Question of the Week
Posted in Random Thoughts
Forenoon watch, 1 bell (8:44 am)

How is killing the only two evil Jedi in the universe bringing balance to the Force?

3 Comments »
Evil Includes
Posted in Tech
Afternoon watch, 4 bells (2:22 pm)

I finally solved a terrible C++/MySQL C API include issue. Unfortunately, I'm stuck with a pretty old version of the MySQL server on one of my servers (MySQL v3.23—yes, I know how old it is!)

I finished writing a new wrapper API to access a MySQL server, and had the unfortunate luck to name my class mysql_server. I say unfortunate because my header file inclusion guard said

#ifndef MYSQL_SERVER
#define MYSQL_SERVER

Little did I know, the MySQL 3.23 library actually defines this value somewhere, and it caused me to have the strangest link errors I've ever seen! Undefined references to common functions like mysql_real_query, mysql_init, etc.

In later libraries (MySQL 5.0 for sure), this value is no longer used. I can only assumed they used something more intelligent like __MYSQL_SERVER or something not normally seen in user-space.

I'm sure I'm not the first person to be burned by this, which explains why it has been changed. I may, however, be one of the last—I can't imagine there are a lot of servers out there using such an old version of MySQL…

Leave a Comment »