List:Commits« Previous MessageNext Message »
From:Antony T Curtis Date:January 25 2008 11:36pm
Subject:Re: bk commit into 5.1 tree (acurtis:1.2655) BUG#33358
View as plain text  
On 25 Jan, 2008, at 08:00, Sergei Golubchik wrote:

> Hi!
>
> On Jan 23, Antony T Curtis wrote:
>
>>>> diff -Nrup a/mysql-test/t/plugin_bug33358-master.opt b/mysql-test/ 
>>>> t/plugin_bug33358-master.opt
>>>> --- /dev/null	Wed Dec 31 16:00:00 196900
>>>> +++ b/mysql-test/t/plugin_bug33358-master.opt	2008-01-21 12:01:15
>>>> -08:00
>>>> @@ -0,0 +1,3 @@
>>>> +$EXAMPLE_PLUGIN_OPT
>>>> +--plugin-load=EXAMPLE=ha_example.so::
>>>> +--plugin-example-enum-var=e2
>>>> diff -Nrup a/mysql-test/t/plugin_bug33358.test b/mysql-test/t/
>>>> plugin_bug33358.test
>>>> --- /dev/null	Wed Dec 31 16:00:00 196900
>>>> +++ b/mysql-test/t/plugin_bug33358.test	2008-01-21 12:01:15 -08:00
>>>> @@ -0,0 +1,3 @@
>>>> +--source include/have_example_plugin.inc
>>>> +
>>>> +SELECT @@global.example_enum_var = 'e2';
>>>
>>> perhaps you could add this test to an existing test file that  
>>> already
>>> requires ha_example.so ? One restart less for the test suite...
>>
>> Choices are limited and doing this would alter results from other
>> tests... I suppose I can just ass it to existing plugin test and  
>> fixup
>> changed results accordingly.
>
> Good idea, please do it.
> Ok to push with this change.
>

The existing plugin test dynamically loads the example storage engine  
at run time and currently there is no way to specify startup  
parameters except from the command line.

Regards,
Antony


>>>> sql_print_error("Couldn't load plugin named '%s' with soname  
>>>> '%s'.",
>>>>                 name.str, dl.str);
>>>> DBUG_RETURN(TRUE);
>>>> @@ -3017,7 +3030,22 @@ static int construct_options(MEM_ROOT *m
>>>>     optnamelen= namelen + optnamelen + 1;
>>>>   }
>>>>   else
>>>> -      optname= (char*) memdup_root(mem_root, v->key + 1,  
>>>> (optnamelen= v->name_len) + 1);
>>>> +    {
>>>> +      if (!(v= find_bookmark(name, opt->name, opt->flags)))
>>>> +      {
>>>> +        sql_print_error("Thread local variable '%s' not  
>>>> allocated "
>>>> +                        "in plugin '%s'.", opt->name,  
>>>> plugin_name);
>>>
>>> why could that happen ?
>>
>> This is a very unlikely event and would only occur if for some reason
>> register_var failed to insert into the hash. Would it be preferred if
>> I remove the 'if' and simply put an assert?
>
> No, it's ok with sql_print_error().
>
>>>> +    	DBUG_RETURN(-1);
>>>> +      }
>>>> +
>>>> +      *(int*)(opt + 1)= offset= v->offset;
>>>> +
>>>> +      if (opt->flags & PLUGIN_VAR_NOCMDOPT)
>>>> +        continue;
>>>> +
>>>> +      optname= (char*) memdup_root(mem_root, v->key + 1,
>>>> +                                   (optnamelen= v->name_len) + 1);
>>>> +    }
>>>>
>>>>   /* convert '_' to '-' */
>>>>   for (p= optname; *p; p++)
>>>
> 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

Thread
bk commit into 5.1 tree (acurtis:1.2655) BUG#33358antony21 Jan
  • Re: bk commit into 5.1 tree (acurtis:1.2655) BUG#33358Sergei Golubchik22 Jan
    • Re: bk commit into 5.1 tree (acurtis:1.2655) BUG#33358Antony T Curtis23 Jan
      • Re: bk commit into 5.1 tree (acurtis:1.2655) BUG#33358Sergei Golubchik25 Jan
        • Re: bk commit into 5.1 tree (acurtis:1.2655) BUG#33358Antony T Curtis25 Jan