Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
3.2.3
-
None
Description
From https://github.com/php/php-src/issues/13452#issuecomment-1957843389
ubuntu 22.04, Node.js v20.11.1
var mariadb = require('mariadb'); |
var pool = mariadb.createPool({ |
host: "localhost", |
port: 3306,
|
user: "root", |
password: "", |
database: "test" |
});
|
module.exports = Object.freeze({
|
pool: pool
|
});
|
|
pool.getConnection()
|
.then(conn => {
|
conn.query('SELECT 1') |
.then(res => {
|
console.log('Connection successful'); |
conn.release();
|
})
|
.catch(err => { |
console.log('Connection failed', err); |
conn.release();
|
});
|
})
|
.catch(err => { |
console.log('Connection failed', err); |
});
|
|
# node app.js
|
/root/node_modules/mariadb/lib/cmd/handshake/auth/handshake.js:93
|
out.writeInt8(opts.collation && opts.collation.index < 255 ? opts.collation.index : info.collation.index);
|
^
|
|
TypeError: Cannot read properties of undefined (reading 'index') |
at Handshake.send (/root/node_modules/mariadb/lib/cmd/handshake/auth/handshake.js:93:104)
|
at Handshake.parseHandshakeInit (/root/node_modules/mariadb/lib/cmd/handshake/auth/handshake.js:57:17)
|
at Authentication.onPacketReceive (/root/node_modules/mariadb/lib/cmd/handshake/authentication.js:38:17)
|
at PacketInputStream.receivePacketBasic (/root/node_modules/mariadb/lib/io/packet-input-stream.js:85:9)
|
at PacketInputStream.onData (/root/node_modules/mariadb/lib/io/packet-input-stream.js:135:20)
|
at Socket.emit (node:events:518:28)
|
at addChunk (node:internal/streams/readable:559:12)
|
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
|
at Readable.push (node:internal/streams/readable:390:5)
|
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
|
Node.js v20.11.1
Attachments
Issue Links
- is duplicated by
-
CONJS-280 Error when connecting to database on 11.3.2
- Closed
- relates to
-
MDEV-32975 Default charset doesn't work with PHP MySQLi extension
- Closed