shed: adding mysql functions and tests