You can check error numbers with perror.
: perror 127 Error code 127: Unknown error: 127 127 = Record-file is crashed
You need to repair your table. See the manual for details <http://dev.mysql.com/doc/mysql/en/Repair.html>.
Michael
J S wrote:
Even the ALTER gave me an error! mysql> alter table internet_usage change uid uid char(10); ERROR 1030: Got error 127 from table handler mysql>
J S wrote:
Thanks for your reply. I had to change the IP column to bigint because mysql was inserting the wrong value when it was just int.
Are your ips IPv4 (4 byte) or IPv6 (8 byte)? I'm guessing IPv4. In that case:
mysql> SELECT INET_ATON('0.0.0.1'), INET_ATON('255.255.255.255'); +----------------------+------------------------------+ | INET_ATON('0.0.0.1') | INET_ATON('255.255.255.255') | +----------------------+------------------------------+ | 1 | 4294967295 | +----------------------+------------------------------+ 1 row in set (0.00 sec)
You need INT UNSIGNED to store an ip. Using BIGINT, you're wasting 4 bytes per row.
If you're using IPv6, then you need BIGINT UNSIGNED to hold them.
Is this the correct command to change to chars ?
ALTER TABLE internet_usage CHANGE uid CHAR(10);
Close. It's CHANGE old_col_name new_col_name type, so:
ALTER TABLE internet_usage CHANGE uid uid CHAR(10);
Michael
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]