> > Doesn't matter: "If you assign a value to a CHAR or VARCHAR column that
> > exceeds the column's maximum length, the value is truncated to fit."
>
> ok, so it isn't depending on "fixed length" as you first said, and the
> reason for it is just the simple design of sql, right?

As I see it, the question is what should an SQL server do in this case of a
value being assigned to a CHAR (or VARCHAR) column that exceeds the column's
maximum length.

The current action is that this value is truncated to fit the column.  The
other option would be to automagically expand the column's length so the
value would fit.  Despite what the original poster may think, they _really_
don't want that to happen.  Apart from applications that depend on only
receiving a certain length string from a query (think buffer overflow),
having an insert unexpected alter an indexed char column on a 200,000 row
table would be A Bad Thing.

I wouldn't be terribly opposed to having an option to be set to allow this,
but it shouldn't be on by default, and most MySQL users who can read the
manual and find the option to do this should already know why this is a bad
thing and not want to use it.

Ryan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to