At 16:21 -0500 11/18/03, Denis Mercier wrote:
here's what im trying to do, i have a tar file in a blob field
and i'm trying to retrieve it and pipe it directly into tar
to decompress it, without first writing it to the hard drive,

here's what i've tried so far,
I create a text file called test1:
use my_db; select * into dumpfile "/usr/local/test1" from my_table;


so when i try shell> mysql --pager < test1 | tar x

the tar file does get written to /usr/local/test1 which is the step i'm
trying to avoid, and nothing seems to get piped to tar?

Right, because you've told the SELECT to write its output to /usr/local/test1, not to its standard output. Hence, tar receives nothing.



i also tried:
use my_db; select * from my_table;


so when i try shell> mysql --pager < test1 | tar x

the tar file does not get written to /usr/local/test1 but i still dont
get my untared files? write permissions are ok?
what am i missing?

Have you verified that the mysql command actually writes any output, for example, with this command:

shell> mysql --pager < test1 | wc

Do you get any output from tar at all, such as an error message?
Maybe the output from mysql isn't suitable.  Couple of things to try:

1) --pager should be omitted. It serves no function here.
2) You might want to add --raw to the mysql command



--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL A
B, 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