mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
e6420c82ca
* mysql/postgresql: move Dockerfiles and docker_compose to docker/test * Build client containers in CI * pass tag to docker_compose
22 lines
550 B
JavaScript
22 lines
550 B
JavaScript
var mysql = require('mysql');
|
|
|
|
var connection = mysql.createConnection({
|
|
host : process.argv[2],
|
|
port : process.argv[3],
|
|
user : process.argv[4],
|
|
password : process.argv[5],
|
|
database : 'system',
|
|
});
|
|
|
|
connection.connect();
|
|
|
|
connection.query('SELECT 1 + 1 AS solution', function (error, results, fields) {
|
|
if (error) throw error;
|
|
|
|
if (results[0].solution.toString() !== '2') {
|
|
throw Error('Wrong result of a query. Expected: "2", received: ' + results[0].solution + '.')
|
|
}
|
|
});
|
|
|
|
connection.end();
|