Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with unbuffered cursor #635

Closed
hiepnq94 opened this issue Dec 9, 2021 · 1 comment · Fixed by #701
Closed

Issue with unbuffered cursor #635

hiepnq94 opened this issue Dec 9, 2021 · 1 comment · Fixed by #701
Labels
Milestone

Comments

@hiepnq94
Copy link

hiepnq94 commented Dec 9, 2021

If the previous query isn't iterated to the end, the subsequent query raises pymysql.err.InternalError: Packet sequence number wrong with a warning RuntimeWarning: coroutine 'MySQLResult._finish_unbuffered_query' was never awaited.

Reproduction:

# with cursorclass=SSCursor set in connection
async with conn.cursor() as cur:
    await cur.execute("""SELECT 1""")
    await cur.execute("""SELECT 2""")
    # raise

It seems the problem is in this line, as it should be await-ed:

self._result._finish_unbuffered_query()

(python 3.10.0, aiomysql 0.0.22)

Nothing4You added a commit to Nothing4You/aiomysql that referenced this issue Jan 28, 2022
Nothing4You added a commit to Nothing4You/aiomysql that referenced this issue Jan 28, 2022
Nothing4You added a commit that referenced this issue Jan 28, 2022
Nothing4You added a commit that referenced this issue Jan 28, 2022
Nothing4You added a commit that referenced this issue Jan 28, 2022
@Nothing4You Nothing4You added this to the 1.0 milestone Jan 28, 2022
Nothing4You added a commit that referenced this issue Jan 28, 2022
Nothing4You added a commit that referenced this issue Jan 28, 2022
@Nothing4You
Copy link
Collaborator

thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants