The data of node.js nested query is lost after json.stringify?

Database query

function query(sql) {
    return new promise((resolve, reject) => {
        pool.getConnection(function (err, conn) {
            if (err) {
                reject(err);
            } else {
                conn.query(sql, function (err, rows, cols) {
                    if (err) {
                        conn.release();
                        reject(err)
                    } else {
                        //
                        conn.release();
                        //
                        resolve({ rows: rows, cols: cols });
                    }
                });
            }
        });
    });
};
exports.myTickets = (userId, cb) => {
    let sql = util.format("select ticketId,number from ticket_Numbers where userId="%s"", userId);
    db.query(sql)
        .then((data) => {
            let tickets = data.rows;
            tickets.map(ticket => {
                db.query(util.format("select userId,number from ticket_numbers where ticketId="%s"", ticket.ticketId))
                    .then((players) => {
                        ticket.players = players.rows;
                    });
            })
            console.log(tickets);    //logplayers
            console.log(JSON.stringify(tickets));    //stringify players
            cb({ success: true, tickets: tickets });
        })
        .catch(err => {
            console.log(err.stack);
            cb({ success: false, message: err.message });
        });
}

result:

novice to node, could you tell me why this happened and what went wrong?


let getTickets = (userId) => {
    let sql = util.format('select ticketId,number from ticket_Numbers where userId="%s"', userId);
    return db.query(sql);
}
exports.myTickets = function (userId, cb) {
    getTickets(userId).then(async (data) => {
        let tickets = data.rows;
        for (let ticket of tickets) {
            await db.query(util.format('select userId,number from ticket_numbers where ticketId="%s"', ticket.ticketId))
                .then((players) => {
                    ticket.players = players.rows
                });
        }
        cb({ success: true, tickets: tickets });
    });
}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9c03e-18a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9c03e-18a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?