weapons icon indicating copy to clipboard operation
weapons copied to clipboard

[SQL]PRIMARY key duplicate

Open Nerus87 opened this issue 4 years ago • 6 comments

Error occurred

[weapons.smx] Insert Query failed! query: "INSERT INTO weapons (steamid) VALUES ('STEAM_1:1:xxxxxx79')" error: "Duplicate entry 'STEAM_1:1:xxxxxx79' for key 'PRIMARY'".

Nerus87 avatar May 20 '20 11:05 Nerus87

What problem did this cause? (shouldn't cause any)

kgns avatar Jul 30 '20 10:07 kgns

It's a common problem, exists in normal conditions. I don't remember currently what happen, but I've solved it by changing Insert to https://www.mysqltutorial.org/mysql-insert-or-update-on-duplicate-key-update/

Nerus87 avatar Aug 02 '20 13:08 Nerus87

I also noticed this error in my logs, but I didn't see if there is any direct BUG for the players.

crashzk avatar Aug 06 '20 20:08 crashzk

this seems like an unimportant bug, but if anyone wants to fix it and send a pull request, you're more than welcome

kgns avatar Oct 03 '21 22:10 kgns

this seems like an unimportant bug, but if anyone wants to fix it and send a pull request, you're more than welcome

@kgns ^

Ferks-FK avatar Dec 08 '21 16:12 Ferks-FK

Fixed using this version: https://github.com/kgns/weapons/pull/244

So far no new errors registered.

crashzk avatar Dec 16 '21 02:12 crashzk