3140
MariaDBWARNINGCriticalDeprecationHIGH confidence

Deprecated syntax used (always deprecated)

Production Risk

Low — warning only; behavior unchanged until the feature is removed.

What this means

A syntax or feature that is permanently deprecated in MySQL 8.0 was used. Unlike warnings that depend on a setting, this warning is always emitted regardless of sql_mode.

Why it happens
  1. 1Using syntax that was kept for backward compatibility in MySQL 8.0 but is marked for removal in a future version.
How to reproduce
trigger — this will error
trigger — this will error
-- Example: use of deprecated syntax specific to MySQL 8.0

expected output

Warning (Code 3140): Deprecated syntax used.

Fix

Migrate to the recommended syntax

Migrate to the recommended syntax
-- Consult the MySQL 8.0 migration guide for the replacement syntax

Why this works

Eliminates the deprecation warning and future-proofs the query.

What not to do

Version notes
MySQL 8.0

These warnings indicate syntax that will be removed in MySQL 9.0.

Sources
Official documentation ↗

MySQL 8.0 — 3140 ER_WARN_DEPRECATED_SYNTAX_ALWAYS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors