MySQL Forums
Forum List  »  General

MySQL client returns corrupt data (v4.1.7)?
Posted by: Ryan Hagan
Date: January 05, 2005 01:25PM

Greetings,

I posted this in the Newbie forum, but clearly that was the wrong place, so I'm moving it here.

I just upgraded from 4.0 to 4.1.7-Debian_4 pc-linux on i386. MySQL client and server are the exact same version. I was running 4.0 for about a month with no problems and I've been running 4.1 about two weeks before this strange behavior began.

I'm trying to run a very simple query on this table:

CREATE TABLE `users_levels` (
`level_id` int(11) NOT NULL auto_increment,
`level` varchar(32) NOT NULL default '',
PRIMARY KEY (`level_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

When I run a query through the mySQL client running on the same machine as the server:
select level_id, level from users_levels

Everything returns as normal:
+----------+------------------+
| level_id | level |
+----------+------------------+
| 100 | Super User |
| 80 | Company Admin |
| 60 | Regional Manager |
| 40 | Sales Manager |
| 20 | Member |
+----------+------------------+

However, if I change the query to this:
SELECT level_id, level FROM users_levels

I get the data back the same, but the column headers are munched.
+----------+------------------+
| B | |
+----------+------------------+
| 100 | Super User |
| 80 | Company Admin |
| 60 | Regional Manager |
| 40 | Sales Manager |
| 20 | Member |
+----------+------------------+

This same thing happens if I run the query through PHP's mysql_query() command. The column headers always come back with the same bad data and it happens with other tables. Restarting the MySQL server temporarily fixes the problem, but after running the query several times (less than 10) I start to get the bad data again.

Running:
myisamchk -cvi users_levels.MYI

returns no errors, but running:
myisamchk -r users_levels.MYI

always returns the following:
- recovering (with sort) MyISAM-table 'users_levels.MYI'
Data records: 5
- Fixing index 1

If anyone can shed some light on what is going on here, I'd greatly appreciate it.
Thanks!!!

--Ryan

Options: ReplyQuote


Subject
Written By
Posted
MySQL client returns corrupt data (v4.1.7)?
January 05, 2005 01:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.