List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:March 19 2008 6:06pm
Subject:Re: bk commit into 5.1 tree (svoj:1.2569) BUG#34790
View as plain text  
Hi Sergey,

Ok to push, but I have wishes regarding testing.

Sergey Vojtovich, 19.03.2008 13:54:
...
> ChangeSet@stripped, 2008-03-19 16:54:14+04:00, svoj@stripped +1 -0
>   BUG#34790 - 'create server' doesn't handle out of memory scenario
>               well enough
>   
>   CREATE SERVER may cause server crash if there is not enough memory
>   to execute this operation.
>   
>   Fixed that create_server() and prepare_server_struct_for_insert()
>   didn't check return value of functions that allocate memory.
>   
>   As this is out of memory issue fix, not test case available.

How did you test it? Did Shanes test not work for you? Can't we add it
as a big-test? --key_buffer_size can be replaced by SET key_buffer_size
to avoid an .opt file.

...
>    NOTES
> +    As FOREIGN_SERVER members are allocated on mem_root, we do not need to
> +    free them in case of error.

True. But the use of one mem_root for all servers worries me. When
servers are created, dropped altered, and so on, the memory fills with
obsolete data. Not a problem in the test suite, but perhaps in long
running servers.

...
> +  if (!(server= (FOREIGN_SERVER *)alloc_root(&mem, sizeof(FOREIGN_SERVER))))
> +    DBUG_RETURN(NULL);
> +

Hm. Since you don't have a test in the normal test suite for it, I
wonder why you don't need a purecov comment here and at the other
DBUG_RETURNs? Under which circumstances are the DBUG_RETURNs executed
(particularly all of them)?

...

Regards
Ingo
-- 
Ingo Strüwing, Senior 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 (svoj:1.2569) BUG#34790Sergey Vojtovich19 Mar
  • Re: bk commit into 5.1 tree (svoj:1.2569) BUG#34790Ingo Strüwing19 Mar
Re: bk commit into 5.1 tree (svoj:1.2569) BUG#34790Ingo Strüwing19 Mar