TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.
This report presents the forensic synthetic code analysis of pingcap/tidb, a Go project with 40,292 GitHub stars. SynthScan v2.0 examined 1,924,192 lines of code across 5654 source files, recording 5370 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 3.2 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 5370 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .pre-commit-config.yaml | 1 | # Copyright 2023 PingCAP, Inc. | COMMENT |
| LOW | cmd/benchraw/main.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/pluginpkg/pluginpkg.go | 1 | // Copyright 2018 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/config.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/db.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/db_test.go | 1 | // Copyright 2018 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/job.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/stats.go | 1 | // Copyright 2018 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/parser.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/rand.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/config.toml | 1 | # Copyright 2021 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/data.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/importer/main.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/benchkv/main.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/tidb-server/fips.go | 1 | // Copyright 2023 PingCAP, Inc. | COMMENT |
| LOW | cmd/tidb-server/main.go | 1 | // Copyright 2015 PingCAP, Inc. | COMMENT |
| LOW | cmd/tidb-server/main_test.go | 1 | // Copyright 2019 PingCAP, Inc. | COMMENT |
| LOW | cmd/ddltest/index_test.go | 1 | // Copyright 2015 PingCAP, Inc. | COMMENT |
| LOW | cmd/ddltest/random_test.go | 1 | // Copyright 2015 PingCAP, Inc. | COMMENT |
| LOW | cmd/ddltest/column_test.go | 1 | // Copyright 2015 PingCAP, Inc. | COMMENT |
| LOW | cmd/ddltest/ddl_test.go | 1 | // Copyright 2015 PingCAP, Inc. | COMMENT |
| LOW | cmd/ddltest/main_test.go | 1 | // Copyright 2021 PingCAP, Inc. | COMMENT |
| LOW | cmd/benchdb/main.go | 1 | // Copyright 2016 PingCAP, Inc. | COMMENT |
| LOW | cmd/mirror/mirror.go | 1 | // Copyright 2022 PingCAP, Inc. | COMMENT |
| LOW | lightning/tidb-lightning.toml | 1 | ### tidb-lightning configuartion | COMMENT |
| LOW | lightning/tidb-lightning.toml | 21 | index-concurrency = 2 | COMMENT |
| LOW | lightning/tidb-lightning.toml | 41 | # Non-fatal errors are those that are localized to a few rows, and ignoring those rows allow the import process to conti | COMMENT |
| LOW | lightning/tidb-lightning.toml | 61 | # ca-path = "/path/to/ca.pem" | COMMENT |
| LOW | lightning/tidb-lightning.toml | 81 | # For "file" driver, the DSN is a path. If not specified, Lightning would default to "/tmp/CHKPTSCHEMA.pb". | COMMENT |
| LOW | lightning/tidb-lightning.toml | 101 | strategy = "" | COMMENT |
| LOW | lightning/tidb-lightning.toml | 121 | # - none: does not detect duplicate records. | COMMENT |
| LOW | lightning/tidb-lightning.toml | 141 | # This setting is ignored in "tidb" and "importer" backends. | COMMENT |
| LOW | lightning/tidb-lightning.toml | 161 | # Because of implementation details of Lightning, the value is capped at 96 KiB and larger values are ignored. | COMMENT |
| LOW | lightning/tidb-lightning.toml | 181 | # Lightning will slightly increase the size of the first few batches to properly distribute | COMMENT |
| LOW | lightning/tidb-lightning.toml | 201 | # Specifies the character set of the source data file. Lightning converts the source file from the specified character s | COMMENT |
| LOW | lightning/tidb-lightning.toml | 221 | COMMENT | |
| LOW | lightning/tidb-lightning.toml | 241 | COMMENT | |
| LOW | lightning/tidb-lightning.toml | 261 | # whether to interpret backslash-escape inside strings. | COMMENT |
| LOW | lightning/tidb-lightning.toml | 301 | COMMENT | |
| LOW | lightning/tidb-lightning.toml | 321 | # public certificate of the CA. Set to empty string to disable TLS. | COMMENT |
| LOW | lightning/cmd/tidb-lightning/fips.go | 1 | // Copyright 2023 PingCAP, Inc. | COMMENT |
| LOW | lightning/cmd/tidb-lightning/main.go | 1 | // Copyright 2019 PingCAP, Inc. | COMMENT |
| LOW | lightning/cmd/tidb-lightning/main.go | 61 | COMMENT | |
| LOW | lightning/cmd/tidb-lightning/main_test.go | 1 | // Copyright 2019 PingCAP, Inc. | COMMENT |
| LOW | lightning/cmd/tidb-lightning-ctl/fips.go | 1 | // Copyright 2023 PingCAP, Inc. | COMMENT |
| LOW | lightning/cmd/tidb-lightning-ctl/main.go | 1 | // Copyright 2019 PingCAP, Inc. | COMMENT |
| LOW | lightning/cmd/tidb-lightning-ctl/main_test.go | 1 | // Copyright 2019 PingCAP, Inc. | COMMENT |
| LOW | lightning/tests/run_group_lightning_tests.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | lightning/tests/run_local_sst_test.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lightning/tests/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lightning/tests/download_integration_test_binaries.sh | 1 | #! /usr/bin/env bash | COMMENT |
| LOW | lightning/tests/lightning_ignore_columns/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lightning/tests/lightning_gcs/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lightning/tests/lightning_tikv_multi_rocksdb/run.sh | 1 | #!/bin/sh | COMMENT |
| LOW | lightning/tests/lightning_import_compress/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | …lace_one_key_multiple_conflicts_nonclustered_pk/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | …_resolution_replace_one_unique_key_clustered_pk/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | …htning/tests/lightning_checkpoint_dirty_tableid/run.sh | 1 | #!/bin/sh | COMMENT |
| LOW | lightning/tests/lightning_config_max_error/run.sh | 1 | #!/bin/sh | COMMENT |
| LOW | lightning/tests/lightning_s3/run.sh | 1 | #!/bin/bash | COMMENT |
| 4978 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pkg/statistics/handle/globalstats/global_stats_async.go | 64 | // ┌────────────────────────┐ ┌───────────────────────┐ | COMMENT |
| MEDIUM | pkg/statistics/handle/globalstats/global_stats_async.go | 73 | // └────────────────────────┘ └───────────────────────┘ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 86 | // ┌─────────────────────────────────────────────────────────────────────────────────────┐ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 88 | // └─────────────────────────────────────────────────────────────────────────────────────┘ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 91 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 115 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 117 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 127 | // ─────────────────── ────────────── ──────────── | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 140 | // ├──Initialize(ctx) ──────────────────────────────────────> run() starts | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 146 | // ├──Pop() ──────────────────┐ ├──ProcessDMLChanges() | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 152 | // ├──SubmitJob(job) ─────────┘ ├──RequeueMustRetryJobs() | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 163 | // ├──ClosePriorityQueue() ──────────────────────────────────────> ctx.Done() | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 167 | // │ ├──Wait() ◄─────────────────────────────────────────────┤ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 173 | // │ │ ◄─────────────────────────────────────────────────────┘ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 178 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 180 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 185 | // ─────────────────────────── ───────────── ──────────── | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 188 | // ├──Lock() ──────────────────> [LOCKED] ◄───────────────── ProcessDMLChanges() | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 191 | // ├──cancel context ─────────────────┼──────────────────────> (will see ctx.Done()) | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 193 | // ├──Unlock() ────────────────> [UNLOCKED] │ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 195 | // │ │ ◄────────────────────────────┤ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 204 | // ├──Wait() ◄───────────────────────────────────────────────────────┤ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 221 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 223 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 226 | // ─────────────────── ────────────── ─────────── ──────────── | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 233 | // SubmitJob(T1) ──────────────────────────────────────────────────────────────> [Start analyzing T1] | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 275 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 277 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 280 | // ─────────────────── ────────────── ──────────── | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 284 | // └──return job ──────────────────────────────────────> [Start analyzing T1] | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 339 | // ─────────────────── ───────────────── ──────────────────── | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 349 | // │ │ ┌──────────────┐ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 358 | // │ │ └──────────────┘ | COMMENT |
| MEDIUM⚡ | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 361 | // │ ├──spawn run() ──────────────────────────────> Queue Worker running | COMMENT |
| MEDIUM | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 301 | // │ │ ├──runningJobs = nil ◄──────────────────────┼──────┐ | COMMENT |
| MEDIUM | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 325 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 327 | // ═══════════════════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 372 | // ├──ClosePriorityQueue() ──────────────────────────> Queue closed | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo.go | 96 | // lp ┌──────────┐ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo.go | 101 | // └──────────┘ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo.go | 105 | // lp ┌──────────┐ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo.go | 110 | // └──────────┘ | COMMENT |
| MEDIUM | pkg/planner/cascades/memo/memo_test.go | 102 | // ┌────────────────────┼───────┼──┐ ┌──────────────────────┐ | COMMENT |
| MEDIUM | pkg/planner/cascades/memo/memo_test.go | 105 | // │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ ┌───────┐ │ | COMMENT |
| MEDIUM | pkg/planner/cascades/memo/memo_test.go | 117 | // └───────────────────────────────┘ └──────────────────────┘ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 219 | // ┌─────────────rootG──┼───────┼──┐ ┌─────────rootG────────┐ ┌───────rootG───────┐ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 222 | // │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 226 | // │Memo │ │ ├──G-merge1─►│Memo └────┼────┘ │──G-merge2─► │ ┌──────▼──────┐ │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 227 | // │ ┌───▼───┐ ┌───▼───┐ │ │ ┌──────▼──────┐ │ │ │ 5:dst │ │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 229 | // │ │ sort1 │ │ sort1 │ │ │ │ sort1 sort2 │ │ │ └───┼─────┼───┘ │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 230 | // │ │ │ │ │ │ │ └───┼─────┼───┘ │ │ │ │ │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 235 | // │ └───────┼─────────┘ │ │ └──┼──┘ │ │ childG │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 236 | // │ childG │ │ childG │ └───────────────────┘ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/memo/memo_test.go | 237 | // └───────────────────────────────┘ └──────────────────────┘ | COMMENT |
| MEDIUM | pkg/planner/cascades/task/task_apply_rule.go | 43 | // ┌───┼────┼────┼────┼──────────────────────────────────────── | COMMENT |
| MEDIUM | pkg/planner/cascades/task/task_apply_rule.go | 47 | // └──────────────────┼────┼────┼────┼───────────────────────── | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/task/task_apply_rule.go | 70 | // ┌────────────────┐ ┌────────────▼───────────┐ ┌───────┴───────┐ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/task/task_apply_rule.go | 71 | // │ optGroupTask │ ───────► │ optGroupExpressionTask │ ───────► │ ApplyRuleTask │ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/task/task_apply_rule.go | 72 | // └──────▲─────────┘ └────────────┬───────────┘ └───────────────┘ | COMMENT |
| MEDIUM⚡ | pkg/planner/cascades/task/task_apply_rule.go | 74 | // └───── Child Opt Group Trigger ─────┘ | COMMENT |
| 42 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | lightning/pkg/importer/dup_detect.go | 227 | igCols, err := d.rc.cfg.Mydumper.IgnoreColumns.GetIgnoreColumns(d.tr.dbInfo.Name, tblInfo.Name.O, cfg.Mydumper.CaseSens | CODE |
| CRITICAL | pkg/util/memory/tracker_test.go | 722 | require.True(t, t1.MemArbitrator.bigBudgetCap() == t1.MemArbitrator.budget.mu.bigB.Pool.capacity()) | CODE |
| CRITICAL | pkg/util/memory/tracker_test.go | 1020 | return m.heapController.memRisk.startTime.t.Add(time.Second) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 1921 | require.True(t, m.heapController.memRisk.startTime.t.IsZero()) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 1922 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.IsZero()) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 1946 | require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime)) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 1947 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(startTime)) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 1979 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration - 1) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 1982 | require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime)) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 1983 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(startTime)) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 2011 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 2015 | require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime)) | CODE |
| CRITICAL⚡ | pkg/util/memory/arbitrator_test.go | 2016 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime)) // update last mem stats | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2032 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2037 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime)) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2076 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration * 1) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2081 | require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime)) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2101 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration * 1) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2128 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defKillCancelCheckTimeout) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2147 | debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2231 | m.heapController.memRisk.startTime.unixMilli.Store(time.Now().UnixMilli()) | CODE |
| CRITICAL | pkg/util/memory/arbitrator_test.go | 2233 | m.heapController.memRisk.startTime.unixMilli.Store(0) | CODE |
| CRITICAL | pkg/util/memory/arbitrator.go | 2594 | if t := m.heapController.memRisk.startTime.unixMilli.Load(); t != 0 { | CODE |
| CRITICAL | pkg/util/memory/arbitrator.go | 2810 | m.heapController.memRisk.startTime.unixMilli.Store(m.heapController.memRisk.startTime.t.UnixMilli()) | CODE |
| CRITICAL | pkg/util/memory/arbitrator.go | 3207 | return m.heapController.memRisk.startTime.unixMilli.Load() != 0 | CODE |
| CRITICAL | pkg/util/memory/arbitrator.go | 3228 | m.heapController.memRisk.startTime.unixMilli.Store(now.UnixMilli()) | CODE |
| CRITICAL | pkg/util/memory/arbitrator.go | 3270 | m.heapController.memRisk.startTime.unixMilli.Store(0) | CODE |
| CRITICAL | pkg/util/chunk/row_container.go | 159 | c.m.records.inDisk.diskTracker.AttachTo(c.diskTracker) | CODE |
| CRITICAL⚡ | pkg/util/execdetails/runtime_stats.go | 855 | buf.WriteString(strconv.FormatFloat(e.Commit.Mu.SlowestPrewrite.ReqTotalTime.Seconds(), 'f', 3, 64)) | CODE |
| CRITICAL⚡ | pkg/util/execdetails/runtime_stats.go | 861 | buf.WriteString(e.Commit.Mu.SlowestPrewrite.ExecDetails.String()) | CODE |
| CRITICAL⚡ | pkg/util/execdetails/runtime_stats.go | 866 | buf.WriteString(strconv.FormatFloat(e.Commit.Mu.CommitPrimary.ReqTotalTime.Seconds(), 'f', 3, 64)) | CODE |
| CRITICAL⚡ | pkg/util/execdetails/runtime_stats.go | 872 | buf.WriteString(e.Commit.Mu.CommitPrimary.ExecDetails.String()) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | br/tests/br_pitr_table_filter/run.sh | 1114 | # Step 1: Get the Base64 encoded storage URL | COMMENT |
| LOW | br/pkg/restore/log_client/client.go | 2456 | // Step 1: Process DELETIONS in dependency-safe order (tables first, then databases) | COMMENT |
| LOW | br/pkg/restore/log_client/client.go | 2521 | // Step 2: Process ADD/UPDATE operations in dependency-safe order (databases first, then tables) | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1116 | // Step 1: Calculate a default of "one value" | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1121 | // Step 2: If modifications are not allowed, return the one value. | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1129 | // Step 3: Adjust oneValue if the NDV is low | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1136 | // Step 4: Calculate how much of the statistics share a common prefix. | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1206 | // Step 8: Calculate the out of range percentages | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1215 | // Step 9: Calculate the added rows | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1222 | // Step 10: Calculate the estimated rows | COMMENT |
| LOW | pkg/statistics/histogram.go | 1150 | // Step 5:Convert the range we want to estimate to scalar value(float64) | COMMENT |
| LOW | pkg/statistics/histogram.go | 1175 | // Step 6: Convert the lower and upper bound of the histogram to scalar value(float64) | COMMENT |
| LOW | pkg/statistics/histogram.go | 1190 | // Step 7: Calculate the width of the predicate | COMMENT |
| LOW | pkg/statistics/histogram.go | 1241 | // Step 11: Calculate a potential worst case for use in final MaxEst | COMMENT |
| LOW | pkg/statistics/histogram.go | 1259 | // Step 12: Calculate the final min/max/est rows including the skew ratio adjustment | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 50 | // Step 1: Insert a pending job using the StatsHandle API. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 59 | // Step 2: Start the job. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 66 | // Step 3: Mark the job as failed. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 69 | // Step 4: Query via the stats session pool. | COMMENT |
| LOW | pkg/util/sqlexec/restricted_sql_executor.go | 34 | // For example when executing create user statement, we need to check if the user already | COMMENT |
| LOW | pkg/util/extsort/disk_sorter.go | 525 | // So we need to check if the next file needs to be opened. | COMMENT |
| LOW⚡ | pkg/util/topsql/reporter/ru_window_aggregator.go | 144 | // Step 1: take buckets under lock. | COMMENT |
| LOW⚡ | pkg/util/topsql/reporter/ru_window_aggregator.go | 150 | // Step 2: build report records outside lock. | COMMENT |
| LOW | pkg/planner/core/rule_join_reorder_projection_inline.go | 79 | // that has been substituted to the underlying expression), we need to check if the output | COMMENT |
| LOW | pkg/planner/core/joinorder/util.go | 373 | // Step 1: Direct match by table name | COMMENT |
| LOW | pkg/planner/core/joinorder/util.go | 401 | // Step 2: Match by query-block alias (subquery name) | COMMENT |
| LOW | pkg/ddl/executor.go | 577 | // Alter `tiflashCheckPendingTablesLimit` tables are handled, we need to check if we have reached threshold. | COMMENT |
| LOW⚡ | pkg/server/internal/testserverclient/server_client.go | 3047 | // Step 1: begin(when i = 0). | COMMENT |
| LOW⚡ | pkg/server/internal/testserverclient/server_client.go | 3052 | // Step 2: prepare stmts. | COMMENT |
| LOW | pkg/server/internal/testserverclient/server_client.go | 3063 | // Step 3: begin. | COMMENT |
| LOW | pkg/server/internal/testserverclient/server_client.go | 3077 | // Step 4: exec stmts in write-only state (dropping a colum). | COMMENT |
| LOW⚡ | pkg/executor/write.go | 160 | // Step 1: non-generated columns (These columns should be evaluated outside this function). | COMMENT |
| LOW⚡ | pkg/executor/write.go | 161 | // Step 2: check whether there are some columns changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 162 | // Step 3: on-update-now columns if non-generated columns are changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 163 | // Step 4: generated columns if non-generated columns are changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 164 | // Step 5: handle foreign key errors, bad null errors and exchange partition errors. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 167 | // Step 2: compare already evaluated columns and update changed, handleChanged and handleChanged flags. | COMMENT |
| LOW | pkg/executor/write.go | 189 | // Step 3: fill values into on-update-now fields. | COMMENT |
| LOW | pkg/executor/write.go | 213 | // Step 4: fill auto generated columns | COMMENT |
| LOW | pkg/executor/write.go | 249 | // Step 5: handle foreign key errors, bad null errors and exchange partition errors. | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 196 | // Step 1: Create table first | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 200 | // Step 2: Get actual table ID from session | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 206 | // Step 3: Set up mock PD client | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 211 | // Step 4: Mock the GetAllAffinityGroups call with actual group ID | COMMENT |
| LOW | pkg/executor/show_affinity_test.go | 226 | // Step 5: Execute query and verify results | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 258 | // Step 1: Create table first | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 262 | // Step 2: Set up mock PD client | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 267 | // Step 3: Mock PD response with empty map (group not found) | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 272 | // Step 4: Test that all PD-related fields show as native NULL when group not found in PD | COMMENT |
| LOW | pkg/expression/builtin_string.go | 175 | // We need to check if the tp is enum or set, if so, don't add binary flag directly unless it has binary flag. | COMMENT |
| LOW | pkg/expression/builtin_miscellaneous.go | 1245 | // We need to check if the string has leading/trailing spaces before parsing | COMMENT |
| LOW | pkg/expression/builtin_miscellaneous.go | 1852 | // We need to check if the string has leading/trailing spaces before parsing | COMMENT |
| LOW | pkg/expression/builtin_miscellaneous_vec.go | 181 | // We need to check if the string has leading/trailing spaces before parsing | COMMENT |
| LOW | pkg/expression/builtin_miscellaneous_vec.go | 838 | // We need to check if the string has leading/trailing spaces before parsing | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …one_key_multiple_conflicts_nonclustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …lution_replace_one_unique_key_clustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …_replace_multiple_unique_keys_clustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …tests/lightning_duplicate_resolution_error/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …tion_replace_multiple_keys_nonclustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …tning_duplicate_resolution_replace_one_key/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …ion_error_uk_multiple_files_multicol_index/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …olution_replace_multiple_keys_clustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …plicate_resolution_error_pk_multiple_files/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …place_multiple_unique_keys_nonclustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …ce_one_key_multiple_conflicts_clustered_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …ace_one_unique_key_nonclustered_varchar_pk/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | …plicate_resolution_error_uk_multiple_files/config.toml | 16 | # ensure each file is its own engine to facilitate cross-engine detection. | COMMENT |
| MEDIUM | lightning/pkg/importer/chunk_process.go | 711 | // but we met it one time, but cannot reproduce it now, we add this check to make code more robust | COMMENT |
| MEDIUM | br/tests/br_pitr_table_filter/sqls/check.sh | 765 | # ActionDropForeignKey comprehensive test | COMMENT |
| MEDIUM | pkg/statistics/handle/storage/read_test.go | 128 | // Use >= 3 to make the test more robust. But it should be exactly 3. | COMMENT |
| MEDIUM | pkg/util/topsql/reporter/pubsub_test.go | 384 | // Eventually checks make this test robust to async subscribe goroutines. | COMMENT |
| MEDIUM | pkg/config/kerneltype/doc.go | 28 | // However, unlike the next-generation (cloud native) kernel, it does not leverage | COMMENT |
| MEDIUM | pkg/planner/core/index_join_path.go | 770 | // reason1: we need to leverage original indexPathInfo down related logic to build constant range for index plan. | COMMENT |
| MEDIUM | pkg/planner/core/stats.go | 124 | // 2: EliminateNoPrecisionCast here can convert query 'cast(c<int> as bigint) = 1' to 'c = 1' to leverage access range. | COMMENT |
| MEDIUM | pkg/planner/core/exhaust_physical_plans.go | 745 | // if there is no chosen info, it means the leaf datasource couldn't even leverage this indexJoinProp, return InvalidT | COMMENT |
| MEDIUM | pkg/planner/core/find_best_task.go | 801 | // if both lhs and rhs need to access table after IndexScan, we utilize the set of columns that occurred in AccessCond | COMMENT |
| MEDIUM | pkg/planner/core/plan_cost_ver2.go | 1192 | // For simplicity and robust, only operators that need double-read like IndexLookup and IndexJoin consider this cost. | COMMENT |
| MEDIUM | pkg/planner/core/joinorder/join_order.go | 164 | // Since edges without equi-conditions perform poorly (as the executor cannot utilize Hash Join), | COMMENT |
| MEDIUM | pkg/planner/core/rule/rule_predicate_simplification.go | 211 | // Thus, we utilize a switch to govern this particular logic. | COMMENT |
| MEDIUM | …/planner/core/operator/logicalop/logical_plans_misc.go | 186 | // 1. Those tables are small enough, push to cop can't utilize several TiKV to accelerate computation. | COMMENT |
| MEDIUM | …/planner/core/operator/logicalop/logical_plans_misc.go | 245 | // 1. Those tables are small enough, push to cop can't utilize several TiKV to accelerate computation. | COMMENT |
| MEDIUM | pkg/planner/funcdep/fd_graph.go | 1036 | // leverage the information collected in the loop1 above and try to do some FD substitution. | COMMENT |
| MEDIUM | pkg/planner/property/physical_property.go | 475 | // "Equivalence" refers to the process where we utilize a hash column to obtain equivalent columns, | COMMENT |
| MEDIUM | pkg/ddl/backfilling.go | 118 | // system variable "tidb_ddl_reorg_worker_cnt". Essentially, reorg job is mainly based | COMMENT |
| MEDIUM | pkg/ddl/backfilling_test.go | 307 | // Some fields should be different from the default context to make the test robust. | COMMENT |
| LOW | pkg/objstore/local.go | 214 | // like #49423. We just return 0 size and let the caller handle it in later | COMMENT |
| MEDIUM | pkg/dxf/framework/doc.go | 42 | // To fully utilize the resources and avoid resource overuse, we abstract the | COMMENT |
| MEDIUM | pkg/executor/index_merge_reader.go | 1549 | // table partition ranges results on that index plan path). Since every partial index path is a sorted select result, we | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | br/tests/br_pitr_table_filter/run.sh | 1114 | # Step 1: Get the Base64 encoded storage URL | COMMENT |
| LOW | br/pkg/restore/log_client/client.go | 2456 | // Step 1: Process DELETIONS in dependency-safe order (tables first, then databases) | COMMENT |
| LOW | br/pkg/restore/log_client/client.go | 2521 | // Step 2: Process ADD/UPDATE operations in dependency-safe order (databases first, then tables) | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1116 | // Step 1: Calculate a default of "one value" | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1121 | // Step 2: If modifications are not allowed, return the one value. | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1129 | // Step 3: Adjust oneValue if the NDV is low | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1136 | // Step 4: Calculate how much of the statistics share a common prefix. | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1206 | // Step 8: Calculate the out of range percentages | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1215 | // Step 9: Calculate the added rows | COMMENT |
| LOW⚡ | pkg/statistics/histogram.go | 1222 | // Step 10: Calculate the estimated rows | COMMENT |
| LOW | pkg/statistics/histogram.go | 1175 | // Step 6: Convert the lower and upper bound of the histogram to scalar value(float64) | COMMENT |
| LOW | pkg/statistics/histogram.go | 1190 | // Step 7: Calculate the width of the predicate | COMMENT |
| LOW | pkg/statistics/histogram.go | 1241 | // Step 11: Calculate a potential worst case for use in final MaxEst | COMMENT |
| LOW | pkg/statistics/histogram.go | 1259 | // Step 12: Calculate the final min/max/est rows including the skew ratio adjustment | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 439 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 493 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 731 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1017 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1074 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1128 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1185 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1198 | // NOTE: This function is thread-safe. | COMMENT |
| LOW | …g/statistics/handle/autoanalyze/priorityqueue/queue.go | 1242 | // NOTE: This function is thread-safe. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 50 | // Step 1: Insert a pending job using the StatsHandle API. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 59 | // Step 2: Start the job. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 66 | // Step 3: Mark the job as failed. | COMMENT |
| LOW⚡ | …iorityqueue/intervaltimezone/interval_timezone_test.go | 69 | // Step 4: Query via the stats session pool. | COMMENT |
| LOW⚡ | pkg/util/topsql/reporter/ru_window_aggregator.go | 144 | // Step 1: take buckets under lock. | COMMENT |
| LOW⚡ | pkg/util/topsql/reporter/ru_window_aggregator.go | 150 | // Step 2: build report records outside lock. | COMMENT |
| LOW | pkg/planner/core/joinorder/util.go | 373 | // Step 1: Direct match by table name | COMMENT |
| LOW | pkg/planner/core/joinorder/util.go | 401 | // Step 2: Match by query-block alias (subquery name) | COMMENT |
| LOW⚡ | pkg/server/internal/testserverclient/server_client.go | 3047 | // Step 1: begin(when i = 0). | COMMENT |
| LOW⚡ | pkg/server/internal/testserverclient/server_client.go | 3052 | // Step 2: prepare stmts. | COMMENT |
| LOW | pkg/server/internal/testserverclient/server_client.go | 3063 | // Step 3: begin. | COMMENT |
| LOW | pkg/server/internal/testserverclient/server_client.go | 3077 | // Step 4: exec stmts in write-only state (dropping a colum). | COMMENT |
| LOW⚡ | pkg/executor/write.go | 160 | // Step 1: non-generated columns (These columns should be evaluated outside this function). | COMMENT |
| LOW⚡ | pkg/executor/write.go | 161 | // Step 2: check whether there are some columns changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 162 | // Step 3: on-update-now columns if non-generated columns are changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 163 | // Step 4: generated columns if non-generated columns are changed. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 164 | // Step 5: handle foreign key errors, bad null errors and exchange partition errors. | COMMENT |
| LOW⚡ | pkg/executor/write.go | 167 | // Step 2: compare already evaluated columns and update changed, handleChanged and handleChanged flags. | COMMENT |
| LOW | pkg/executor/write.go | 189 | // Step 3: fill values into on-update-now fields. | COMMENT |
| LOW | pkg/executor/write.go | 213 | // Step 4: fill auto generated columns | COMMENT |
| LOW | pkg/executor/write.go | 249 | // Step 5: handle foreign key errors, bad null errors and exchange partition errors. | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 196 | // Step 1: Create table first | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 200 | // Step 2: Get actual table ID from session | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 206 | // Step 3: Set up mock PD client | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 211 | // Step 4: Mock the GetAllAffinityGroups call with actual group ID | COMMENT |
| LOW | pkg/executor/show_affinity_test.go | 226 | // Step 5: Execute query and verify results | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 258 | // Step 1: Create table first | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 262 | // Step 2: Set up mock PD client | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 267 | // Step 3: Mock PD response with empty map (group not found) | COMMENT |
| LOW⚡ | pkg/executor/show_affinity_test.go | 272 | // Step 4: Test that all PD-related fields show as native NULL when group not found in PD | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …pling/tests/naughty_strings/data/naughty_strings.t.sql | 0 | ''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パ | STRING |
| HIGH | dumpling/tests/e2e_csv/data/e2e_csv.t.sql | 0 | ''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パ | STRING |
| HIGH | …ing/tests/naughty_strings/expect/naughty_strings.t.sql | 0 | ''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パ | STRING |
| HIGH | …pling/tests/naughty_strings/data/naughty_strings.t.sql | 0 | onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>rip | STRING |
| HIGH | …ing/tests/naughty_strings/expect/naughty_strings.t.sql | 0 | onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>rip | STRING |
| HIGH | dumpling/tests/e2e_csv/data/e2e_csv.t.sql | 0 | onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>rip | STRING |
| HIGH | …pling/tests/naughty_strings/data/naughty_strings.t.sql | 0 | ), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), ( | STRING |
| HIGH | …ing/tests/naughty_strings/expect/naughty_strings.t.sql | 0 | ), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), ( | STRING |
| HIGH | dumpling/tests/e2e_csv/data/e2e_csv.t.sql | 0 | ), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), ( | STRING |
| HIGH | …pling/tests/naughty_strings/data/naughty_strings.t.sql | 0 | ), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), ( | STRING |
| HIGH | …ing/tests/naughty_strings/expect/naughty_strings.t.sql | 0 | ), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), ( | STRING |
| HIGH | dumpling/tests/e2e_csv/data/e2e_csv.t.sql | 0 | ), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), ( | STRING |
| HIGH | …pling/tests/naughty_strings/data/naughty_strings.t.sql | 0 | ><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseo | STRING |
| HIGH | dumpling/tests/e2e_csv/data/e2e_csv.t.sql | 0 | ><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseo | STRING |
| HIGH | …ing/tests/naughty_strings/expect/naughty_strings.t.sql | 0 | ><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseo | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pkg/types/datum.go | 1032 | switch target.GetType() { // TODO: implement mysql types convert when "CAST() AS" syntax are supported. | CODE |
| LOW | pkg/bindinfo/binding_plan_evolution.go | 107 | // TODO: implement this | COMMENT |
| LOW | pkg/planner/core/task.go | 1452 | // TODO: implement it by TopN/buckets and adjust it by session variable. | COMMENT |
| LOW | pkg/planner/core/expression_rewriter.go | 308 | // TODO: implement ScalarSubQuery and resolve it during optimizing. In building phase, we will not change the plan's | COMMENT |
| LOW | pkg/planner/core/point_get_plan.go | 433 | // TODO: Add test and remove this! | COMMENT |
| LOW | pkg/ddl/partition.go | 3943 | // TODO: Add test that kills (like `kill -9`) the currently running | COMMENT |
| LOW | pkg/ddl/partition.go | 4627 | // TODO: Add test for this! | COMMENT |
| LOW | pkg/ddl/add_column.go | 607 | // TODO: implement the behavior as MySQL when explicit_defaults_for_timestamp = off, then this function could return fa | COMMENT |
| LOW | pkg/ddl/tests/partition/multi_domain_test.go | 1440 | // TODO: Add tests for delete | COMMENT |
| LOW | pkg/ddl/tests/partition/multi_domain_test.go | 1634 | // TODO: Add tests for delete as well | COMMENT |
| LOW | pkg/meta/model/table.go | 1143 | // TODO: Add tests! | COMMENT |
| LOW | pkg/meta/model/table.go | 1180 | // TODO: Add tests for ADD PARTITION multi-domain with Global Index! | COMMENT |
| LOW | pkg/store/mockstore/unistore/tikv/server.go | 1137 | // TODO: implement Observer | COMMENT |
| LOW | pkg/store/mockstore/unistore/tikv/server.go | 1150 | // TODO: implement Observer | COMMENT |
| LOW | pkg/store/mockstore/unistore/tikv/server.go | 1156 | // TODO: implement Observer | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | br/tests/br_pitr_online_table_filter/run.sh | 78 | # Create a new database with the same name and different data | COMMENT |
| MEDIUM | br/tests/br_parallel_restore/run.sh | 461 | # Create a paused task for $DB first | COMMENT |
| MEDIUM | br/tests/br_parallel_restore/run.sh | 672 | # Create a paused task and manually change it to running | COMMENT |
| MEDIUM | br/tests/br_merge_option_attributes/run.sh | 27 | # Create the test directory and copy certs if they exist | COMMENT |
| MEDIUM | br/tests/br_merge_option_attributes/run.sh | 47 | # Create the test directory and copy certs if they exist | COMMENT |
| MEDIUM | br/tests/br_pitr_table_filter/run.sh | 376 | # Create the tables but don't populate them with the standard values | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightning/tests/lightning_compress/run.sh | 27 | # Set minDeliverBytes to a small enough number to only write only 1 row each time | COMMENT |
| LOW | lightning/tests/lightning_examples/run.sh | 49 | # Check if rest of the imported data really match | COMMENT |
| LOW | lightning/tests/lightning_checkpoint_columns/run.sh | 28 | # Set minDeliverBytes to a small enough number to only write only 1 row each time | COMMENT |
| LOW | br/tests/br_z_gc_safepoint/run.sh | 42 | # Set ratelimit to 40960 bytes/second, it will finish within 25s, | COMMENT |
| LOW | br/tests/br_pitr_gc_safepoint/run.sh | 51 | # Check if "log-backup-coordinator" exists | COMMENT |
| LOW | br/tests/br_check_dup_table/run.sh | 58 | # Check if the log contains 'ErrTableAlreadyExisted' | COMMENT |
| LOW | br/tests/br_check_dup_table/run.sh | 72 | # Check if the log contains 'ErrTableAlreadyExisted' | COMMENT |
| LOW | br/tests/br_region_rule/run.sh | 83 | # Check if region label rule 'schedule=deny' exists. | COMMENT |
| LOW | br/tests/br_blocklist/run.sh | 264 | # Check if correctly blocked | COMMENT |
| LOW | br/tests/br_blocklist/run.sh | 278 | # Check if restore unexpectedly succeeded | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lightning/tidb-lightning.toml | 271 | # pattern and path determine target source files, you can use either of them but not both. | COMMENT |
| MEDIUM | br/cmd/br/restore.go | 113 | fmt.Println("# you can use '--with-sys-table=false' to skip restoring system tables") | CODE |
| LOW | pkg/statistics/handle/cache/statscacheinner.go | 66 | // The returned value should be read-only, if you update it, don't forget to use Put to put it back again, otherwise the | COMMENT |
| LOW | pkg/planner/core/plan_cache_utils.go | 722 | // Don't forget to reset this executor when the prior plan is invalid. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightning/pkg/importer/import.go | 1056 | // periodically switch to import mode, as requested by TiKV 3.0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …clusterintegrationtest/python_testers/vector_recall.py | 178 | def compact_and_wait_index_built(): | CODE |
| LOW | …s/design/2023-11-29-priority-queue-for-auto-analyze.md | 119 | function calculateAvgChangeForPartitions(partitionStats, defs, autoAnalyzeRatio): | CODE |
| LOW | …s/design/2023-11-29-priority-queue-for-auto-analyze.md | 137 | function calculateChangePercentage(tblStats, autoAnalyzeRatio): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ests/br_tiflash_conflict/prepare_data/prepare_data.sql | 43 | (1, 'John Doe', 30, 50000.00, '2020-01-15'), | CODE |
| LOW | pkg/structure/structure_test.go | 289 | err = tx.HDel(key, []byte("fake_key")) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …clusterintegrationtest/python_testers/vector_recall.py | 94 | CODE |