miscellaneous

Forum > Miscellaneous > Bot ID 21
Reply To Thread (login)
Jmz [106]
2014-03-25 18:32:43 πŸ”—
[10 years, 280 days ago]

Random question; why isn't there a bot ID 21?

Vrexu is 20 and PeeT is 22


 
Linn [90]
2014-03-25 21:42:26 πŸ”—
[10 years, 280 days ago]

It was deleted because Ed messed up on the spelling of the account.


 
Ender [1]
Administrator
2014-03-26 11:49:24 πŸ”—
[10 years, 279 days ago]

First, some quick background:

  • Bot id comes from the auto-increment counter of the "bots" table in the database.
  • MySQL increases the auto-increment counter of a table on failed insert.
  • One of the reasons an insert can fail is unique index violation.
  • There are unique indexes on both username and botname.

My recollection of what happened here is that I'd tried creating a new bot that violated either the username or botname unique index (i.e. I tried using a username or botname that already existed). This made the insert fail, but the auto-increment counter still went up, thus id 21 was skipped. This was only a problem during closed beta because that's the only time bots were creating manually by me inserting a row into the database. The registration page that people have used since open beta first checks whether the username or botname is taken before trying to insert so that it can provide a useful error message if either is taken.

Also, I answered this with so much detail so I can have something to point at later when it's inevitably asked again. It comes up surprisingly often. :)

Also also, If I had messed up the spelling of something, I would have simply updated the row. I don't know where Alan got his misinformation.


 
Nosferatu [233]
2014-03-26 15:23:07 πŸ”—
[10 years, 279 days ago]

I don't know where Alan got his misinformation.

Likely the same place he got his information about cheating being ok...


 
SG6 [130]
2014-03-26 16:35:57 πŸ”—
[10 years, 279 days ago]

BURN!


 
Forum > Miscellaneous > Bot ID 21
Reply To Thread (login)