Add test case for CTE queries (WITH ...)

Tests for the bug fixed by commit b547553233b52fa5a84c24801c468530d8dd9a18.
None of the existing test cases covered that, so seems good to add one. This
test case gives a different error message than the original one, but it's
the same underlying issue.
It's preferable to leave PRODUCTCODE history.
Record the result of Build in configuration.xml.
Silence compiler warning.

Michael Paquier
Silence another compiler warning.

conn_settings cannot be NULL here.