Commit Graph

66 Commits

Author SHA1 Message Date
1ae8afb5cf MySQL test fix: use server side cursor for select only 2020-11-22 21:21:39 +01:00
26ca93492f Test fixes for testing against MySQL server 2020-11-18 16:42:35 +01:00
3ea9319728 Followup form last fix: remove BLOB or JSON check 2020-11-18 09:53:17 +01:00
76f01e8f5f Test fix:
MDEV-17832 (pluggable data types was added in MariaDB 10.5.2), so for
versions < 10.5.2 we need to check for data type BLOB instead of JSON.
2020-11-17 17:19:36 +01:00
a47d3e5d76 Implementation of CONPY-129:
Added connection attribute server_version_info and (for compatibiliry)
get_server_version() method.
Both return a tuple, describing the version number of connected server
in following format: (MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
2020-11-16 10:03:05 +01:00
020017ee33 Fix for CONPY123: Free pending result sets when closing cursor
When using text protocol pending result sets weren't properly freed,
so executing another command on the same connection resulted in an error
"commands out of sync".
2020-10-12 09:05:49 +02:00
5d4a8d5d62 Fix for CONPY-116: Wrong type reported for SQL type JSON
Beginning of MariaDB 10.5 metadata for JSON columns is stored
in extended field information, and the reported type is MYSQL_TYPE_BLOB.
We now check extended field information to return correct type and for
fetching values in correct format.
2020-09-29 11:43:47 +02:00
837a36ea15 Fix rowcount calculation for emulated bulk operations 2020-08-16 15:10:26 +02:00
c2d96a9b9c Fix time tests: MYSQL_TYPE_TIME will be converted to datetime.timedelta now. 2020-08-16 12:01:26 +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
ab2553a9d8 Added test for CONPY-103 2020-08-12 14:59:30 +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
43211642cd Added test for CONPY-91 2020-08-07 12:42:32 +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
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