Skip to content

Conversation

@Tishj
Copy link
Contributor

@Tishj Tishj commented Sep 12, 2024

This PR fixes #13863

When multiple statements are provided to con.execute, all the statements except the last one are "executed immediately", whereas the last statement goes through a slightly different path as prepared parameters might need to be injected before it gets executed.

The ExecuteImmediately path did not release the GIL before entering the bind+execution phase, which is what caused this error.

@Mytherin Mytherin merged commit be3b8ce into duckdb:main Sep 12, 2024
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
Fix duckdb/duckdb#13880: correctly name http_proxy_password setting (duckdb/duckdb#13890)
[Python] Fix issue related to the GIL when using `execute` with multiple statements (duckdb/duckdb#13893)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
Fix duckdb/duckdb#13880: correctly name http_proxy_password setting (duckdb/duckdb#13890)
[Python] Fix issue related to the GIL when using `execute` with multiple statements (duckdb/duckdb#13893)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
@Tishj Tishj deleted the python_fix_13863 branch November 7, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duckdb.duckdb.InvalidInputException: Invalid Input Error: PandasScan called but GIL was already held! on recursive python calls

2 participants