Commit Graph

538 Commits

Author SHA1 Message Date
fe8d15225e Merge branch '1.1-binlog' into 1.2 2024-02-05 07:11:02 +01:00
d672551c7d Fix for CONPY-277:
To avoid a syntax error when running under sql_mode ANSI_QUOTES
parameter substitution will be done by using single quotes instead
of double quotes.
v1.1.10
2024-02-05 07:02:39 +01:00
b65fd443ee Fix of previous commit:
Skip test_conpy278 instead of test_conpy279.
2024-02-02 16:08:32 +01:00
7bc789a148 Skip test_conc279 when running with MaxScale
(see https://jira.mariadb.org/browse/MXS-4961)
2024-02-02 08:58:17 +01:00
8620d49f21 Fix for test_conpy279 2024-02-01 12:41:33 +01:00
d9e33de683 Fix for CONPY-281:
Run escape test with and without sql_mode NO_BACKSLASH_ESCAPES.
2024-02-01 07:10:29 +01:00
7c2134dddb Fix for CONPY-278:
In case of an (automatic) reconnect the connection property
connection_id was not updated, since there is no callback
functionality in Connector/C available to notify the application
that a reconnect occured. Instead of obtaining the connection_id
via MemberDef, connection_id is now implemented as getter function.
2024-01-31 17:21:48 +01:00
28827984bd CONPY-280:
Methods which are defined via PyMemberDef with flag METH_VARARGS
and have only one parameter are using METH_O now: Instead of parsing
and converting parameter via PyArgs_ParseTuple we now check the type
and convert passed python object directly to the corresponding c type.
2024-01-31 15:15:49 +01:00
f00bc261d4 Fix for CONPY-279:
Allow None values for password and database in change_user()
method of connection object.
2024-01-30 15:55:34 +01:00
5bec4d82c9 Minor fixes 2023-12-30 14:22:11 +01:00
1597858e4b Remove duplicate macros 2023-12-24 14:57:15 +01:00
7fe141ea0a Bump version 2023-12-20 19:07:13 +01:00
9952ff09af CONPY-276:
Allow to retrieve data from buffered cursor if the connection
was already closed.
v1.1.9
2023-12-20 17:29:28 +01:00
7d6b5af51c [misc] correct CREATE OR REPLACE commands to DROP IF EXISTS + CREATE for mysql test compatibility - part 2 2023-12-17 21:38:47 +01:00
0c72aaec43 [misc] test correction not using temporary tables with mysql 8 2023-12-15 18:50:36 +01:00
5a3dd3da6b [misc] test correction 2023-12-15 14:53:14 +01:00
76a766141f [misc] test stability improvement for mysql server 2023-12-14 16:35:23 +01:00
ba6b6e9255 [misc] correct CREATE OR REPLACE commands to DROP IF EXISTS + CREATE for mysql test compatibility 2023-12-14 10:55:10 +01:00
d0470ae7ef [misc] clarify license with LGPL-2.1-or-later, not LGPL-2.1 only 2023-12-13 18:38:35 +01:00
80a722a4c7 [misc] test correction for maxscale 2023-12-13 18:29:08 +01:00
9b06b3337a [misc] using common default servers test suite 2023-12-12 23:46:11 +01:00
ae34d63986 Fix for CONPY-274:
Instead of releasing non freed objects (cursor and connection)
in tp_dealloc, they need to be freed in tp_finalize to avoid
possible crashes.
2023-12-01 16:01:22 +01:00
f9adb73366 Fix for CONPY-273:
Fixed crash in escape_string method of connection object:
Instead of PyMem_RawCalloc we allocate memory via PyMem_Calloc, since
the memory will be freed by PyMem_Free (instead of PyMem_RawFree).
2023-11-22 13:08:50 +01:00
f26934540d Documentation fix for metadata 2023-10-18 09:50:18 +02:00
6a5388ad05 CONPY-272: documentation fix
Fixed documentation: Cursors lastrowid attribute returns None (was
zero).
2023-10-18 08:49:07 +02:00
ff6f8cbec8 Bump version 2023-10-14 06:11:35 +02:00
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
72a3437cf2 Added support for FL_PREPARED_XA and FL_COMPLETED_XA 2023-07-02 18:05:27 +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