Hi!
On Nov 21, Sergey Vojtovich wrote:
> ChangeSet@stripped, 2007-11-21 17:05:06+04:00, svoj@stripped +2 -0
> BUG#32050 - table logging gone wrong.
>
> INSERT/UPDATE against CSV table created by MySQL earlier than 5.1.23
> with NULL-able column results in server crash in debug builds.
>
> Starting with 5.1.23 CSV doesn't permit creation of NULL-able columns,
> but it is still possible to get such table from older MySQL versions.
>
> Relaxed DBUG_ASSERT() so that it accepts tables with NULL-able columns
> created by earlier versions of MySQL.
>
> diff -Nrup a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
> --- a/storage/csv/ha_tina.cc 2007-10-19 02:48:00 +05:00
> +++ b/storage/csv/ha_tina.cc 2007-11-21 17:05:03 +04:00
> @@ -479,7 +479,7 @@ int ha_tina::encode_quote(uchar *buf)
> This may only occur if the frm was created by an older version of
> mysqld which permitted table creation with nullable columns.
> */
> - DBUG_ASSERT(!(*field)->maybe_null());
> + DBUG_ASSERT(!(*field)->maybe_null() || table->s->mysql_version <=
> 50123);
>
> /*
> assistance for backwards compatibility in production builds.
I don't think it's a good idea.
This assert is just wrong - one should only assert things that are
always true if the program works correctly. But I can modify frm in a
hex editor and fail the above expression even if the program itself
(mysqld) is correct. That is - you cannot assert things that are not
*completely* under your control.
Please remove the assert. If you'd like add 'if(...) sql_print_warning()'
here.
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140