Files
superset2/tests
Amin Ghadersohi 00c5e7957b fix(mcp): sync per-statement row_count after execute_sql truncation
_bisect_row_limit already trims statements[*].data.rows in lockstep
with the top-level rows field to keep the response under the token
limit, but left each statement's row_count pointing at the
pre-truncation count, so a truncated execute_sql response could claim
more rows than statements[*].data actually contains. Track the
statement dicts (not just their row lists) and update row_count
alongside data.rows.

Also log a full traceback (logger.exception) instead of a plain
warning when data-query truncation hits an unexpected error, so a
real bug isn't indistinguishable from routine size-limit enforcement.

Adds regression tests for: total_rows surviving truncation distinct
from row_count, the no-recognised-row-field fallback path, and the
oversized-excel-export hard-failure path.
2026-07-22 03:49:36 +00:00
..