SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
Feb 12, 2001, 17:28 #1
- Join Date
- Feb 2001
- Location
- London
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've got a table in a MySQL database which currently stores stats from a website I developed....it has a primary key called id which is also set as unique and an index.
However, I noticed today that the stats stopped working...
The number of table rows was at 205,933....
When I tried to manually add more data to the table it stated that id 205,934 already existed and it couldn't add it because the column was a unique index. However id 205,934 doesn't exist.
After fiddling around removing a few rows and trying to add more, I now get the following error...
Can't open file: 'stats.MYD'. (errno: 145)
I assume that the table is corrupt....Does anyone know what may have caused the problem?
I'm running MySQL 3.23.32 running on Red Hat LinuxGuntrisoft Ltd
http://www.guntrisoft.com
-
Feb 14, 2001, 07:48 #2
- Join Date
- Feb 2001
- Location
- London
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Anyone?!?!
Guntrisoft Ltd
http://www.guntrisoft.com
-
Feb 14, 2001, 09:28 #3
- Join Date
- Dec 2000
- Location
- Idaho, USA
- Posts
- 452
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
try using PHPMyAdmin to "copy" the table, give it another name, and give it a try....
just a shot in the dark...Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services
-
Feb 14, 2001, 09:52 #4
- Join Date
- Jun 2000
- Location
- Sydney, Australia
- Posts
- 3,798
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
a primary key called id which is also set as unique and an index.
He, he - I think you've overdone it with the definition of column "id". You don't need to index a primary key nor define it as unique. This is because a primary key *must*, by definition, be unique - so the RDBMS will enforce its uniqueness automatically. Similarly, the primary key is indexed automatically as well. So this may be causing your problems.
On the other hand, are you absolutely, positively sure that there is no record with id of 205,934 exists?
-
Feb 14, 2001, 18:22 #5
- Join Date
- Feb 2001
- Location
- London
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Totaly sure
I did SELECT * FROM stats WHERE id="205934" and it returned nothing.....
The way I set it up, didn't seem to effect it for the first 205,933 rowsGuntrisoft Ltd
http://www.guntrisoft.com
-
Feb 14, 2001, 18:41 #6
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What is the column definition for your id field?
Please don't PM me with questions.
Use the forums, that is what they are here for.
Bookmarks