Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pymysql/cursors.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def scroll(self, value, mode="relative"):

def _query(self, q):
conn = self._get_db()
self._last_executed = q
self._clear_result()
conn.query(q)
self._do_get_result()
Expand Down Expand Up @@ -410,7 +409,6 @@ def close(self):

def _query(self, q):
conn = self._get_db()
self._last_executed = q
self._clear_result()
conn.query(q, unbuffered=True)
self._do_get_result()
Expand Down
6 changes: 3 additions & 3 deletions pymysql/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def test_bulk_insert(self):
data,
)
self.assertEqual(
cursor._last_executed,
cursor._executed,
bytearray(
b"insert into bulkinsert (id, name, age, height) values "
b"(0,'bob',21,123),(1,'jim',56,45),(2,'fred',100,180)"
Expand All @@ -377,7 +377,7 @@ def test_bulk_insert_multiline_statement(self):
data,
)
self.assertEqual(
cursor._last_executed.strip(),
cursor._executed.strip(),
bytearray(
b"""insert
into bulkinsert (id, name,
Expand Down Expand Up @@ -422,7 +422,7 @@ def test_issue_288(self):
data,
)
self.assertEqual(
cursor._last_executed.strip(),
cursor._executed.strip(),
bytearray(
b"""insert
into bulkinsert (id, name,
Expand Down