Liveblogging: Extending MySQL by Brian “Krow” Aker
Brian wins the award for “most frequent great quotes during a talk”.
Before MySQL 5.1 a UDF was the only way to extend MySQL.
All you need in a UDF is: init() execute() deinit()
my_bool id3_parse_init(UDF_INIT *initid UDF_ARGS *args, char *message)
UDF_ARGS tell you about incoming args
char *message is the output that might return
args->arg_count is the # of args
WARNING: use STRICT mode in MySQL, otherwise there are tons of silent failures.
“When you work on databases you start to put everything in databases. Tip, don’t put a DVD into a database, because really long BLOBs aren’t actually supported….”
In MySQL 5.1, you can now install plugins (example is memcache_servers plugin):
mysql> INSTALL PLUGIN memcache_servers SONAME …