Write, review, and adapt SQL for TiDB with correct handling of TiDB-vs-MySQL differences (VECTOR type + vector indexes/functions, full-text search, AUTO_RANDOM, optimistic/pessimistic transactions, foreign keys, views, DDL limitations, and unsupported MySQL features like procedures/triggers/events/GEOMETRY/SPATIAL). Use when generating SQL that must run on TiDB, migrating MySQL SQL to TiDB, or debugging TiDB SQL compatibility errors.
Goal: generate SQL that runs correctly on TiDB by default, and avoid "works on MySQL but breaks on TiDB" constructs.
SELECT VERSION();TiDB, treat it as TiDB and parse the version (needed for feature gates like Vector / Foreign Key).skills/tidb-sql/references/tidb-cloud-ssl.md).EXPLAIN FORMAT = "tidb_json" for structured plans and operator trees.EXPLAIN ANALYZE to compare estRows vs actRows (it executes the query).ANALYZE TABLE ... to refresh statistics.VECTOR / VECTOR(D) types and vector functions/indexes; MySQL does not.GEOMETRY, spatial functions, and SPATIAL indexes.FULLTEXT works everywhere.UPDATE/INSERT/DELETE against views.AUTO_RANDOM over AUTO_INCREMENT for write-hotspot avoidance when appropriate.COMMIT failures in application logic.skills/tidb-sql/references/vector.md - VECTOR types, functions, vector index DDL, and query patterns.skills/tidb-sql/references/full-text-search.md - Full-text search SQL patterns and availability gotchas.skills/tidb-sql/references/auto-random.md - AUTO_RANDOM rules, DDL patterns, and restrictions.skills/tidb-sql/references/transactions.md - pessimistic vs optimistic mode and session/global knobs.skills/tidb-sql/references/mysql-compatibility-notes.md - other "MySQL vs TiDB" differences that commonly break SQL.skills/tidb-sql/references/explain.md - EXPLAIN / EXPLAIN ANALYZE usage, tidb_json and dot formats.skills/tidb-sql/references/flashback.md - FLASHBACK TABLE/DATABASE and FLASHBACK CLUSTER recovery playbooks.skills/tidb-sql/references/tidb-cloud-ssl.md - TiDB Cloud SSL verification requirements and client flags.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer