update check on entity already processed refactored
Merge branch 'mysql_functions'
added debug and limit parameters