List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 21 1999 10:50pm
Subject:Re: BUG ? Auto_increment and tiny_int
View as plain text  
>>>>> "Scott" == Scott Hess <scott@stripped> writes:

Scott> I hate to ask the obvious, but... you say "after many accesses to the
Scott> database".  You do realize that tinyint will only store 256 distinct
Scott> values, right?  So if you insert null for an autoincrement unsigned tinyint
Scott> 256 times, it will wrap around to zero.

Scott> Later,
Scott> scott

The above is right.

About the other question:

You can convert a table type with:

ALTER TABLE old_table type=isam;

Regards,
Monty

Scott> ----- Original Message -----
Scott> From: Peter Zaitsev <pz@stripped>
Scott> To: <mysql@stripped>
Scott> Sent: Tuesday, September 21, 1999 10:50 AM
Scott> Subject: BUG ? Auto_increment and tiny_int


Scott> I have a several systems running mysql 3.23.3 and have the following
Scott> problem repeating many times.

Scott> Table which have primary key of tinyint auto_increment have problemms with
Scott> inserts to it then auto_increment shoul work.
Scott> Strange thing is - then I create table with the same structure and try to
Scott> run problematic queries on this table - they work fine.
Scott> The troubles comes after many accessess to the database. Changing tyniint
Scott> to smaill int solves provlem.
Scott> Also data corruption comes in place. besides mysql daemon did not terminate
Scott> abnormally.


Scott> Checking MYISAM file: protocols.MYI
Scott> Data records:       6   Deleted blocks:       0
Scott> - check file-size
Scott> - check key delete-chain
Scott> - check record delete-chain
Scott> - check index reference
Scott> - check data record references index: 1
Scott> myisamchk: warning: Auto-increment value: 0 is smaller than max used value:
Scott> 6
Scott> - check data record references index: 2
Scott> MYISAM-table 'protocols.MYI' is usable but should be fixed


Scott> Does anyone have some ideas about it ?

Scott> One more question: Is there  any  easy   way to convert MYISAM tables to
Scott> ISAM ? I'd like to check if this will slove problemm.


Scott> Best Regards
Scott>                        Peter Zaitsev



Scott> ---------------------------------------------------------------------
Scott> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
Scott> posting. To request this thread, e-mail mysql-thread13840@stripped

Scott> To unsubscribe, send a message to the address shown in the
Scott> List-Unsubscribe header of this message. If you cannot see it,
Scott> e-mail mysql-unsubscribe@stripped instead.
Thread
BUG ? Auto_increment and tiny_intPeter Zaitsev21 Sep
  • Re: BUG ? Auto_increment and tiny_intScott Hess21 Sep
    • Re: BUG ? Auto_increment and tiny_intMichael Widenius22 Sep
  • Re: BUG ? Auto_increment and tiny_intRick Moore22 Sep
    • Re: BUG ? Auto_increment and tiny_intMartin Ramsch22 Sep
      • Re: BUG ? Auto_increment and tiny_intPaul DuBois22 Sep
    • Re: BUG ? Auto_increment and tiny_intMichael Widenius22 Sep