File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
test/integration/connection/encoding Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,20 @@ var common = require('../../../common');
3
3
var assert = require ( 'assert' ) ;
4
4
5
5
var connection = common . createConnection ( { charset : 'UTF8MB4_GENERAL_CI' } ) ;
6
- connection . query ( 'drop table __test_client_encodings' ) ;
7
- connection . query ( 'create table if not exists __test_client_encodings (name VARCHAR(200)) CHARACTER SET=utf8mb4' , function ( err ) {
6
+ connection . query ( 'drop table if exists __test_client_encodings' ) ;
7
+ connection . query ( 'create table if not exists __test_client_encodings (name VARCHAR(200)) CHARACTER SET=utf8mb4' , function ( err ) {
8
8
assert . ifError ( err ) ;
9
- connection . query ( 'delete from __test_client_encodings' , function ( err ) {
9
+ connection . query ( 'delete from __test_client_encodings' , function ( err ) {
10
10
assert . ifError ( err ) ;
11
11
connection . end ( ) ;
12
12
13
13
var connection1 = common . createConnection ( { charset : 'CP1251_GENERAL_CI' } ) ;
14
- connection1 . query ( 'insert into __test_client_encodings values("привет, мир")' , function ( err ) {
14
+ connection1 . query ( 'insert into __test_client_encodings values("привет, мир")' , function ( err ) {
15
15
assert . ifError ( err ) ;
16
16
connection1 . end ( ) ;
17
17
18
18
var connection2 = common . createConnection ( { charset : 'KOI8R_GENERAL_CI' } ) ;
19
- connection2 . query ( 'select * from __test_client_encodings' , function ( err , rows ) {
19
+ connection2 . query ( 'select * from __test_client_encodings' , function ( err , rows ) {
20
20
assert . ifError ( err ) ;
21
21
assert . equal ( rows [ 0 ] . name , 'привет, мир' ) ;
22
22
connection2 . end ( ) ;
You can’t perform that action at this time.
0 commit comments