{"record":{"id":"93e0762396d2ab59","repo":"sqlmapproject/sqlmap","slug":"union-cols-range-has-to-represent-lower-to-highe","errorCode":null,"errorMessage":"--union-cols range has to represent lower to higher number of columns","messagePattern":"--union-cols range has to represent lower to higher number of columns","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/techniques/union/use.py","lineNumber":246,"sourceCode":"    def _configUnionCols(columns):\n        if not isinstance(columns, six.string_types):\n            return\n\n        columns = columns.replace(' ', \"\")\n        if '-' in columns:\n            colsStart, colsStop = columns.split('-')\n        else:\n            colsStart, colsStop = columns, columns\n\n        if not isDigit(colsStart) or not isDigit(colsStop):\n            raise SqlmapSyntaxException(\"--union-cols must be a range of integers\")\n\n        conf.uColsStart, conf.uColsStop = int(colsStart), int(colsStop)\n\n        if conf.uColsStart > conf.uColsStop:\n            errMsg = \"--union-cols range has to represent lower to \"\n            errMsg += \"higher number of columns\"\n            raise SqlmapSyntaxException(errMsg)\n\n    _configUnionChar(char)\n    _configUnionCols(conf.uCols or columns)\n\ndef _chunkedJsonAggUse(expression, expressionFields, expressionFieldsList, count):\n    \"\"\"\n    Fallback for when a full (single-shot) JSON-agg UNION table dump is too large to be returned\n    whole (DBMS packet limit / sqlmap response cap). Instead of dropping to the slow per-row UNION\n    path, rows are aggregated in bounded windows of K rows per request (JSON_ARRAYAGG over a\n    LIMIT-windowed subquery), keeping near full-UNION throughput while staying well under the\n    caps. K is halved adaptively if a chunk response still gets truncated. Returns a BigArray of\n    rows, or None to let the caller fall back to the regular per-row UNION path.\n\n    Covers the single-shot JSON-agg back-ends that also have a windowing form here (i.e. all of them\n    except Oracle and MSSQL, whose aggregates are built differently); others -> None.\n    \"\"\"\n    dbms = Backend.getIdentifiedDbms()\n","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/techniques/union/use.py#L228-L264","documentation":"Error \"--union-cols range has to represent lower to higher number of columns\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/techniques/union/use.py:246 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}