{"record":{"id":"81fc3314e3580bbb","repo":"risingwavelabs/risingwave","slug":"show-binary-logs-missing-file-size-column","errorCode":null,"errorMessage":"`SHOW BINARY LOGS`: missing `File_size` column","messagePattern":"`SHOW BINARY LOGS`: missing `File_size` column","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/enumerator/mod.rs","lineNumber":553,"sourceCode":"        // only return the first 2. Decode the row manually so we don't panic on column-count\n        // differences.\n        let rows: Vec<Row> = conn\n            .query(\"SHOW BINARY LOGS\")\n            .await\n            .context(\"failed to execute `SHOW BINARY LOGS`\")?;\n        let query_result = rows\n            .into_iter()\n            .map(|mut row| -> ConnectorResult<(String, u64)> {\n                let log_name = row\n                    .take_opt::<String, _>(0)\n                    .transpose()\n                    .context(\"`SHOW BINARY LOGS`: failed to decode `Log_name`\")?\n                    .ok_or_else(|| anyhow!(\"`SHOW BINARY LOGS`: missing `Log_name` column\"))?;\n                let file_size = row\n                    .take_opt::<u64, _>(1)\n                    .transpose()\n                    .context(\"`SHOW BINARY LOGS`: failed to decode `File_size`\")?\n                    .ok_or_else(|| anyhow!(\"`SHOW BINARY LOGS`: missing `File_size` column\"))?;\n                Ok((log_name, file_size))\n            })\n            .collect::<ConnectorResult<Vec<_>>>()?;\n\n        drop(conn);\n        pool.disconnect().await.ok();\n\n        Ok(query_result)\n    }\n}\n\nimpl ListCdcSplits for DebeziumSplitEnumerator<Mysql> {\n    type CdcSourceType = Mysql;\n\n    fn list_cdc_splits(&mut self) -> Vec<DebeziumCdcSplit<Self::CdcSourceType>> {\n        // CDC source only supports single split\n        vec![DebeziumCdcSplit::<Self::CdcSourceType>::new(\n            self.source_id.as_raw_id(),","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/enumerator/mod.rs#L535-L571","documentation":"Companion to error 966: row column 1 of `SHOW BINARY LOGS` must be the file size (`File_size`), decoded as u64. A NULL/missing value in that column triggers this error while mapping binlog files for metrics and split planning.","triggerScenarios":"`SHOW BINARY LOGS` result rows have a NULL second column when query_binlog_files maps rows to (filename, size) pairs.","commonSituations":"MySQL-compatible middleware altering the statement's column set, corrupted/rotated binlog entries reported oddly by a non-standard server, or a stripped result set from a limited-privilege account via a proxy.","solutions":["Run `SHOW BINARY LOGS` manually with the same credentials and confirm File_size is populated.","Bypass any proxy/intermediary and connect to the actual MySQL server.","Use a supported MySQL version/build (5.7/8.0 standard) for the CDC source.","If a specific binlog row is NULL, run PURGE BINARY LOGS / check server binlog state and restart the source."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify File_size is populated before enabling CDC monitoring\nlet ok = sqlx::query(\"SHOW BINARY LOGS\").fetch_all(&pool).await?\n    .iter().all(|row| !row.try_get::<Option<u64>, _>(1)?.is_none());\nassert!(ok, \"File_size column NULL in SHOW BINARY LOGS\");","typeGuard":null,"tryCatchPattern":"if let Err(e) = res {\n    if e.to_string().contains(\"missing `File_size`\") {\n        log::warn!(\"binlog row without size; inspect server binlog state / purge old logs\");\n        tokio::time::sleep(BACKOFF).await;\n    }\n}","preventionTips":["Monitor binlog health (SHOW BINARY LOG STATUS) so NULL/degenerate rows are caught early.","Purge stale binlogs and check disk state on the MySQL server.","Avoid middleware that rewrites SHOW BINARY LOGS result columns."],"tags":["cdc","mysql","binlog","result-decode"],"backgroundTag":"unexpected-response-shape","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}