implement pure-mysql primitive