If I understand correctly, you are trying to grep the SQL data file. This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed when you SELECT * from it. For a
start, if you have deleted records and not overwritten them, the blank
space will still contain, inaccessably, the data which was there. Non-text
fields are stored in binary formats. Records do not have line breaks at the
end, so grep will dump a splurge of data, not a clean record.What you are
doing is akin to dumping a program and expecting to see the source code; it
ain't like that.

The *only* valid way of inspecing MySQL tables is via MySQL itself. The
MySQL team will understand what is inside them, byt we lesser mortals
should stay well outside.

      Alec

------------------------------------------------------
You said:



I just tried the below:

create table virus (
        n int auto_increment not null,
        name char(128) not null,
        primary key(n),
        unique(name(100))
);

with a data file that has 122,111 sql commands like:

replace into virus values(NULL,"VBS/LoveLet-E");
replace into virus values(NULL,"VBS/LoveLet-E");
replace into virus values(NULL,"VBS/LoveLet-E");
replace into virus values(NULL,"VBS/LoveLet-G");
replace into virus values(NULL,"WM97/Myna-C");
replace into virus values(NULL,"VBS/LoveLet-G");
replace into virus values(NULL,"WM97/Myna-C");
replace into virus values(NULL,"VBS/LoveLet-G");
replace into virus values(NULL,"VBS/LoveLet-G");
replace into virus values(NULL,"W32/Sircam-A");

Now when I do a:

grep VBS/LoveLet-G sqlfile | wc

I get:

       123       492      6027





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to