Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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

  • peregrineperegrine MVP
    edited May 2014

    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.

  • 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!

  • peregrineperegrine MVP
    edited May 2014

    That would be... deleting how many users every day for how long?

    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.

Sign In or Register to comment.