@@ -10,7 +10,7 @@ function RowDataPacket() {
10
10
RowDataPacket . prototype . parse = function ( parser , fieldPackets , typeCast , nestTables , connection ) {
11
11
var self = this ;
12
12
var next = function ( ) {
13
- return self . _typeCast ( fieldPacket , parser , connection . config . timezone , connection . config . supportBigNumbers , connection . config . bigNumberStrings ) ;
13
+ return self . _typeCast ( fieldPacket , parser , connection . config . timezone , connection . config . supportBigNumbers , connection . config . bigNumberStrings , connection . config . dateStrings ) ;
14
14
} ;
15
15
16
16
for ( var i = 0 ; i < fieldPackets . length ; i ++ ) {
@@ -21,7 +21,7 @@ RowDataPacket.prototype.parse = function(parser, fieldPackets, typeCast, nestTab
21
21
value = typeCast . apply ( connection , [ new Field ( { packet : fieldPacket , parser : parser } ) , next ] ) ;
22
22
} else {
23
23
value = ( typeCast )
24
- ? this . _typeCast ( fieldPacket , parser , connection . config . timezone , connection . config . supportBigNumbers , connection . config . bigNumberStrings )
24
+ ? this . _typeCast ( fieldPacket , parser , connection . config . timezone , connection . config . supportBigNumbers , connection . config . bigNumberStrings , connection . config . dateStrings )
25
25
: ( ( fieldPacket . charsetNr === Charsets . BINARY )
26
26
? parser . parseLengthCodedBuffer ( )
27
27
: parser . parseLengthCodedString ( ) ) ;
@@ -38,7 +38,7 @@ RowDataPacket.prototype.parse = function(parser, fieldPackets, typeCast, nestTab
38
38
}
39
39
} ;
40
40
41
- RowDataPacket . prototype . _typeCast = function ( field , parser , timeZone , supportBigNumbers , bigNumberStrings ) {
41
+ RowDataPacket . prototype . _typeCast = function ( field , parser , timeZone , supportBigNumbers , bigNumberStrings , dateStrings ) {
42
42
var numberString ;
43
43
44
44
switch ( field . type ) {
@@ -47,6 +47,9 @@ RowDataPacket.prototype._typeCast = function(field, parser, timeZone, supportBig
47
47
case Types . DATETIME :
48
48
case Types . NEWDATE :
49
49
var dateString = parser . parseLengthCodedString ( ) ;
50
+ if ( dateStrings ) {
51
+ return dateString ;
52
+ }
50
53
var dt ;
51
54
52
55
if ( dateString === null ) {
0 commit comments