Improvement of load_file() function.

2007-08-21 Thread Lu Jingdong
MySQL provides an internal function named load_file(). It reads the file saved on the host server and returns the contents of the file as a string. This is an appoach to make users can read the file on the host server directly by using database. But I think this function can be improved

mysql load_file retreival

2003-12-20 Thread Larry Brown
I have set up a script to recieve a pdf file and store it in a mysql db using "update db set field=load_file('fileIncludingFile') where id=$id". Afterwards I can see the file has been uploaded into the blob field successfully and without errors. Now I want to get the file b

Re: load_file

2003-07-01 Thread Egor Egorov
t"? > On Friday, June 27, 2003, at 02:06 PM, > [EMAIL PROTECTED] wrote: > >> >> Seth Redmond <[EMAIL PROTECTED]> wrote: >>> I've been having a few problems loading blobs via the LOAD_FILE >>> function >>> >>> I've tried things

Re: load_file

2003-06-30 Thread Seth Redmond
ing on the same machine, so I shouldn't be having any problems from the server. -s On Friday, June 27, 2003, at 02:06 PM, [EMAIL PROTECTED] wrote: Seth Redmond <[EMAIL PROTECTED]> wrote: I've been having a few problems loading blobs via the LOAD_FILE function I've trie

Re: re: load_file

2003-06-27 Thread Egor Egorov
Seth Redmond <[EMAIL PROTECTED]> wrote: > I've been having a few problems loading blobs via the LOAD_FILE function > > I've tried things along the lines of: > > UPDATE table SET binaryRecord=LOAD_FILE("/Users/shared/filename.mov") > where refNo=

re: load_file

2003-06-26 Thread Seth Redmond
I've been having a few problems loading blobs via the LOAD_FILE function I've tried things along the lines of: UPDATE table SET binaryRecord=LOAD_FILE("/Users/shared/filename.mov") where refNo=1; It only seems to happen when loading something over 1-1.5mb, as I've

Re: MySQL LOAD_FILE problems

2003-01-11 Thread Stefan Hinz, iConnect \(Berlin\)
--- Original Message - From: "Herbert Kunzmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 11, 2003 9:03 AM Subject: MySQL LOAD_FILE problems > > Using MySQL, I have a problem where I am attempting to upload a 16.4MB file > into a BLOB field,

MySQL LOAD_FILE problems

2003-01-11 Thread Herbert Kunzmann
Using MySQL, I have a problem where I am attempting to upload a 16.4MB file into a BLOB field, but the insert fails with a ERROR 1030: Got error 139 from table handler and after trying again I get ERROR 1062: Duplicate entry 'bla' for key 1 BUT the entry was never made. I need to repair the ta

RE: using load_file...problems

2002-10-29 Thread Shon Stephens
i also figured out that load_file only works on the local server, not from clients...duh! thanks! -Original Message- From: Egor Egorov [mailto:egor.egorov@;ensita.net] Sent: Tuesday, October 29, 2002 12:19 PM To: [EMAIL PROTECTED] Subject: re: using load_file...problems Shon, Tuesday

re: using load_file...problems

2002-10-29 Thread Egor Egorov
Shon, Tuesday, October 29, 2002, 7:01:47 PM, you wrote: SS> i am trying to insert data into a blob column. its not working. i have tried SS> setting --local-infile=1. i tried granting file to my user and got an error. SS> i have read the manaul (for all you smarties who like to rtfm everyone) and

using load_file...problems

2002-10-29 Thread Shon Stephens
sql/mysql i am trying to insert data into a blob column. its not working. i have tried setting --local-infile=1. i tried granting file to my user and got an error. i have read the manaul (for all you smarties who like to rtfm everyone) and still don't get it. here is what i did for grant grant fi

Re: Store pictures in DB (load_file() revisited)

2002-10-01 Thread gerald_clark
mysql probably does not have search permission on /home/alex. copy the file to /tmp and see what happens. Alex Safonov wrote: >Greetings, > >just saw a message with an example of inserting a BLOB >value using load_file(). Can't get load_file() to >work: > >mysql>

Store pictures in DB (load_file() revisited)

2002-10-01 Thread Alex Safonov
Greetings, just saw a message with an example of inserting a BLOB value using load_file(). Can't get load_file() to work: mysql> select load_file('/home/alex/post.html') from test; +---+ | load_file(&#x

LOAD_FILE problem

2002-06-04 Thread Oladapo Carew
Problem Mysql version 3.23.39 Linux version SQL: INSERT INTO Pictures(Pers_ID, Picture) VALUES (1, LOAD_FILE('\Database\pictures\1.bmp')); above sql works fine. Mysql version 3.23.49-max Windows version SQL: INSERT INTO Pictures(Pers_I

load_file problem mysql-4.0.0-alpha-pc-linux-gnu-i686 on linux 2.4.16

2002-02-28 Thread Alfred Wallner
Hello, function load_file always return NULL for me. I tried using INSERT and UPDATE. The file and directory is world readable. Is there a known problem with load_file on mysql 4.0.0 ? INSERT INTO tests (Name,Data) VALUES ('123.456',LOAD_FILE("/home/mysql/testfile")); U

RE: Load_File issue

2002-02-11 Thread Todd Williamsen
First off, you trying to insert the image into the database or just its path? -Original Message- From: yue cheng [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 2:23 PM To: [EMAIL PROTECTED] Subject: Load_File issue Hi, Now I am puzzled by the filepath,Load_file, I

Re: Load_File issue

2002-02-11 Thread Paul DuBois
At 4:22 +0800 2/7/02, yue cheng wrote: >Hi, > >Now I am puzzled by the filepath,Load_file, I install >MySQL in Windows98, the file which i want to insert to >table is c:\P1.bmp > >when I run load_file in mysql command line,it succeeds >mysql> insert into blobtable (l

Re: Load_File issue

2002-02-06 Thread Paul DuBois
At 4:22 +0800 2/7/02, yue cheng wrote: >Hi, > >Now I am puzzled by the filepath,Load_file, I install >MySQL in Windows98, the file which i want to insert to >table is c:\P1.bmp > >when I run load_file in mysql command line,it succeeds >mysql> insert into blobtable (l

RE: Load_File issue

2002-02-06 Thread Todd Williamsen
First off, you trying to insert the image into the database or just its path? -Original Message- From: yue cheng [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 2:23 PM To: [EMAIL PROTECTED] Subject: Load_File issue Hi, Now I am puzzled by the filepath,Load_file, I

Load_File issue

2002-02-06 Thread yue cheng
Hi, Now I am puzzled by the filepath,Load_file, I install MySQL in Windows98, the file which i want to insert to table is c:\P1.bmp when I run load_file in mysql command line,it succeeds mysql> insert into blobtable (load_file("/P1.bmp")) but i don't know why i should us

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Kevin Smith
[EMAIL PROTECTED]> Cc: < Sent: Friday, February 01, 2002 5:57 PM Subject: Re: LOAD_FILE over SMB filesystems > At 17:47 + 2/1/02, Kevin Smith wrote: > >I don't get an error message... I'm actually running the script from the > >shell > prompt, so I'm t

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Paul DuBois
ript ag'in and see what happens. > >Here is the DBI debug : > >[root@server1 cgi-bin]# perl blob.cgi > DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread > Note: perl is running without the recommended perl -w option > -> prepare for DBD::mysq

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Gerald Clark
Paul DuBois wrote: > At 11:32 -0600 2/1/02, Gerald Clark wrote: > >> The single quotes around $image prevent perl from substituting the >> value. >> You are trying to load a file named $imageFN. >> $SQL = "UPDATE banners SET image=load_file(\"$imag

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Kevin Smith
hread Note: perl is running without the recommended perl -w option -> prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE banners SET banners.image = LOAD_FILE('/var/www/htdocs/corporate/images/homenew.jpg') where banners.id=1') Setting mysql_use_result t

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Paul DuBois
at you get. What is it? > >- Original Message - >From: "Paul DuBois" <[EMAIL PROTECTED]> >To: "Gerald Clark" <[EMAIL PROTECTED]>; "Kevin Smith" ><[EMAIL PROTECTED]> >Cc: <[EMAIL PROTECTED]> >Sent: Friday, February

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Kevin Smith
MAIL PROTECTED]> Sent: Friday, February 01, 2002 5:37 PM Subject: Re: LOAD_FILE over SMB filesystems > At 11:32 -0600 2/1/02, Gerald Clark wrote: > >The single quotes around $image prevent perl from substituting the value. > >You are trying to load a file named $imageFN. > &

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Kevin Smith
[root@server1 cgi-bin]# perl blob.cgi DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread Note: perl is running without the recommended perl -w option -> prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE banners SET banners.image = LOAD_FILE(&#x

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Paul DuBois
At 11:32 -0600 2/1/02, Gerald Clark wrote: >The single quotes around $image prevent perl from substituting the value. >You are trying to load a file named $imageFN. >$SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1"; But the single quotes are withi

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Gerald Clark
The single quotes around $image prevent perl from substituting the value. You are trying to load a file named $imageFN. $SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1"; Kevin Smith wrote: >After reading some other posts on inserting a image into a blo

Re: LOAD_FILE over SMB filesystems

2002-02-01 Thread Kevin Smith
After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = "UPDATE banners SET image

Re: LOAD_FILE over SMB filesystems

2002-01-23 Thread Stephen Lee
> > PM> e.g. > > PM> UPDATE Reading SET Data=LOAD_FILE("//linbox/log/travel/001.jpg") WHERE id=1; > > Loading files from windows/samba shares is not supported. > > > PM> Panos Have you tried smbmount? Stephen ---

LOAD_FILE over SMB filesystems

2002-01-22 Thread Panos Melas
Hello everyone, I have some problems loading files into blobs when the file resides on a network filesystem e.g. SAMBA. I use mysqld 3.23.43-nt. e.g. UPDATE Reading SET Data=LOAD_FILE("//linbox/log/travel/001.jpg") WHERE id=1; Query OK, 0 rows affected (0.05 sec) Rows matched:

How to load_file over an smb filesystem

2002-01-21 Thread Panos Melas
Hello everyone, I run mysql server (3.23.43-nt) on win2k. I have a problem when I try to load a file into a blob column from a mounted via SMB unix filesystem. I can create and access those files with other programs from the NT box. Any ideas how to trace the problem? I get no error and mysql

Re: LOAD_FILE does not work

2001-11-21 Thread Sharaaz Khan
OTECTED]> Sent: Wednesday, November 21, 2001 2:08 PM Subject: Re: LOAD_FILE does not work > > - Original Message - > From: "Carsten H. Pedersen" <[EMAIL PROTECTED]> > To: "Sharaaz Khan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: W

Re: LOAD_FILE does not work

2001-11-21 Thread Sharaaz Khan
- Original Message - From: "Carsten H. Pedersen" <[EMAIL PROTECTED]> To: "Sharaaz Khan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, November 21, 2001 1:52 PM Subject: RE: LOAD_FILE does not work > > I have been trying to

Re: Fw: LOAD_FILE does not work

2001-11-21 Thread Mike(mickalo)Blezien
On Wed, 21 Nov 2001 17:02:29 -0500, Christopher Book <[EMAIL PROTECTED]> wrote: >>>>UPDATE Software SET Description = >>LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file) >>WHERE ID = 9 >> >>You have to make sure that not onl

Fw: LOAD_FILE does not work

2001-11-21 Thread Christopher Book
>>UPDATE Software SET Description = LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file) WHERE ID = 9 You have to make sure that not only can mysql read the file, but it also has permissions to the directories that the files are in. Typically your home directory o

RE: LOAD_FILE does not work

2001-11-21 Thread Carsten H. Pedersen
> I have been trying to load the textual contents of a file from my > hard drive > space into a field (Description) of my mySQL table (Software) using the > follwing query. The query runs succfessfully How do you know that it's successful? What success/error codes (if any) are returned? > >

Fw: LOAD_FILE does not work

2001-11-21 Thread Sharaaz Khan
updated at all: UPDATE Software SET Description = LOAD_FILE(/usr2/home/khan/www/cgibin/protecting/Describe/description_file) WHERE ID = 9 I have used single and double quotes around the file name without success. In the mySQL documentation, it says that I need FILE privileges. I asked my ISP to give me

RE: load_file problem

2001-11-12 Thread Rick Emery
oops...I'm wrong...you can load that way. -Original Message- From: Rick Emery Sent: Monday, November 12, 2001 12:56 PM To: [EMAIL PROTECTED] Subject: RE: load_file problem Are you trying to load the contents of a file with an INSERT statement? If so, you can't. The valu

RE: load_file problem

2001-11-12 Thread Rick Emery
inisa Milivojevic Cc: [EMAIL PROTECTED] Subject: load_file problem Hi! I am stuck with the load_file problem... I have created the following table : create table table_name (field_number1 int unsigned primary key not null, data_field longblob not null); I then tried to load the contents of a file

load_file problem

2001-11-12 Thread Venugopal Allavatam
Hi! I am stuck with the load_file problem... I have created the following table : create table table_name (field_number1 int unsigned primary key not null, data_field longblob not null); I then tried to load the contents of a file with permissions -rw-r--r-- located in the /home/user directory

Re: load_file problem

2001-11-12 Thread Gerald Clark
into table_name(field_name1,data_file) values >> (1,load_file('/absolute/path/file_name.jpg')); > > > sorry abt the error guys.. > but guys this still returns a NULL value. please help. > thanks! > venu > > > > = > ==

load_file problem

2001-11-10 Thread Venugopal Allavatam
Hi All! I am sorry that I posted that message with a syntactical error. but what i meant to write was this.. > insert into table_name(field_name1,data_file) values > (1,load_file('/absolute/path/file_name.jpg')); sorry abt the error guys.. but guys this still returns a NULL va

Re: load_file problem

2001-11-09 Thread DL Neil
ile longblob not null); > > I then tried to input file into the data_file field using the load_file > function using: > > insert into table_name(field_name1,data_file) values > (1,'/absolute/path/file_name.jpg')); > > but it kept giving me an error that data_file

load_file problem

2001-11-09 Thread Venugopal Allavatam
input file into the data_file field using the load_file function using: insert into table_name(field_name1,data_file) values (1,'/absolute/path/file_name.jpg')); but it kept giving me an error that data_file does not allow NULL values. Hence, after some trouble shooting, I figured ou

RE: Load_File(2)

2001-09-19 Thread XIA HAIYAN
The manual said if you want to write a BLOB data into file, you should use INTO DUMPFILE, But that still doen't work. I got a Dumpfile with just 1 byte. There is a BLOB data in my table. What is the problem? best regards hxia >See MySQL Manual section 6.4.1 >SELECT INTO OUTFILE --

RE: Load_File

2001-09-19 Thread Will French
See MySQL Manual section 6.4.1 SELECT INTO OUTFILE database <- to satisfy mailer-daemon > -Original Message- > From: Jason Kwok [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 19, 2001 10:21 PM > To: [EMAIL PROTECTED] > Subject: Load_File > > >

Load_File

2001-09-19 Thread Jason Kwok
Load_File is used to read a picture (or any binary) file into table, but how to write it back to disk from a table? == Best Regards Jason Kwok == --- Virus Free Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.281 / Virus Database: 149 - Release Date

What is wrong with load_file

2001-04-30 Thread Dieter Becker
>Description: The following script should insert some files in a table, but load_file seems not to work I think it is only a small error, but I don't find it. Command File: # #!/bin/sh set -exv #

Re: LOAD_FILE and replication

2001-03-26 Thread Thalis A. Kalfigopoulos
D, PICT) VALUES (1, LOAD_FILE( '/images/image.jpg')). > It work o.k. MySQL save file image.jpg to table PICTURES. But when I look to table > PICTURES on slave server in field ID is value 1 but field PICT is empty. Why? > Work function LOAD_FILE with replication correctly? I'

LOAD_FILE and replication

2001-03-26 Thread Maros Klempa
Hi, I have two servers with MySQL 3.23.24-beta. One as master and one as slave. Replication between this two servers work fine. Now I want store pictures to table. On master server I use command INSERT INTO PICTURES (ID, PICT) VALUES (1, LOAD_FILE( '/images/image.jpg')). It work o.k.

RE: load_file

2001-03-07 Thread Rick Emery
l Subject: load_file Hi I have been trying to use load_file to store a file as a BLOB object in a database table but it always returns NULL although I have made sure that the path is correct and I have the appropriate priviliges. Any hints how to use load_file

load_file

2001-03-06 Thread Hesham Anan
Hi I have been trying to use load_file to store a file as a BLOB object in a database table but it always returns NULL although I have made sure that the path is correct and I have the appropriate priviliges. Any hints how to use load_file correctly

Re: LOAD_FILE /TEXT

2001-02-20 Thread Rolf Hopkins
t" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 21, 2001 9:53 Subject: LOAD_FILE /TEXT > Hi, > > I'm storing a text file in a TEXT column using the LOAD_FILE function like > this: > INSERT ... text_col=LOAD_FILE('filename') >

LOAD_FILE /TEXT

2001-02-20 Thread Richard Vibert
Hi, I'm storing a text file in a TEXT column using the LOAD_FILE function like this: INSERT ... text_col=LOAD_FILE('filename') Each line of the orig file ends with char 10. When I SELECT it like SELECT text_col INTO OUTFILE 'out_filename' ... I find that each line