Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool.batch() - Cannot read properties of undefined after upgrade to 3.1.0 #235

Closed
mikerowe81 opened this issue Feb 25, 2023 · 1 comment
Closed

Comments

@mikerowe81
Copy link

Just upgraded to 3.1.0 and I'm getting the following error when running pool.batch()

...\node_modules\mariadb\lib\cmd\batch-bulk.js:388
        if (this._rows[0].affectedRows !== undefined) {
                          ^

TypeError: Cannot read properties of undefined (reading 'affectedRows')
    at BatchBulk.success (...\node_modules\mariadb\lib\cmd\batch-bulk.js:388:27)
    at BatchBulk.readOKPacket (...\node_modules\mariadb\lib\cmd\parser.js:182:19)
    at BatchBulk.readResponsePacket (...\node_modules\mariadb\lib\cmd\parser.js:49:21)
    at PacketInputStream.receivePacketBasic (...\node_modules\mariadb\lib\io\packet-input-stream.js:80:9)
    at PacketInputStream.onData (...\node_modules\mariadb\lib\io\packet-input-stream.js:130:20)

Here is my PoolConfig:

        host: process.env.DB_HOST,
        user: process.env.DB_USER,
        port: Number(process.env.DB_PORT) || 3306,
        password: process.env.DB_PASSWORD,
        database: process.env.DB_DATABASE,
        connectionLimit: 4,
        idleTimeout: 10,
        namedPlaceholders: true,
        rowsAsArray: false,
        insertIdAsNumber: true,
        dateStrings: true,
        decimalAsNumber: true,
        bigIntAsNumber: true,
        metaAsArray: true,
        trace: process.env.NODE_ENV === 'development',
        typeCast: typeCast

Will revert back to 3.0.2 for now. Thanks

@rusher
Copy link
Collaborator

rusher commented Feb 28, 2023

problem identified. This concerns metaAsArrayoption only, and will be corrected in 3.1.1

@rusher rusher closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants