Record output datasets in the task table
Mysql query missing
Missing quotes
Merge pull request #4235 from juztas/master

 Record output datasets in the task table. Fixes #4192