[CONCPP-2] Implement connection pool Created: 2019-08-07 Updated: 2022-02-02 Resolved: 2022-01-26 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C++ |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.1 |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Ralf Gebhardt | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| PM Planning: | RM_CONCPP |
| Description |
|
The MySQL Connector/C++ is providing a connection pool, so MariaDB Connector/C++ should provide the same. The connection pool should be provided via MariaDB Connector/C, see UPDATE: As |
| Comments |
| Comment by Lawrin Novitsky [ 2019-08-08 ] |
|
Can't that really be added in the next version? i.e. not in the 1st beta |
| Comment by Lawrin Novitsky [ 2022-01-26 ] |
|
Use of pool may be enabled in “classic” connection methods using `pool` property set to true, like: std::unique_ptr<Connection> conn(DriverManager::getConnection("jdbc:mariadb://localhost:3306/db?user=root&password=someSecretWord&pool=true"); The “new” way is to use DataSource class. MariaDbDataSource class is exposed in the public API: ds("jdbc:mariadb://localhost:3306/db”); In this case the pool will be automatically created. In the JDBC, a pool is created if getPooledConnection() is used. These methods are not supported yet, and the pool is created on MariaDbDataSource::getConnection call.
|