Skip to content

Commit

Permalink
Fixed: MySQL ssl option cast (#1163)
Browse files Browse the repository at this point in the history
* Fixed: MySQL ssl option cast

* Added: test and changelog entry for MySQL ssl option
  • Loading branch information
capcom6 committed Jun 25, 2022
1 parent 5b3d8cc commit 6e674f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Fixed
- `using_db` wrong position in model shortcut methods. (#1150)
- Fixed connection to `Oracle` database by adding database info to DBQ in connection string.
- Fixed ORA-01435 error while using `Oracle` database (#1155)
- Fixed processing of `ssl` option in MySQL connection string.

0.19.1
------
Expand Down
3 changes: 2 additions & 1 deletion tests/backends/test_db_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_mysql_testing(self):
def test_mysql_params(self):
res = expand_db_url(
"mysql://root:@127.0.0.1:3306/test?AHA=5&moo=yes&maxsize=20&minsize=5"
"&connect_timeout=1.5&echo=1"
"&connect_timeout=1.5&echo=1&ssl=True"
)
self.assertEqual(
res,
Expand All @@ -331,6 +331,7 @@ def test_mysql_params(self):
"echo": True,
"charset": "utf8mb4",
"sql_mode": "STRICT_TRANS_TABLES",
"ssl": True,
},
},
)
Expand Down
1 change: 1 addition & 0 deletions tortoise/backends/base/config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"no_delay": bool,
"use_unicode": bool,
"pool_recycle": int,
"ssl": bool,
},
},
"mssql": {
Expand Down

0 comments on commit 6e674f0

Please sign in to comment.