[BISERVER-11687] The following unexpected error has occurred during adding fields to the IR: "The generated SQL-query did not execute successfully".
(cherry picked from commit 92b529e)
[BISERVER-11687] The following unexpected error has occurred during adding fields to the IR: "The generated SQL-query did not execute successfully".

Unit test

(cherry picked from commit 92b529e)
Merge pull request #147 from stepanovdg/BISERVER-11687_5.1.2

[SP-1499][5.1.2.0] The following unexpected error has occurred during adding fields to the IR: "The generated SQL-query did not execute successfully".