Fix qouting of attributes in the update part of upsert query for mysql. Closes #2668