Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed May 23, 2023
1 parent d6b9e30 commit 515c72b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes

## v1.1.0

Release date: TBD

* Exposed `Cursor.warning_count` to check for warnings without additional query (#1056)

## v1.0.3

Release date: TBD
Expand Down
4 changes: 2 additions & 2 deletions pymysql/cursors.py
Expand Up @@ -32,7 +32,7 @@ class Cursor:

def __init__(self, connection):
self.connection = connection
self.warning_count = -1
self.warning_count = 0
self.description = None
self.rownumber = 0
self.rowcount = -1
Expand Down Expand Up @@ -332,7 +332,7 @@ def _clear_result(self):
self._result = None

self.rowcount = 0
self.warning_count = -1
self.warning_count = 0
self.description = None
self.lastrowid = None
self._rows = None
Expand Down

0 comments on commit 515c72b

Please sign in to comment.