Re: Question about BLOB
Gelu Gogancea wrote: Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, the story for the trailing spaces only apply for varchar, so for blob it does not matter as long as you properly escape the data. (you don't need the ascii conversion, just the escaping) -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Question about BLOB
I use mysql C API and for *escaping* the data i use the mysql_real_escape_string()the mysql native function. Thanks, _ G.NET SOFTWARE COMPANY SYSTEM INTEGRATOR - AUTOMATION SOFTWARE DEVELOPER http://www.gonetsoftware.com Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Philippe Poelvoorde [mailto:[EMAIL PROTECTED] Sent: Wednesday, 03 August, 2005 9:58 AM To: 'mysql@lists.mysql.com ' Subject: Re: Question about BLOB Gelu Gogancea wrote: Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, the story for the trailing spaces only apply for varchar, so for blob it does not matter as long as you properly escape the data. (you don't need the ascii conversion, just the escaping) -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question about BLOB
Gelu Gogancea wrote: I use mysql C API and for *escaping* the data i use the mysql_real_escape_string()the mysql native function. Thanks, Make sure to use mysql_real_query with the right length. because mysql_query is a macro for mysql_real_query with an additionnal parameters given by strlen(query_string); which culd lead to the broken result. http://dev.mysql.com/doc/mysql/en/mysql-real-query.html -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Question about BLOB
Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, _ G.NET SOFTWARE COMPANY SYSTEM INTEGRATOR - AUTOMATION SOFTWARE DEVELOPER http://www.gonetsoftware.com Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, 01 August, 2005 8:41 PM To: Gelu Gogancea; MySQL mailing list Subject: RE: Question about BLOB [snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a look here, http://dev.mysql.com/doc/mysql/en/blob.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question about BLOB
Hi, I think that I have seen many times the advice not to store the images in MySQL, but to store them on the hard disk while putting the path to them in the database. They could be accessed much faster this way. Teddy - Original Message - From: Gelu Gogancea [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; MySQL mailing list mysql@lists.mysql.com Sent: Tuesday, August 02, 2005 13:50 PM Subject: RE: Question about BLOB Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, _ G.NET SOFTWARE COMPANY SYSTEM INTEGRATOR - AUTOMATION SOFTWARE DEVELOPER http://www.gonetsoftware.com Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, 01 August, 2005 8:41 PM To: Gelu Gogancea; MySQL mailing list Subject: RE: Question about BLOB [snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a look here, http://dev.mysql.com/doc/mysql/en/blob.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question about BLOB
In my data structure I have many BLOBs which are not images - so I am hoping that MySQL can indeed deal with BLOBs ok ? Andy On 8/2/05 12:14 PM, Octavian Rasnita [EMAIL PROTECTED] wrote: Hi, I think that I have seen many times the advice not to store the images in MySQL, but to store them on the hard disk while putting the path to them in the database. They could be accessed much faster this way. Teddy - Original Message - From: Gelu Gogancea [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; MySQL mailing list mysql@lists.mysql.com Sent: Tuesday, August 02, 2005 13:50 PM Subject: RE: Question about BLOB Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, _ G.NET SOFTWARE COMPANY SYSTEM INTEGRATOR - AUTOMATION SOFTWARE DEVELOPER http://www.gonetsoftware.com Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, 01 August, 2005 8:41 PM To: Gelu Gogancea; MySQL mailing list Subject: RE: Question about BLOB [snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a look here, http://dev.mysql.com/doc/mysql/en/blob.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question about BLOB
I have never had a problem storing BLOBs in MySQL or any other DB for that fact. I have on many occasions forgot to use the proper methods for send a BLOB to the db. That means proper escaping, etc. On Tue, 2 Aug 2005, Andy Hilton wrote: In my data structure I have many BLOBs which are not images - so I am hoping that MySQL can indeed deal with BLOBs ok ? Andy -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Partner Sr. Manager 7 West 24th Street #100 - - +1 (443) 921-0381 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question about BLOB
But then replication would not work. On Tue, 2 Aug 2005, Octavian Rasnita wrote: Hi, I think that I have seen many times the advice not to store the images in MySQL, but to store them on the hard disk while putting the path to them in the database. They could be accessed much faster this way. Teddy - Original Message - From: Gelu Gogancea [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; MySQL mailing list mysql@lists.mysql.com Sent: Tuesday, August 02, 2005 13:50 PM Subject: RE: Question about BLOB Hi, Is not the first time when i read this this page. So, the conclusion is that until MySQL version 5.0.3 the empty spaces are remove if i wish to store the binary data in a table. Is not any other solutions?Because for the moment i convert the binary data into ASCII(printing ASCII) string,i add slashes after each converted character and after all this i store in the BLOB field on the table.And i wish to avoid this procedure...wasting a lot of time. Thanks, _ G.NET SOFTWARE COMPANY SYSTEM INTEGRATOR - AUTOMATION SOFTWARE DEVELOPER http://www.gonetsoftware.com Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, 01 August, 2005 8:41 PM To: Gelu Gogancea; MySQL mailing list Subject: RE: Question about BLOB [snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a look here, http://dev.mysql.com/doc/mysql/en/blob.html -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Partner Sr. Manager 7 West 24th Street #100 - - +1 (443) 921-0381 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Question about BLOB
[snip] I have a table with a MEDIUMBLOB field and i wish to store a picture(.BMP) which the size is 10622 bytes.But when i look into the table i see only 9582 bytes. Please, i wish to know for what reason on the table are few bytes than original. I use MySQL 5.0 - Fedora Core 3 [/snip] Have a look here, http://dev.mysql.com/doc/mysql/en/blob.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]