Page 1 of 1

code #1089 error

PostPosted: 12. September 2015 04:57
by typomaniac
Can anybody explain this one to me. Just installed XAMPP for Windows 5.6.12 on my pc and I was putting a table together with only three columns which were "cid"with auto increment & integer and length of 5, username with varchar at 55, and date with timestamp. When I went to save the table it appeared in a popup tooltip.

Code: Select all
#1089 Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys.

Re: code #1089 error

PostPosted: 12. September 2015 14:42
by JJ_Tagy
Looks like you were trying to name the table with invalid characters at the front.

Re: code #1089 error

PostPosted: 12. September 2015 17:56
by typomaniac
That is what I thought at first but for some reason I was suspicious of the fact that the column cid was given a primary key and auto increment. I started over and created the table without those attributes and it came together as planned, after which I assigned the primary key and auto-increment. I'm wondering what kind of problems it will cause in the future.