maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #04239
Re: [Commits] Rev 3067: Added progress reporting for alter table, LOAD DATA INFILE and for aria tables: check table, repair table, analyze table. in lp:maria/5.3
Michael Widenius <monty@xxxxxxxxxxxx> writes:
>>>>>> "Sergei" == Sergei Golubchik <serg@xxxxxxxxxxxx> writes:
> Sergei> please create a macro extension_set(), and rewrite
> Sergei> extension_set_string() to use extension_set(). Something like
>
> Sergei> #define extension_set(OPTS, X, VAL) \
> Sergei> if (!(OPTS)->extension) \
> Sergei> (OPTS)->extension= (struct st_mysql_options_extention *) \
> Sergei> my_malloc(sizeof(struct st_mysql_options_extention), \
> Sergei> MYF(MY_WME | MY_ZEROFILL)); \
> Sergei> (OPTS)->extension->X= VAL;
>
> Sergei> #define extension_set_string(OPTS, X, STR) \
> Sergei> if ((OPTS)->extension) \
> Sergei> my_free((OPTS)->extension->X, MYF(MY_ALLOW_ZERO_PTR)); \
> Sergei> extension_set(OPTS, X, my_strdup((STR), MYF(MY_WME)));
>
> Didn't think it was needed for only one case. If there is a single
> more case than sure.
I will need this for MWL#192 I think (to remember the state when returning in
the middle of a non-blocking call waiting for more data on socket).
- Kristian.
References