{
  "id": "database/mysql-temp-table-full",
  "signature": "ERROR 1114 (HY000): The table '/tmp/#sql_xxxx' is full",
  "signature_zh": "错误 1114 (HY000): 表 '/tmp/#sql_xxxx' 已满",
  "regex": "ERROR 1114 \\(HY000\\): The table '/tmp/#sql_.*' is full",
  "domain": "database",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "MySQL's temporary table storage (either in-memory or on disk) has run out of space, often due to a large query that creates an oversized temporary table exceeding tmp_table_size or max_heap_table_size.",
  "root_cause_type": "generic",
  "root_cause_zh": "MySQL 的临时表存储（内存或磁盘）空间不足，通常是由于大型查询创建的临时表超出了 tmp_table_size 或 max_heap_table_size 的限制。",
  "versions": [
    {
      "version": "MySQL 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MySQL 5.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MariaDB 10.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing only tmp_table_size without checking max_heap_table_size",
      "why_fails": "MySQL uses the smaller of tmp_table_size and max_heap_table_size for in-memory temp tables; both must be increased.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Deleting files from /tmp directory manually",
      "why_fails": "Temporary tables are managed by MySQL; manual deletion can cause corruption or errors, and space will not be freed immediately.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase both tmp_table_size and max_heap_table_size in MySQL configuration:\n[mysqld]\ntmp_table_size = 256M\nmax_heap_table_size = 256M\nThen restart MySQL.",
      "success_rate": 0.9,
      "how": "Increase both tmp_table_size and max_heap_table_size in MySQL configuration:\n[mysqld]\ntmp_table_size = 256M\nmax_heap_table_size = 256M\nThen restart MySQL.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize the query to avoid large temporary tables, e.g., by adding indexes, using LIMIT, or rewriting JOINs to reduce intermediate result sets.",
      "success_rate": 0.85,
      "how": "Optimize the query to avoid large temporary tables, e.g., by adding indexes, using LIMIT, or rewriting JOINs to reduce intermediate result sets.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase both tmp_table_size and max_heap_table_size in MySQL configuration:\n[mysqld]\ntmp_table_size = 256M\nmax_heap_table_size = 256M\nThen restart MySQL.",
    "Optimize the query to avoid large temporary tables, e.g., by adding indexes, using LIMIT, or rewriting JOINs to reduce intermediate result sets."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmp_table_size",
  "official_doc_section": null,
  "error_code": "1114",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.88,
  "resolvable": "partial",
  "first_seen": "2023-12-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}