Tag

sql_safe_updates

0 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Oct 27, 2024 · Databases

Preventing Full Table Updates with MySQL sql_safe_updates and SQL Interceptors

To avoid accidental full‑table UPDATE or DELETE operations, enable MySQL’s sql_safe_updates (session or global), use MyBatis‑Plus’s IllegalSQLInnerInterceptor, employ IDE plugins and code reviews, and always write explicit WHERE clauses or safe‑update patterns.

Full Table UpdateMyBatis-PlusMySQL
0 likes · 5 min read
Preventing Full Table Updates with MySQL sql_safe_updates and SQL Interceptors
macrozheng
macrozheng
Sep 3, 2023 · Databases

Why a Single UPDATE Can Crash Your MySQL Database and How to Prevent It

This article explains how an UPDATE without indexed WHERE conditions can trigger full‑table next‑key locks in InnoDB, causing business downtime, and provides practical safeguards such as enabling sql_safe_updates and using FORCE INDEX to ensure safe execution.

IndexesInnoDBMySQL
0 likes · 8 min read
Why a Single UPDATE Can Crash Your MySQL Database and How to Prevent It