We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 386df86 + 0f5820f commit 6a6fbf1Copy full SHA for 6a6fbf1
mcp_server_snowflake/main.py
@@ -380,7 +380,9 @@ async def handle_execute_query(
380
# Ensure the query has a LIMIT clause to prevent large result sets
381
# Parse the query to check if it already has a LIMIT
382
if "LIMIT " not in query.upper():
383
- query = f"{query} LIMIT {limit_rows}"
+ # Remove any trailing semicolon before adding the LIMIT clause
384
+ query = query.rstrip().rstrip(';')
385
+ query = f"{query} LIMIT {limit_rows};"
386
387
# Execute the query
388
cursor = conn.cursor()
0 commit comments