Marko,
On 20/10/2010, at 11:58 PM, marko.makela@stripped wrote:
> #At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on
> revid:marko.makela@stripped
>
> 3192 Marko Mäkelä 2010-10-20
> Fix a compiler warning caused by fixing Bug #57588 (compiler warning).
>
> Declare DATA_MBMAXLEN with the same data type as DATA_MBMINLEN.
>
> modified:
> storage/innobase/include/data0type.h
> === modified file 'storage/innobase/include/data0type.h'
> ---
> a/storage/innobase/include/data0type.h revid:marko.makela@stripped
> +++
> b/storage/innobase/include/data0type.h revid:marko.makela@stripped
> @@ -180,7 +180,7 @@ because in GCC it returns a long. */
> UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), \
> 1))
> /* Get mbmaxlen from mbminmaxlen. */
> -#define DATA_MBMAXLEN(mbminmaxlen) ((mbminmaxlen) / DATA_MBMAX)
> +#define DATA_MBMAXLEN(mbminmaxlen) ((ulint) ((mbminmaxlen) / DATA_MBMAX))
This cast was dropped in the final version to catch type mismatch between the two
macros. If someone changes the type of the underlying variables after your fix
we will not catch the mismatch. Unless the original fix didn't solve the problem
this change should be reverted.
Regards,
-sunny