Files
genai-toolbox/internal
Yuan cbb4a33351 fix(tools/mysqlsql): Handle nil panic and connection leak in invoke (#758)
Copy fix from #757. 

The Invoke function had two bugs:

A panic would occur when scanning a row containing a NULL value in a
TEXT or VARCHAR column. The code did not check for nil before attempting
a type assertion on the scanned value.

The *sql.Rows result was not being closed on all code paths, leading to
connection leaks that could exhaust the database connection pool.

This change corrects both issues. A guard clause now checks for nil
values before processing, and rows.Close() is deferred to guarantee the
connection is released.
2025-06-26 20:54:59 +00:00
..
2025-05-13 21:09:37 +00:00