List:Internals« Previous MessageNext Message »
From:Chad MILLER Date:March 13 2007 7:26pm
Subject:Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOB
View as plain text  
On 12 Mar 2007, at 11:57, Chad MILLER wrote:
> Hi Pete.  Leaving aside for a moment the architectural decisions  
> (which I'll ask about internally), here's my review of the patch.

On 13 Mar 2007, at 14:47, Chad MILLER wrote:
> On 13 Mar 2007, at 14:28, Pete Harlan wrote:
>> Thank you very much for reviewing my patch.  I'll come up with  
>> another
>> one to address your points, and I'll submit it with a feature-request
>> bug report as you suggest.
>
> Hi Pete.  Great!  To be clear for others, you did the right thing  
> in mailing first.  I'd rather see the idea posted before a bug  
> filed to track it.


Alright Pete, good(-ish) news and bad news:

I heard from our architectural gurus, and the verdict is that  
additional sql_modes are Bad.  In this case, you're trying to work  
around the fact that BLOBs don't take default values.  The correct  
solution, then is to change that, rather than pack "emptiness" and  
"defaultness" -- two bits of information -- into one bit of a SQL  
mode.  Imagine the next person wanting ZERO_DEFAULT_FOR_BLOB, et c.   
Those are headaches we want to avoid, and so we wouldn't apply the  
patch as you've suggested.  Sorry!

The good news is that I can't think of a reason that adding support  
for default values for BLOBs would be hard.  It's a bit of a mystery  
to me that it isn't implemented, to be honest.  It's probably a hold- 
over from the pre-5.0 days.  Unifying the types so they all work the  
same is a task that's both "sexy" and obviously right, and it  
probably rips out some special-case code.  What's not to like?!

Anyway, do you agree, Pete, that adding  BLOB DEFAULT ''  makes more  
sense, from a maintenance standpoint?  Do you think you'd be  
interested in working on it?

- chad

--
Chad Miller, Software Developer                         chad@stripped
MySQL Inc., www.mysql.com
Orlando, Florida, USA                                13-20z,  UTC-0400
Office: +1 408 213 6740                         sip:6740@stripped



Attachment: [application/pgp-signature] This is a digitally signed message part PGP.sig
Thread
Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBPete Harlan9 Mar
  • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBChad MILLER12 Mar
    • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBPete Harlan13 Mar
      • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBChad MILLER13 Mar
        • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBChad MILLER13 Mar
          • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBPete Harlan13 Mar
            • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBChad MILLER13 Mar
              • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBElliot Murphy14 Mar
            • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBStewart Smith14 Mar
            • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBChad MILLER10 Aug
              • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBPete Harlan10 Aug
                • Re: Patch for new SQL mode EMPTY_DEFAULT_FOR_BLOBStewart Smith21 Aug