On Thursday 08 Jan 2004 16:50, you wrote:
(B> On Thu, Jan 08, 2004 at 02:47:51PM +0000, Richard Davies wrote:
(B> > On Thursday 08 Jan 2004 12:33, Harald Fuchs wrote:
(B> > > In article <[EMAIL PROTECTED]>,
(B> > >
(B> > > Richard Davies <[EMAIL PROTECTED]> writes:
(B> > > > I find at present from reasons I can't work out if the image to be
(B> > > > stored is a jpg then there is no problem but if it is a tiff them
(B> > > > MySQL won't store it.
(B> > > >
(B> > > > insert into charts values(5,'No
(B> > > > comment',(LOAD_FILE("/home/richard/fred.jpg")));
(B> > > >
(B> > > > works fine.
(B> > > >
(B> > > > insert into charts values(5,'No
(B> > > > comment',(LOAD_FILE("/home/richard/fred.tiff")));
(B> > > >
(B> > > > inserts NULL instead of the image.  fred.jpg and fred.tiff both exist
(B> > > > in the same directory.
(B> > >
(B> > > Maybe fred.tiff is larger than max_allowed_packet?
(B> >
(B> > No it isn't.  fred.tiff is just fred.jpg copied and renamed. Apart from
(B> > the name the files are identical at about 400k and the max_allowed_packet
(B> > is set in /etc/my.cnf to be 10Meg.
(B>
(B> Are the file permissions identical? Especially the third set is important.
(B
(BThey should have been exactly the same as the only thing I did to the file was 
(Bmv fred.jpg fred.tiff
(BI can no longer check this as I deleted the directory. 
(B
(B> Mysqld probably runs under an account (mysql) that is not yourself or in
(B> your group, so the file needs to be world-readable. Use 'ls -l' to show
(B> these permissions.
(B
(BYou must be right though as I have just done some extensive testing with a 
(Brange of 17 files ranging from 100k to 1.7meg and have no problems so long as 
(BI chmod 666 *
(B
(B> Also, did the copying or renaming change the case of the filename, e.g.
(B> because you accessed it through a Samba share?
(B
(BPurely linux system no Samba but a very good thought.
(B
(BThank you all for you helpful suggestions I still have no idea how the file 
(Bpermissions got changed but it seems to be the answer.
(B
(B>
(B>
(B> Regards,
(B>
(B> Fred.
(B
(B-- 
(BRegards
(B
(BRichard
(B
(B
(B-- 
(BMySQL General Mailing List
(BFor list archives: http://lists.mysql.com/mysql
(BTo unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to