v2.0.11
bulk insertion where vector includes nulls causes unexpected behvior - 'null' txt in db column or node crashes for varbinary
test('use tableMgr bulk insert varbinary vector - with null', testDone => {
async function runner () {
const b = Buffer.from('0102030405060708090a', 'hex')
const helper = new TypeTableHelper(theConnection, 'varbinary(10)')
const expected = helper.getVec(10, i => i % 2 === 0 ? null : b)
const table = await helper.create()
const promisedInsert = util.promisify(table.insertRows)
const promisedSelect = util.promisify(table.selectRows)
try {
await promisedInsert(expected)
const res = await promisedSelect(expected)
assert.deepStrictEqual(res, expected)
} catch (e) {
assert.ifError(e)
}
}
runner().then(() => {
testDone()
})
})