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

calling cursor.nextset() after cursor.fetchone() can cause query hang #526

Closed
darkag opened this issue Aug 4, 2023 · 1 comment · Fixed by #527
Closed

calling cursor.nextset() after cursor.fetchone() can cause query hang #526

darkag opened this issue Aug 4, 2023 · 1 comment · Fixed by #527
Assignees
Labels

Comments

@darkag
Copy link

darkag commented Aug 4, 2023

hello,

while trying to implement a workaround for this issue on apache airflow (cf. this issue. I've found that the following code:

cursor.execute(sql)
cursor.fetchall()
while cursor.nextset():
        cursor.fetchone()

causes execution hang when sql is two insert queries and the second one causes an error or if the second query is a select the error is not caused by the first rows returned by this select (like when you select col1 / col2 and col2 is 0 for some rows).

It seems that in this case the errormessage is not processed neither in fetchone nor in flush_to_end_of_result function making this one waits for a END_OF_RESULT_RESPONSES message that will never come.

@sitingren sitingren self-assigned this Aug 7, 2023
@sitingren sitingren added the bug label Aug 7, 2023
sitingren added a commit to sitingren/vertica-python that referenced this issue Aug 7, 2023
@sitingren sitingren mentioned this issue Aug 7, 2023
sitingren added a commit that referenced this issue Aug 7, 2023
@sitingren
Copy link
Member

The fix published in v1.3.5.

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