How to stop auto-increment with ignored inserts that don't make changes to MySQL?

I add 500 rows using INSERT IGNORE, if a row already exists (based on a unique field), then it just does nothing if it does not insert a row.

My problem is that they say that only 10 do not exist, with each addition the number of auto-increments increases, so it increases by 500, so I end the spaces in my identifiers. How to stop it?

I tried:

SET global innodb_autoinc_lock_mode = 0;

But I get the error:

1238 - Variable 'innodb_autoinc_lock_mode' - a read-only variable

How to change this?

+5
source share
1 answer

MySQL, innodb_autoinc_lock_mode , , MySQL.

--innodb_autoinc_lock_mode=0

(mysql.ini)

innodb_autoinc_lock_mode=0

, (: ) . .

+10