Commit Graph

18 Commits

Author SHA1 Message Date
837a36ea15 Fix rowcount calculation for emulated bulk operations 2020-08-16 15:10:26 +02:00
74933240ba Fix for CONPY-99:
Decrement reference to row after adding it to lit to prevent
memory leakage
2020-08-16 09:40:10 +02:00
92eaf17fd5 Follow up fix for CONPY-107:
Support also insert/update/delete with PyDateTime_Delta objects
2020-08-16 07:30:58 +02:00
e078e26a18 Fix for CONPY-107:
Since Python is not able to handle negative values, a column defined as TIME will
now be converted to datetime.timedelta instead of datetime.time.
2020-08-15 19:00:40 +02:00
021c4e6aaa Allow different decimal types in executemany():
It is now possible to use different decimal types for the same column
in cursors executemany() method.
2020-08-14 19:55:41 +02:00
afea681910 Fix for CONPY-105: Change behavior of cursor->rowcount and cursor->lastrowid
rowcount:
In case of an error, or if statement wasn't executed rowcount should be -1 (see PEP-249)

    For DML statements the number of affected rows returned in OK packet by server:
        > 0 for DML statements which modify or insert, e.g. ALTER TABLE or CREATE TABLE .. SELECT FROM
        otherwise 0
    For DQL statement
        if field_count > 0: number of rows returned
        otherwise affected rows returned in OK packet by server.

lastrowid:

    if server returns no value (0) for last_insert_id, lastrowid should be None.
    if last_insert_id is > 0, return it's value
2020-08-14 16:44:13 +02:00
30d5793959 Followup for fix for CONPY-106
Added better handling for client errors (InterfaceError)
2020-08-14 16:38:19 +02:00
e091edd549 Fix for CONPY-106
Check error number instead of SQL code for determine exception type.
2020-08-14 14:44:05 +02:00
588bc01cc0 Implementation for CONPY-100:
Add option binary for cursor. When set to true cursor will always try
to use the client/server binary protocol, even when no parameter were
passed to execute.
2020-08-12 16:05:29 +02:00
0e91d76d52 Fix for CONPY-102:
Fixed default behavior of autocommit: If not autocommit mode was specified,
autocommit will be off by default (see https://www.python.org/dev/peps/pep-0249/#commit).
Added new keyword autocommit for connection class which might have the following values:
- None: use server default setting
- True: turns autocommit on
- False: turns autocommit off
2020-08-12 14:19:02 +02:00
03f283a2ff Fix for CONPY-101: Negative refcount when executing callproc() method
Removed the reference decrement in callproc function.
2020-08-12 07:31:25 +02:00
067a78dd13 Fix for CONPY68 (jsonfield returning as bytes):
When a value is returned as binary type (BLOB) but has a non binary collation,
it will be converted now as a unicode string and the binary flag will be ignored.
2020-08-10 14:59:16 +02:00
a749c53859 Fix for CONPY-98:
If a string has a binary collation/charset it needs to be converted
to a Binary instead of Unicode.
2020-08-07 14:45:50 +02:00
c59313604e Fix for CONPY-95
Added support for MYSQL_TYPE_BIT: Bit field type will be converted
to PyByte object.
2020-08-06 18:26:44 +02:00
bfd71e2fa1 Fix for CONPY-94:
Don't check for exact type but also for subtype.
2020-08-06 15:03:48 +02:00
e3eba3abaf Added method pool.close() 2020-08-05 19:01:53 +02:00
01053e0d4a Fix for CONPY-93:
When releasing the GIL we need to unblock/block in callback functions (mariadb_codecs.c)
2020-08-05 18:54:19 +02:00
29b05e3b09 Various fixes and changes for SQLAlchemy support:
- added a thin python wrapper around mariadb module
- added constansts under mariadb.constants (CLIENT, CURSOR, INDICATOR)
- bench and test are now in testing subdirectory
- updated documentation
2020-07-24 12:13:31 +02:00