make everything works
Merge pull request #1 from nmmmnu/master

Ported to MySQL 5.5