On 8/17/06, Michael Bayer <[EMAIL PROTECTED]> 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.

That BigInteger problem earlier today! I couldn't understand why it
kept generating INTEGER when the column spec rendered out, but my
MediumBlob Type worked fine. Now I understand, and may foolishly be
bold enough to try a couple of newer custom types (I want a
UTCDatetime that can ensure that all of our stored dates come out of
the database as timezone aware, now that we have the 'always store as
UTC' policy in place internally).

As for the BigInteger problem I was having earlier, it turned out that
Integer worked fine for my situation. I was very close to commenting
on that ticket too.

> 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.

>From what I understand now that I've looked at the Text Types Storage
Requirements page a few times, the Blob and Text columns and their
sizes (and associated names) come from the number of bytes used to
store the length. For a regular Blob / Text column, it's only two
bytes. MediumBlob uses three, LongBlob uses four.

I thought the 'L' in BLOB stood for Large, but I guess it's just the
times that makes 64k seem small... Still, a blob with a 64k size limit
feels like Starbucks, where 'Tall' is the smallest drink (12 ounces..
I swear 'Tall' used to mean much bigger).

I thought I saw something today that said newer versions of MySQL
allowed setting a length in BLOB, like BLOB(131072), and MySQL would
use the appropriate size. BLOB(65537) would spill over to Medium
automatically. That would sure make it easier for multi-database
toolmakers like you, instead of having to keep up with the ever
growing list of size names. But I haven't found any mention of that
option in any of the MySQL manuals; perhaps it was just a dream.

-- 
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

Reply via email to