Add test for bug, fixed with other fixes
merge tjoneslo: Add test for bug, fixed with other fixes

Merge pull request #1247 from tjoneslo/sql-layer/fix-bug-1042316
https://github.com/FoundationDB/sql-layer/pull/1247