sigh - forgot to cc the list.
---------- Forwarded message ---------- From: Roland Bouman <[email protected]> Date: Fri, Dec 19, 2008 at 10:46 PM Subject: Re: [Drizzle-discuss] DISCUSSION/VOTE please: Should SQL Warnings All be Errors? To: Jay Pipes <[email protected]> Hi! On Fri, Dec 19, 2008 at 10:30 PM, Jay Pipes <[email protected]> wrote: > Sure, but in the case above, is the warning useful at all? By putting IF > NOT EXISTS aren't you essentially saying "don't error if it exists" and > therefore we would one care about the warning that is emitted? Ok - intuitively I agree, but there is more to it. According to the standard, warnings are there to signal you that whatever you asked did happen, but there may be reason to be cautious of the effect. Simple example: mysql> select cast(c as char(9)) from t; +--------------------+ | cast(c as char(9)) | +--------------------+ | 012345678 | +--------------------+ 1 row in set, 1 warning (0.06 sec) Warning (Code 1292): Truncated incorrect CHAR(9) value: '0123456789' In this case, a warning is in order. I asked to cast to char(9) but this does have the effect of losing data - hence, a warning. An error occurs when the statement cannot be executed at all or must be aborted to avoid some kind of conflict - for example, constraint violation. > > -jay > >>> What are your thoughts? Should Drizzle have a "warning" mode? >> >> Not sure yet....reading up on it. > > -- Roland Bouman http://rpbouman.blogspot.com/ -- Roland Bouman http://rpbouman.blogspot.com/ _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

