Imported from http://svn.process-one.net/ejabberd-modules/mysql/trunk/