Skip to content

Commit df98437

Browse files
committed
Merge pull request pallets-eco#96 from e-dard/master
Fix apply_driver_hacks for various mysql drivers, rather than just the default driver.
2 parents 84dea97 + cf659f3 commit df98437

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_sqlalchemy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def apply_driver_hacks(self, app, info, options):
721721
like pool sizes for MySQL and sqlite. Also it injects the setting of
722722
`SQLALCHEMY_NATIVE_UNICODE`.
723723
"""
724-
if info.drivername == 'mysql':
724+
if info.drivername.startswith('mysql'):
725725
info.query.setdefault('charset', 'utf8')
726726
options.setdefault('pool_size', 10)
727727
options.setdefault('pool_recycle', 7200)

0 commit comments

Comments
 (0)