Add new controller/model to test lib_mysql; several bug fixed