Open
Description
Run such snippet:
const ClickHouse = require('@apla/clickhouse');
const c = new ClickHouse({
host,
port,
auth
});
const q = 'select count() from table
-- ololololoolololololoolololololol
'
const stream = c.query(q);
stream.on('metadata', function (metadata) {
console.log('metadata', metadata);
});
stream.on('data', function (data) {
console.log('data!', data);
});
stream.on('error', err => {
console.log('error', err);
});
stream.on('end', () => {
console.log('end');
});
stream.on('end', () => {
console.log('end');
});
And receive nothing. Stream was closed and the script terminated. There were no fired events. However, if I remove comments from the query it will work properly.
I looked at tcpdump and saw that the request was sent to the server. After sending we got 'close' event from http.response inside the client's code then 'response' event and 'close' again.
Tried to send the request with http://ui.tabix.io/ - everything is fine. And it is the reason why I texted here. It looks like client bug, which not related to server settings.