File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -439,9 +439,9 @@ exports.readMysqlValue = function (
439439 if ( defPrefix === 'binary' ) {
440440 const bufsize = parseInt ( def . substr ( 7 , def . length - 2 ) , 10 ) ;
441441 result = Buffer . alloc ( bufsize , 0 ) ;
442- parser . parseBuffer ( size ) . copy ( result ) ;
442+ result = new Uint8Array ( parser . parseBuffer ( parser . parseBuffer ( size ) . copy ( result ) ) ) ;
443443 } else if ( defPrefix === 'varbin' ) {
444- result = parser . parseBuffer ( size ) ;
444+ result = new Uint8Array ( parser . parseBuffer ( size ) ) ;
445445 } else {
446446 result = parser . parseString ( size ) ;
447447 }
@@ -469,6 +469,8 @@ exports.readMysqlValue = function (
469469 } catch ( err ) {
470470 console . warn ( err ) ;
471471 }
472+ } else {
473+ result = new Uint8Array ( result ) ;
472474 }
473475 break ;
474476 case MysqlTypes . JSON :
You can’t perform that action at this time.
0 commit comments