I'm using mysql2 component in typescript My problem is that the query returns a maximum of 25000 rows, even when it should be returning many more
This is my code:
import { type Pool } from 'mysql2/promise'
export interface RecordLayout {
success: boolean
message: string
code: number
}
public static async testSql (dbName: string, sql: string, xlsxFileName: string = '.xlsx'): Promise<void> {
logger.debug(sql)
const db = await (p.pools[dbName] as Pool).getConnection()
const [rows] = await db.query(sql, []) //! returns only 25.000 rows
// i try to add another record into array, to verify that it's not a node js problem
const r: RecordLayout[] = rows as RecordLayout[]
const t = r.concat({ message: 'ffffffffffff', success: true, code: 0 })
console.log(t) // ok 25.001 row :-(
db.release()
logger.debug(rows)
}
But given the precise number 25000, I suspect there is a limitation in some configuration or other
Can you help me ?