{"record":{"id":"5371d5341d8cd80d","repo":"sqlmapproject/sqlmap","slug":"union-cols-must-be-a-range-of-integers","errorCode":null,"errorMessage":"--union-cols must be a range of integers","messagePattern":"--union-cols must be a range of integers","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/techniques/union/use.py","lineNumber":239,"sourceCode":"            return\n\n        kb.uChar = char\n\n        if conf.uChar is not None:\n            kb.uChar = char.replace(\"[CHAR]\", conf.uChar if isDigit(conf.uChar) else \"'%s'\" % conf.uChar.strip(\"'\"))\n\n    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","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/techniques/union/use.py#L221-L257","documentation":"Error \"--union-cols must be a range of integers\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/techniques/union/use.py:239 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"}