Hi Jeff,

4.1 is not limited to 64k. Use LONGBLOB type. LONGBLOB column depends on 
the configured maximum packet size in your my.cnf. So you can easily 
store several gigs if you want to. However I haven't tested BLOBs on 
SQLAlchemy yet.

--
Andrius


Michael Bayer wrote:
> ideally we want to add all the types MySQL has to the mysql.py  
> module, and we've had a handful of contributors who are interested in  
> this feature steadily adding more and more type objects to the module  
> (such as the mediumtext binary).  So if you want to send patches for  
> MEDIUMBLOB and whatever else, they can go right in (I added it as  
> MSMediumBlob in rev 1806, along with a ticket fix for some other  
> mysql type stuff).  MySQL's types seem to be particularly out of  
> control and i try not to get hung up on them too much.
>
> from my own experience, i would think BLOB stores at least as large a  
> field of data as MEDIUMBLOB ?  (in fact, i thought that BLOB's were  
> generally unbounded).  im not particularly sure about MySQL.   I am  
> pretty sure that with MySQL (at least with version 5.0), the 64kb  
> limitation is a configurable option in the config file.   SQLAlchemy  
> itself hardly does anything with BLOBs or anything else except send  
> it off to MySQLdb, there doesnt seem to be any "streaming cursor"  
> kind of logic (such as what you get with an Oracle JDBC driver...now  
> *theres* a BLOB nightmare) going on.
>
> On Aug 17, 2006, at 7:24 PM, Jeff Shell wrote:
>
>   
>> Hello. We're using MySQL 4.1.x and have one table (currently) in our
>> application that's responsible for holding binary data.
>>
>>     
>>> From my understanding, the maximum length of the BLOB column in MySQL
>>>       
>> 4.1 is limited to 64k, which is a little too small for comfort. But
>> that seems to be all that is supported as of SQLAlchemy 0.2.6. I was
>> able to add a MEDIUMBLOB to our own `tables.py` module easily enough.
>>
>> But I was wondering - is there any reason these aren't supported? I
>> see there's support for `MEDIUMTEXT BINARY` in the databases.mysql
>> module, but I haven't been able to get understandable answers out of
>> the MySQL 4.x docs about whether `MEDIUMTEXT BINARY` === `MEDIUMBLOB`.
>> Should I continue using my own type for our purposes, or is
>> MSMediumText(binary=True) safe to use?
>>
>> class MEDIUMBLOB(mysql.MSBinary):
>>     def get_col_spec(self):
>>         return "MEDIUMBLOB"
>>
>> Thanks,
>> Jeff Shell
>>
>> ---------------------------------------------------------------------- 
>> ---
>> Using Tomcat but need to do more? Need to support web services,  
>> security?
>> Get stuff done quickly with pre-integrated technology to make your  
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
>> Geronimo
>> http://sel.as-us.falkag.net/sel? 
>> cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Sqlalchemy-users mailing list
>> Sqlalchemy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>>     
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to