sqlmapproject/sqlmap · error · SqlmapSyntaxException

--union-cols range has to represent lower to higher number o

Error message

--union-cols range has to represent lower to higher number of columns

What it means

Error "--union-cols range has to represent lower to higher number of columns" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/techniques/union/use.py:246

    def _configUnionCols(columns):
        if not isinstance(columns, six.string_types):
            return

        columns = columns.replace(' ', "")
        if '-' in columns:
            colsStart, colsStop = columns.split('-')
        else:
            colsStart, colsStop = columns, columns

        if not isDigit(colsStart) or not isDigit(colsStop):
            raise SqlmapSyntaxException("--union-cols must be a range of integers")

        conf.uColsStart, conf.uColsStop = int(colsStart), int(colsStop)

        if conf.uColsStart > conf.uColsStop:
            errMsg = "--union-cols range has to represent lower to "
            errMsg += "higher number of columns"
            raise SqlmapSyntaxException(errMsg)

    _configUnionChar(char)
    _configUnionCols(conf.uCols or columns)

def _chunkedJsonAggUse(expression, expressionFields, expressionFieldsList, count):
    """
    Fallback for when a full (single-shot) JSON-agg UNION table dump is too large to be returned
    whole (DBMS packet limit / sqlmap response cap). Instead of dropping to the slow per-row UNION
    path, rows are aggregated in bounded windows of K rows per request (JSON_ARRAYAGG over a
    LIMIT-windowed subquery), keeping near full-UNION throughput while staying well under the
    caps. K is halved adaptively if a chunk response still gets truncated. Returns a BigArray of
    rows, or None to let the caller fall back to the regular per-row UNION path.

    Covers the single-shot JSON-agg back-ends that also have a windowing form here (i.e. all of them
    except Oracle and MSSQL, whose aggregates are built differently); others -> None.
    """
    dbms = Backend.getIdentifiedDbms()

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/techniques/union/use.py:246 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/93e0762396d2ab59. Report an issue: GitHub.