27.12.2011, 22:27
Hi guys,
My vehicle ownership engine saves automatically when the game mode is shut down, to save, it references the array index to figure out which mysql row to edit, the mysql table has a column called ID, this is auto incremented.
Everybody knows that, when you delete a row, auto increment will not account for this, I have made a fix, but it takes an extremely long time to execute the query/, which in turn completely desyncs my server for up to a minute!
They are the queries I'm running, doing all this takes an extremely long time to execute, does anybody know a faster way to reset auto_increment or why this is taking so long? could it be related to the mysql database's host? (It's not home, it's a friends VPS, which is located in Dallas, and I'm in England.)
Thanks in advance.
My vehicle ownership engine saves automatically when the game mode is shut down, to save, it references the array index to figure out which mysql row to edit, the mysql table has a column called ID, this is auto incremented.
Everybody knows that, when you delete a row, auto increment will not account for this, I have made a fix, but it takes an extremely long time to execute the query/, which in turn completely desyncs my server for up to a minute!
Код:
ALTER TABLE `playervehicles` DROP COLUMN `id`
Код:
ALTER TABLE `playervehicles` ADD COLUMN `id` INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL
Thanks in advance.