fix: handle result sets for SHOW INDEX and SHOW CREATE TABLE commands#7
fix: handle result sets for SHOW INDEX and SHOW CREATE TABLE commands#7wenjiachengy wants to merge 1 commit intodesigncomputer:mainfrom
Conversation
4893972 to
7a03c6e
Compare
|
Thank you for your contribution! The change to use cursor.description for handling queries that return result sets is a good idea for improving flexibility. However, there are a few potential downsides we should consider: Ambiguity in Cursor State: If cursor.description is checked without ensuring that the cursor has executed a query that returns a result set, it could lead to unintended behavior. We need to ensure that cursor.description is appropriately set before accessing it. Error Handling: There is no additional error handling to ensure that cursor.description is set. If a non-select query that doesn't return a result set is executed, cursor.description might not be set, which could lead to errors when trying to access it. Performance: Depending on the database and the queries involved, checking cursor.description might have a performance impact if not handled properly, especially in cases where many different types of queries are executed frequently. To mitigate these issues, I suggest adding checks to ensure cursor.description is set and handling cases where it might not be. Additionally, adding some error handling around this check would be beneficial. Let me know your thoughts or if you need any help implementing these changes! |
|
@wenjiachengy Thank you again for your contribution! I've gone ahead and introduced a similar fix to the one you suggested but also include the additional error handling. |
feat: adding SSL configuration
Problem
When executing
SHOW INDEX FROM table_nameorSHOW CREATE TABLE table_namethrough the MCP tool, it returns an error "Error executing query: Unread result found".For example:
{ "query": "SHOW INDEX FROM user_action;" }{ "query": "SHOW CREATE TABLE user_action;" }