What creates numbers for new users in the GDN_User table?
Hi! I'm pretty new to database stuff, but am poking around my site trying to figure out why the application form isn't working.
I have a suspicion it's been broken since January or so... we're running Vanilla 2.0.18, I believe (there's another admin who did the latest upgrading, currently on walkabout).
http://liminalnation.org/discuss/discussions/ is the forum address.
Every time someone tries to apply, the newest user gets assigned the same UserID... which results in a "Duplicate entry" error:
>
Duplicate entry '2147483647' for key 'PRIMARY'|Gdn_Database|Query|insert GDN_User (Name, Password, DiscoveryText, Email, Gender, DateFirstVisit, DateLastActive, LastIPAddress, DateInserted, HashMethod) values (:Name, :Password, :DiscoveryText, :Email, :Gender, :DateFirstVisit, :DateLastActive, :LastIPAddress, :DateInserted, :HashMethod)
<<<
Any idea where that entry number is generated so I can kind of increment it forward? I've tried adding to the number after ENGINE=MyISAM AUTO_INCREMENT in the GDN_User table, but that didn't do the trick.
Thanks for any ideas you can offer!
Comments
e.g. to change starting increment at 1000
reset starting increment at 1000
ALTER TABLE GDN_User AUTO_INCREMENT=1000;
but you have a more serious issue......
the userid you are trying to add is 2147483647
you should browse your user table in phpmyadmin, and compare it against users displayed with memberlist enh plugin.
how many active users do you actually have?
2147483647 or anywhere near that?
(looks totally SNAFUED).
how many are Deleted User?
sounds like you really need to clean things up unless you have
2,147,483,647 users.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
2147483647 is the maximum number for int values.
You are unlikely to have that many users.
However it can be caused by a "roll over".
Check you the user to see if you have any id that is 0 or negative.
Select * from GDN_User where UserID>1;
grep is your friend.
i wonder if someone tried to change the autoincrement number with a -1
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
There are some mysql bugs related to this
http://bugs.mysql.com/bug.php?id=1366
http://bugs.mysql.com/bug.php?id=36411
And this thread:
http://vanillaforums.org/discussion/18562/problem-adding-categories/p1
grep is your friend.
Oh, that -1 thing might well be it... I'll have to squint really hard to see if there's a misplaced minus.
We did have a kind of serious spam signup problem for a while, but I'm not sure if it was 2 billion deleted users serious. That would be... deleting how many users every day for how long? A lot. An awful lot.
Thanks for the leads!
2,941,758 users every day for two years.
1,176,703 users every day for five years
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.