Fix some bugs in non supported sql pooling code.