The GitHub Actions job "E2E - Operation" on 
shardingsphere.git/fix/39537-column-offset has succeeded.
Run started by GitHub user fudianchn (triggered by fudianchn).

Head commit for run:
b5e365b0f641cdc4472ade500d6fe3ae1c714256 / 付典 <[email protected]>
Fix wrong column labels and count when metadata drifts from backend schema

For queries on rule-enhanced tables, column count, names, labels and the
label-index map were derived from projections expanded against
ShardingSphere metadata, then paired positionally with actual backend
rows. After out-of-band DDL on the backend, the metadata view drifts from
the live schema and clients silently receive values attributed to wrong
columns.

The backend result set metadata truthfully describes the actual rows, so
use the projection-derived view only when its column count matches the
actual result set metadata; otherwise the result set metadata is
authoritative. The count check is skipped only for rewrites that append
projections, matching ShardingProjectionsTokenGenerator: aggregations
owning derived aggregation projections (AVG is rewritten to SUM and
COUNT) and derived order-by and group-by projections. QueryHeaderBuilderEngine
now delegates to ShardingSphereResultSetMetaData instead of duplicating the
projection lookup, and StandardDatabaseProxyConnector derives the header
count from the same source.

COM_STMT_PREPARE now derives the OK packet column count and the column
definition packets from the same result, and wildcard projections, whose
expansion reflects ShardingSphere metadata, are resolved through the
backend probe instead of the local-metadata shortcut, so prepare metadata
no longer bypasses the drift fix.

Fixes #39537.

Signed-off-by: 付典 <[email protected]>

Report URL: https://github.com/apache/shardingsphere/actions/runs/33353725060

With regards,
GitHub Actions via GitBox

Reply via email to