When connected to a database server which doesn't support bulk
execution, we need to set bind.is_null instead of changing the buffer
type to MYSQL_TYPE_NULL. This will keep the original buffer type.
Since memory for stack allocation is limited, we need to allocate
memory from the heap, otherwise in case of large strings escape_string
method might crash.
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)
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".
The connect() method now accepts an addtional parameter
converter which points to a dictionary, containing one or more conversions.
A conversion must be specified in the form {FIELD_TYOE : conversion_function}
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.
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
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
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.
- 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