Hartmut Holzgraefe's Blog

September 21, 2014

Changing the DEFINER of MySQL stored routines etc.

The question seemed easy enough:

We've dropped a user, now we want to change the DEFINER on all database objects that currently have it set to this dropped user?

This should be possible by checking the INFORMATION_SCHEMA tables of the appropriate object types (routines, triggers, views and events) and performing an ALTER on each of them that just modifies the DEFINER but nothing else, right?

Read More

August 18, 2014

Building MaxScale from source with Vagrant and Puppet

MaxScale for MariaDB and MySQL hides the complexity of database scaling from the application. To streamline building MaxScale from source and running the test suite, you can automate the process with some useful tools to meet your needs. I have created a Vagrant / Puppet setup I'd like to share with you.

Read More

April 30, 2014

Customized MySQL LOAD DATA LOCAL INFILE handlers with libmysqlclient

One of the lesser known (and used) MySQL Client API calls seems to be mysql_set_local_infile_handler() which allows to override the default LOAD DATA LOCAL INFILE behavior on the client side, allowing to import data in text form, e.g. in CSV format, from other sources than actual local files. I searched for some more detailed info than the reference page in the manual for this, or some example code using this mechanism, but couldn't really find any, so this post is going to try to close this gap.

Read More

April 16, 2014

A first second look at InnoDB spatial indexes in the MySQL 5.7 april lab release ...

The MySQL 5.7 April Labs release comes with a preview of spatial indexes for InnoDB, something that I've heard rumours about for quite a while but so far couldn't find any kind of actual confirmation for. Spatial indexes for InnoDB would more or less get rid of the last MyISAM-only feature (after the addition of fulltext indexing to InnoDB in MySQL 5.6) So it's about time to have a closer look at what has been brewing at "the cathedrals crypt" ...

Read More

April 14, 2014

MySQL/MariaDB autoconf macros

I've had my own set of autotool macros for building against different MySQL client and server APIs for quite a while. Originally created as part of my code generator projects (CodeGen_MySQL_UDF and CodeGen_MySQL_Plugin) I ended up having diverging copies in a few other projects, too (my and my autotools branch of ). So I've finally taken the time to merge the differnet copies into a single standalone project on GitHUB.

Read More

June 26, 2012

Nasty InnoDB regression in MySQL 5.5.25

We just ran into a nasty InnoDB bug that only seems to exist in MySQL 5.5.25: An InnoDB update that modifies a rows primary key can trigger some recursive behavior that creates new rows until all disk space is exceeded. This does not affect all primary key updates in general but only gets triggered when a few other conditions are also met, so you're not too likely to run into it, but if you do your mysqld server will waste a lot of IO bandwidth and storage space on this and will usually eventually run out of disk space.

Read More