4 messages in com.mysql.lists.gui-toolsRE: Problems with Text Editor and lar...
FromSent OnAttachments
Adam Hooper14 May 2002 13:07 
Jorge del Conde14 May 2002 17:08 
Adam Hooper14 May 2002 18:27 
Jorge del Conde14 May 2002 22:10 
Subject:RE: Problems with Text Editor and large BLOB columns
From:Jorge del Conde (jor@mysql.com)
Date:05/14/2002 05:08:16 PM
List:com.mysql.lists.gui-tools

Hi!

First of all, MAX_BLOB_SIZE of 512 bytes is pretty puny - the whole point of a BLOB/TEXT is that it can handle lots of characters - if I read correctly, somewhere in the gigabytes range. Maybe the maximum size should be user-configurable in the options menu? There should be an option 0, for "unlimited", too.

The reason for this is BLOB / TEXT fields should be limited to only display MAX_BLOB_SIZE in the results grid, while maintaining their complete value in the TextEditor. The reason for this is because having huge text in a Qtable can cause undesirable results and mem-leaks :(

As you can see MAX_BLOB_SIZE is defined to 512 which is much larger than any field type other than TEXT & BLOB (and variances)!

Editing a cell that's longer than MAX_BLOB_SIZE shouldn't be allowed - the "Apply" button should be grayed out, so that the user doesn't accidentally truncate his text. Or maybe there should some dialog box the user would have to read, or something.

This now works ok. The truncated text is ONLY used for display purposes in the results grid ... The TextEditor should not truncate any text at all.

Regards, Jorge

-----Original Message----- From: Adam Hooper [mailto:ada@densi.com] Sent: Tuesday, May 14, 2002 3:08 PM To: my@lists.mysql.com Subject: Problems with Text Editor and large BLOB columns

There are one or two very closely related problems with MyCC's blob (or "text") editing in the Text Editor component.

First of all, MAX_BLOB_SIZE of 512 bytes is pretty puny - the whole point of a BLOB/TEXT is that it can handle lots of characters - if I read correctly, somewhere in the gigabytes range. Maybe the maximum size should be user-configurable in the options menu? There should be an option 0, for "unlimited", too.

Also, write a value larger than 512 bytes to a cell - WAY bigger, then open it in the text editor with MyCC. Write another. Funny, eh? It cuts off the *last* 3 characters and replaces them with elipsis, instead of truncating the string and putting them there.

Editing a cell that's longer than MAX_BLOB_SIZE shouldn't be allowed - the "Apply" button should be grayed out, so that the user doesn't accidentally truncate his text. Or maybe there should some dialog box the user would have to read, or something.

I'm at work and only had time to hack my way through by changing MAX_BLOB_SIZE, but it seems like half the code checks this, and half doesn't. I really haven't had a good look, though; I probably missed stuff.

I'd be willing to write a patch, if it's decided what exactly should happen: should it be a user-defined option? Or just a #define, or unlimited... etc. And should the "Apply" button be grayed out?

To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, email mycc@lists.mysql.com instead.