fix test failing on sqlite

Change-Id: I99f484cc123649a66be0a7e097667b60ab4f5755
fix error in test (not spotted so far because test is not run on mysql installs)

Change-Id: I122afd84302f4d130e1d324b83c8676d496c65de
Merge "fix error in test (not spotted so far because test is not run on mysql installs)"