test for the createAssoc single sql problem

Test for #1586