Commit Graph

510 Commits

Author SHA1 Message Date
3085cb5920 Documentation fix v1.1.8 2023-10-12 07:17:37 +02:00
1762e9d458 Travis: Added Python-3.12 2023-10-12 06:01:00 +02:00
84e423295a Test fix
Skip extended field type test if server is MySQL
or MariaDB server version is < 10.10
2023-10-12 05:41:40 +02:00
09b78a7b17 Fix version number/bumped to 1.1.8 2023-10-12 05:26:02 +02:00
969d19c4f6 Documentation fix: added new line 2023-10-11 14:55:03 +02:00
cfe1d10702 CONPY-271: Added cursor.metadata property
Similiar to description property, this property returns
a dictionary with complete metadata.

The dictionary contains the following keys:
  - catalog:     catalog (always 'def')
  - schema:      current schema
  - field:       alias column name or if no alias was specified
                 column name
  - org_field:   original column name
  - table:       alias table name or if no alias was specified
                 table name
  - org_table:   original table name
  - type:        column type
  - charset:     character set (utf8mb4 or binary)
  - length:      The length of the column
  - max length:  The maximum length of the column
  - decimals:    The numer of decimals
  - flags:       Flags (flags are defined in constants.FIELD_FLAG)
  - ext_type:    Extended data type (types are defined in
                 constants.EXT_FIELD_TYPE)

This fixes also CONPY-270: Instead of checking BINARY_FLAG we now
check character set for binary object types.
2023-10-11 14:50:23 +02:00
05f4cede96 Fix typo 2023-09-30 17:40:00 +02:00
91ecc9e3bf Workaround for CONPY-269:
Even if PEP-249 permits operations on a closed cursor, we don't
raise an exception if the cursor or the underlying connection
was closed. Instead rowcount property will return -1.

This is a workaround for pandas, where rowcount will be checked
after the cursor was closed.
2023-09-29 10:34:30 +02:00
99f0de32db Added Python 3.12 2023-09-27 09:51:26 +02:00
c2587f9e3e Merge branch '1.1' of https://github.com/mariadb-corporation/mariadb-connector-python into 1.1 2023-07-03 10:13:35 +02:00
67d3062ad5 Added missing documentation for tls_version v1.1.7 2023-07-02 17:12:14 +02:00
c29e278df6 Minimum requirement is Python 3.8 (3.7 is EOL). 2023-07-02 15:23:17 +02:00
4591d7d4fc removed Python 3.7
added Python 3.11
2023-07-02 11:45:32 +02:00
dc224974c9 Merge pull request #25 from grooverdan/patch-1
correct documentation typo CURSOR_TYPE -> CURSOR
2023-06-30 07:33:17 +02:00
d8b337d4ee correct documentation typo CURSOR_TYPE -> CURSOR
There is no CURSOR_TYPE, only CURSOR.
2023-06-30 12:30:36 +10:00
62bc7144aa Travis: disable benchmark 2023-04-24 13:58:39 +02:00
b43853e829 travis update 2023-04-24 13:25:35 +02:00
9aedf1c0f8 Handle dicts in check_text_params 2023-04-17 10:26:33 +02:00
b0366fa108 Performance fix:
Rewrote parameter type checks for text protocol in cpython.
2023-04-17 09:51:41 +02:00
658cc0015c Fix for CONPY-256:
Fix indexing when moving a free connection to used connections
to avoid returning the same connection twice.

Kudos and thanks to G.Mech for reporting this bug and providing
the fix.
2023-04-11 09:05:07 +02:00
494d9513da Fix for CONPY-255:
If a connection pool can't return a connection (all connections in use)
a PoolError will be raised instead of returning None object.
2023-04-11 08:37:16 +02:00
6afeaa53d1 CONPY-258: Fixed ValueError exception if ZEROFILL flag is defined
For backwards compatibility PyLong_FromString interprets leading
zeros as octal value which will end up in a value error, if the
number contains 2 or more leading zeros.
2023-04-06 17:22:26 +02:00
3827ae32bd CONPY-253: Add new connection option tls_version
The connection method now offers the option of specifying
the version of the TLS protocol using tls_version:

connection = mariadb.connect(tls_protocol="TLSv1.2")
2023-03-25 15:22:31 +01:00
83f11edebb bump version 2023-02-19 10:19:18 +01:00
0c844879fd Fix for CONPY-251
Check if stmt was already initialized in cursor method
nextset().
v1.1.6
2023-02-12 08:26:37 +01:00
49b49083a2 Follow up for CONPY-250:
handle None values
2023-02-08 16:14:52 +01:00
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
84967a90ca Follow up for fix of CONPY-244:
Raise a warning instead an exception.
2023-02-01 07:48:42 +01:00
5ce5ca3d15 CONPY-244:
Check that the version of loaded MariaDB Connector/C library is
not less than the version used to build MariaDB Connector/Python.
2023-01-16 14:32:57 +01:00
03b72c6644 Fix for CONPY-240:
Don't overwrite errormessage/stacktrace if an exception was generated
during module initialization.
2022-12-01 06:00:17 +01:00
952a8cfb35 Fix for CONPY-240
If an error occured during module initialization, the exception
now contains more information about possible cause and doesn't
overwrite existing error message.
2022-11-28 06:10:07 +01:00
2820546857 Bump version (1.1.6) 2022-11-28 04:58:55 +01:00
ea87f4472b Fix required Connector/C version:
Since Connector 3.2.x is discontinued, we need
to bump the miimum required version to 3.3.1.
2022-11-21 11:59:01 +01:00
fa6cda4445 travis: install via pip 2022-11-09 09:16:08 +01:00
1919bee85e Build fix for C/C 3.3.1 2022-11-09 09:04:51 +01:00
bc5a7bc15f Updated pyproject.toml:
Additionally wheel package must be installed (CONPY-236).
2022-11-09 06:24:10 +01:00
db731519ba Added pyproject.toml
This file was forgotten to add in rev. 1d700addae
Set version to 1.1.5.post1
2022-11-08 17:19:14 +01:00
ca7b5ae6fd [misc] adding pip install packaging to test + remove distutils use 2022-11-03 10:26:01 +01:00
db9b3b792b CONPY-231: Fix memory leak v1.1.5 2022-11-01 07:22:11 +01:00
80b642b8a1 Fix for CONPY-229:
Pass NULL/None values to converter.
2022-10-19 17:13:27 +02:00
5dfeda2f31 Added packaging module as requirement 2022-10-19 16:45:39 +02:00
ce228b68da CONPY-227: Replace collections.named_tuple
Replaced collections.named_tuple by C-Pythons PyStruct_Sequence.
All conversion are done now before fetching a row: converting to
other result types than tuple (named tuple or dict) now have less
overhead and are significantly faster.
2022-10-10 09:01:19 +02:00
903bd6e073 Performance optimization
Instead of iterating via fetchone(), fetchall() and fetchmany() methods
now load the data directly at once.
2022-10-10 06:59:16 +02:00
1d700addae Fix for CONPY-226:
Replaced deprecated call to distutils.version.StrictVersion by
packaging.version.Version
2022-10-09 15:05:31 +02:00
37623b1928 Merge branch '1.1' of https://github.com/mariadb-corporation/mariadb-connector-python into 1.1 2022-10-07 08:48:54 +02:00
d70be504e3 Fix for CONPY-225:
Set value for affected_rows.
2022-10-07 08:47:48 +02:00