@@ -1473,29 +1473,31 @@ describe.sequential(
14731473 { affectedRows : 1 , insertId : 0n , warningStatus : 0 }
14741474 ] ) ;
14751475 } else {
1476- assert . deepEqual ( res , { affectedRows : 4 , insertId : 0n , warningStatus : 0 } ) ;
1477- }
1478- if ( supportBulkUnitResults ) {
1479- res = await connBulk . batch ( { sql : 'INSERT INTO bufLength VALUES (?)' , fullResult : true } , [
1480- [ 'abc' ] ,
1481- [ 'cde' ] ,
1482- [ 1 ] ,
1483- [ new Date ( '2001-12-31 23:59:58' ) ]
1484- ] ) ;
14851476 assert . deepEqual ( res , [
1486- { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
1487- { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
1477+ { affectedRows : 2 , insertId : 0n , warningStatus : 0 } ,
14881478 { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
14891479 { affectedRows : 1 , insertId : 0n , warningStatus : 0 }
14901480 ] ) ;
1491- res = await connBulk . batch ( { sql : 'INSERT INTO bufLength VALUES (?)' , fullResult : false } , [
1492- [ 'abc' ] ,
1493- [ 'cde' ] ,
1494- [ 1 ] ,
1495- [ new Date ( '2001-12-31 23:59:58' ) ]
1496- ] ) ;
1497- assert . deepEqual ( res , { affectedRows : 4 , insertId : 0n , warningStatus : 0 } ) ;
14981481 }
1482+ res = await connBulk . batch ( { sql : 'INSERT INTO bufLength VALUES (?)' , fullResult : true } , [
1483+ [ 'abc' ] ,
1484+ [ 'cde' ] ,
1485+ [ 1 ] ,
1486+ [ new Date ( '2001-12-31 23:59:58' ) ]
1487+ ] ) ;
1488+ assert . deepEqual ( res , [
1489+ { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
1490+ { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
1491+ { affectedRows : 1 , insertId : 0n , warningStatus : 0 } ,
1492+ { affectedRows : 1 , insertId : 0n , warningStatus : 0 }
1493+ ] ) ;
1494+ res = await connBulk . batch ( { sql : 'INSERT INTO bufLength VALUES (?)' , fullResult : false } , [
1495+ [ 'abc' ] ,
1496+ [ 'cde' ] ,
1497+ [ 1 ] ,
1498+ [ new Date ( '2001-12-31 23:59:58' ) ]
1499+ ] ) ;
1500+ assert . deepEqual ( res , { affectedRows : 4 , insertId : 0n , warningStatus : 0 } ) ;
14991501 await connBulk . end ( ) ;
15001502 } ) ;
15011503
0 commit comments