[CONJS-219] ER_MAX_PREPARED_STMT_COUNT_REACHED in batch inserts Created: 2022-09-20 Updated: 2022-10-06 Resolved: 2022-10-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/node.js |
| Component/s: | execute |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Diego Dupin | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/207 on mariadb@3.0.1 When i use batch inserts or pool.batch And then i get ER_MAX_PREPARED_STMT_COUNT_REACHED error mariadb@2.5.6 This does not appear |
| Comments |
| Comment by Diego Dupin [ 2022-10-05 ] |
|
problem result in external package quick-lru that handle cache eviction by group, resulting in having prepared in cached bigger than `prepareCacheLength`, that can eventually lead to reaching server max_prepared_stmt_count limit |
| Comment by Diego Dupin [ 2022-10-06 ] |
|
current implementation use @alloc/quick-lru that evict previous cache by bulk. Cache maximum option `prepareCacheLength` is then not repected, because can be up to 2x that value, leading to error when reaching max_prepared_stmt_count |