EB-8346, EB-8629 For performance reasons removed the procedure and added  new merge statement to update.
Merge remote-tracking branch 'upstream/master'