← Back to team overview

maria-developers team mailing list archive

Re: cd41d376d41: MDEV-16697: Fix difference between 32bit/windows and 64bit systems in allowed select nest level

 

Hi, Oleksandr!

Why did you do that?

You wrote "Fix difference between 32bit/windows and 64bit systems", but
to fix just that it would've been enough to change nesting_map to
ulonglong.

Using Bitmap<> you're basically preparing for any arbitrary >64
nesting depth. Is this your goal? What feature do you need it for?

On Nov 06, Oleksandr Byelkin wrote:
> revision-id: cd41d376d413d066f3d497a67d039515fd385a1c (versioning-1.0.5-36-gcd41d376d41)
> parent(s): 1748a31ae8d69e4939336f644f884e9de3039e7f
> author: Oleksandr Byelkin <sanja@xxxxxxxxxxx>
> committer: Oleksandr Byelkin <sanja@xxxxxxxxxxx>
> timestamp: 2018-07-05 17:49:44 +0200
> message:
> 
> MDEV-16697: Fix difference between 32bit/windows and 64bit systems in allowed select nest level
> 
> diff --git a/include/my_global.h b/include/my_global.h
> index 11d17ad146a..26078114464 100644
> --- a/include/my_global.h
> +++ b/include/my_global.h
> @@ -984,7 +984,6 @@ typedef unsigned long my_off_t;
>    TODO Convert these to use Bitmap class.
>   */
>  typedef ulonglong table_map;          /* Used for table bits in join */
> -typedef ulong nesting_map;  /* Used for flags of nesting constructs */
>  
>  /* often used type names - opaque declarations */
>  typedef const struct charset_info_st CHARSET_INFO;
> diff --git a/sql/sql_lex.h b/sql/sql_lex.h
> --- a/sql/sql_lex.h
> +++ b/sql/sql_lex.h
> @@ -33,6 +33,10 @@
>  #include "sql_tvc.h"
>  #include "item.h"
>  
> +/* Used for flags of nesting constructs */
> +#define SELECT_NESTING_MAP_SIZE 64
> +typedef Bitmap<SELECT_NESTING_MAP_SIZE> nesting_map;
> +
>  /* YACC and LEX Definitions */

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups