Commit Graph

17 Commits

Author SHA1 Message Date
9f7fcbb356 Fix for CONPY-250:
With implementation of CONPY-246/247 pool._connections was replaced
by _connections_used and _connections_free to the size should be
calclulated as len(_connections_used + _connections_free)
2023-02-08 16:04:20 +01:00
fad6119fd0 CONPY-248:
If a connection in connection pool was identified as broken (either
COM_PING or reset_connection failed) it will be replaced by a new
connection.
2023-02-05 14:22:46 +01:00
66db4b08c0 CONPY-247:
Added optional parameter "pool_invalidation_interval",
which specifies the validation interval  in milliseconds
after which the status of a connection requested from
the pool is checked.

The default values is 500 milliseconds, a value of 0
means that the status will always be checked.
2023-02-03 11:53:34 +01:00
a48eb1eff6 Fix for CONPY-246:
Rollback transaction if connection pool was created with
pool_reset_connection=False.
2023-02-03 08:07:41 +01:00
7daab2feb5 Fix for CONPY-245:
Instead of iterating through all connections and checking the health
status via ping, used and unused connections were separated in different
lists. This ensures that the last used connection will be always the first.
2023-02-01 09:33:54 +01:00
cdd42743cc Coding style fixes (PEP8)
Fixed various coding style stuff detected by flake8.
Added .pre-commit-config.yaml:
With command pre_commit install a hook for flake8 will be
installed.
2022-08-07 16:47:26 +02:00
6ddd1866d2 Fix typo 2022-07-04 14:45:17 +02:00
d2f9780965 typos 2022-06-22 16:22:27 -05:00
30c8f33b08 CONPY-205: Inconsistent exceptions
- All parameter exceptions are now ProgrammingErrors
- A dictionary now might contain more keys than
  placeholders in statement
- Fixed unhandled exception when using dictionary as parameter
2022-05-25 18:47:03 +02:00
1aa2bbef08 - Documentation
- docstring fixes
- removed doc and docs subdirectory, since documentation is in docs
  branch
2022-04-11 08:03:20 +02:00
263f428213 CONPY-184
Display status of connection, cursor and pool class in
string representation.

If an object (cursor, class, connection pool) was closed, the
string representation (tp_repr) now shows the status of the object.

Example:

>>> import mariadb
>>> connection=mariadb.connect()
>>> connection
<mariadb.connection connected to 'localhost' at 0x7f94d77c3b40>
>>> connection.close()
>>> connection
<mariadb.connection (closed) at 0x7f94d77c3b40>
2021-12-13 05:55:10 +01:00
5a61845920 Fix for CONPY-161:
Since resolution of time.monotonic() is not precise enough, we need to use
first connection in ConnectionPool.get_connection() method, in case all
values obtained by time.monotonic() are the same.
2021-08-22 09:49:19 +02:00
b38f336c86 Fix for CONPY-160:
ConnectionPool attribute connection count returned list instead
of len(list).
2021-08-22 06:54:19 +02:00
aa6edc38cb Updated documentation 2021-08-21 18:09:48 +02:00
5a81686f4c Documentation work 2021-07-26 06:54:38 +02:00
1299be5031 fixed typo 2021-01-18 06:41:15 +01:00
aa65cc853a Exchanged C written connection pool class by native python class. 2021-01-18 06:11:03 +01:00