async.waterfall([
(next) => {
conn.beginTransaction(next) // new interface
},
(next) => {
conn.insert('table7', {id: 100, data: 2}, next)
},
(rows, info, next) => {
console.log(rows, info)
conn.commit(next) // new interface
},
(next) => {
// (a)
console.log('success')
},
], err => {
console.log('fail')
})