You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest git version of byteballcore fails on startup when used with mysql. The issue is in function initUnstableUnit where db.escape is used as a mapper function, but the escape function refers to this which in this usage gets the wrong context:
"SELECT parent_unit, child_unit FROM parenthoods WHERE child_unit IN("+Object.keys(assocUnstableUnits).map(db.escape)+")",
the fix is converting it to a function call:
.map(function(){returndb.escape();})
The Error:
node_modules/mysql/lib/protocol/Parser.js:80
throw err; // Rethrow non-MySQL errors
^
TypeError: Cannot read property 'connectionConfig' of undefined
at Pool.escape (node_modules/mysql/lib/Pool.js:281:42)
at Array.map (<anonymous>)
at node_modules/byteballcore/storage.js:1248:108
at Query._callback (node_modules/byteballcore/mysql_pool.js:43:4)
at Query.Sequence.end (node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
at Query._handleFinalResultPacket (node_modules/mysql/lib/protocol/sequences/Query.js:139:8)
at Query.EofPacket (node_modules/mysql/lib/protocol/sequences/Query.js:123:8)
at Protocol._parsePacket (node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (node_modules/mysql/lib/protocol/Protocol.js:39:16)
The text was updated successfully, but these errors were encountered:
The latest git version of byteballcore fails on startup when used with mysql. The issue is in function
initUnstableUnit
wheredb.escape
is used as a mapper function, but the escape function refers tothis
which in this usage gets the wrong context:the fix is converting it to a function call:
The Error:
The text was updated successfully, but these errors were encountered: