6f8292435d
When a __prepared statement__ has no body in the query the backend responds with an `emptyQuery` message but never with a `commandComplete` or `errorResponse` message. The client was hanging forever waiting for one of the other two expected messages. The server was hanging forever waiting for the client to respond with a `sync` message. This change has the client send the required `sync` on receipt of an `emptyQuery` message when the query is a prepared statement. Fixes #822
9 lines
283 B
JavaScript
9 lines
283 B
JavaScript
//client should not hang on an empty query
|
|
var helper = require('../test-helper');
|
|
var client = helper.client();
|
|
client.query({ name: 'foo1', text: null});
|
|
client.query({ name: 'foo2', text: ' ' });
|
|
client.query({ name: 'foo3', text: '' }, function(err, res) {
|
|
client.end();
|
|
});
|