← Back to team overview

maria-discuss team mailing list archive

Column named 'row_number' gives error in 10.11


I have a table that includes an int column named row_number. This worked
fine until I upgraded Debian from 11 to 12 which upgraded MariaDB from
10.5 to 10.11.

I now get errors when referencing that column for updates.

If I put backticks around the column name the update runs without error.

Is this an expected behaviour change from 10.5 → 10.11?



USE test;

    `id` int(11) NOT NULL,
    `row_number` int(11) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `kae` (`id`, `row_number`) VALUES (1, 0);

UPDATE kae SET row_number=12 WHERE id=1;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to
use near 'row_number=12 WHERE id=1' at line 1

Follow ups