At 19:58 +0100 7/29/03, David Otton wrote:
Hi, small but disturbing oddity, this.

I have a simple table:

CREATE TABLE musician (
        musicianid int(10) unsigned NOT NULL auto_increment,
        name varchar(60) NOT NULL default '',
        PRIMARY KEY (musicianid)
) Type=MyISAM;

There are 50 or so lines in the table. I inserted 2 new lines with PHP, with
this statement:

INSERT INTO musician SET name = '$name'

But from the console, one of the lines is missing:

mysql> SELECT * FROM musician ORDER BY musicianid;

+------------+------------------------+
| musicianid | name                   |
+------------+------------------------+
[...]
|         51 | Jewel                  |
|         52 | Lush                   |
|         53 | My Bloody Valentine    |
|         55 | Fred                   |
+------------+------------------------+

Yet if I ask for the missing line specifically, it is there:

mysql> SELECT * FROM musician WHERE musicianid = 54;

+------------+------------+
| musicianid | name       |
+------------+------------+
|         54 | john Smith |
+------------+------------+

Restarting the console doesn't seem to make any difference (I haven't tried
restarting MySQL). Is this expected behaviour? A bug?

It's certainly not the behavior *I'd* expect. :-)


You might try checking and/or repairing the table, then running your
queries again:

From the command prompt:

mysqlcheck db_name tbl_name
mysqlcheck --repair db_name tbl_name


My system: "mysql Ver 11.16 Distrib 3.23.49, for Win95/Win98 (i32)" "Apache/1.3.24 (Win32)" "PHP Version 4.3.2"


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to