Skip to content

Commit 73f3110

Browse files
committed
test(typecast): first null value, corrupts next field
1 parent cad7820 commit 73f3110

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/integration/connection/test-typecast.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,18 @@ connection.query(
3030
}
3131
);
3232

33+
connection.query(
34+
{
35+
sql: 'SELECT NULL as test, 6 as value;',
36+
typeCast: function(field, next) {
37+
return next();
38+
}
39+
},
40+
function(err, _rows) {
41+
assert.ifError(err);
42+
assert.equal(_rows[0].test, null);
43+
assert.equal(_rows[0].value, 6);
44+
}
45+
);
46+
3347
connection.end();

0 commit comments

Comments
 (0)