Extract strdup() for MySQL as library function