]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Support all MySQL/Connector int/bool arguments
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Sep 2016 13:34:33 +0000 (09:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Sep 2016 13:35:17 +0000 (09:35 -0400)
Added support for parsing MySQL/Connector boolean and integer
arguments within the URL query string: connection_timeout,
connect_timeout, pool_size, get_warnings,
raise_on_warnings, raw, consume_results, ssl_verify_cert, force_ipv6,
pool_reset_session, compress, allow_local_infile, use_pure.

Change-Id: I2a1a17d13d47d56871bff32e94fdbed8bc003ad7
Fixes: #3787
(cherry picked from commit 16dcc8bec1218835590766f0cb2a019a1b30e340)

doc/build/changelog/changelog_10.rst
lib/sqlalchemy/dialects/mysql/mysqlconnector.py

index a443fa19709c9c29360e9572bb098ffdcd2a7b13..277bf3405c81f84e983d5798c79a183fb5a2bbd5 100644 (file)
 .. changelog::
     :version: 1.0.15
 
+    .. change::
+        :tags: bug, mysql
+        :tickets: 3787
+        :versions: 1.1.0
+
+        Added support for parsing MySQL/Connector boolean and integer
+        arguments within the URL query string: connection_timeout,
+        connect_timeout, pool_size, get_warnings,
+        raise_on_warnings, raw, consume_results, ssl_verify_cert, force_ipv6,
+        pool_reset_session, compress, allow_local_infile, use_pure.
+
     .. change::
         :tags: bug, orm
         :tickets: 3773, 3774
index a3a3f2be9fba2a3cdada16164a188fdbc484c550..5ec259c8657c37a75539aa708ca589f79febbff6 100644 (file)
@@ -112,8 +112,22 @@ class MySQLDialect_mysqlconnector(MySQLDialect):
 
         opts.update(url.query)
 
+        util.coerce_kw_type(opts, 'allow_local_infile', bool)
+        util.coerce_kw_type(opts, 'autocommit', bool)
         util.coerce_kw_type(opts, 'buffered', bool)
+        util.coerce_kw_type(opts, 'compress', bool)
+        util.coerce_kw_type(opts, 'connection_timeout', int)
+        util.coerce_kw_type(opts, 'connect_timeout', int)
+        util.coerce_kw_type(opts, 'consume_results', bool)
+        util.coerce_kw_type(opts, 'force_ipv6', bool)
+        util.coerce_kw_type(opts, 'get_warnings', bool)
+        util.coerce_kw_type(opts, 'pool_reset_session', bool)
+        util.coerce_kw_type(opts, 'pool_size', int)
         util.coerce_kw_type(opts, 'raise_on_warnings', bool)
+        util.coerce_kw_type(opts, 'raw', bool)
+        util.coerce_kw_type(opts, 'ssl_verify_cert', bool)
+        util.coerce_kw_type(opts, 'use_pure', bool)
+        util.coerce_kw_type(opts, 'use_unicode', bool)
 
         # unfortunately, MySQL/connector python refuses to release a
         # cursor without reading fully, so non-buffered isn't an option