List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:February 23 2011 3:04pm
Subject:Re: bzr commit into mysql-trunk branch (tor.didriksen:3705) Bug#11792200
View as plain text  
Didrik,

Thank you for the fix. Patch approved.

>   inline
>   int my_decimal_set_zero(my_decimal *d)
>   {
> -  decimal_make_zero(((decimal_t*) d));
> +  // We need the up-cast here, since my_decimal has sign() member functions.

Extent comment, something like: ...conflicting with decimal_t::sign

> +  decimal_make_zero(static_cast<decimal_t*>(d));
> === modified file 'unittest/gunit/item-t.cc'
> --- a/unittest/gunit/item-t.cc	2011-02-21 10:36:31 +0000
> +++ b/unittest/gunit/item-t.cc	2011-02-23 08:52:24 +0000
> @@ -24,6 +24,59 @@
>
>   namespace {
>
> +/*
> +  A mock error handler for error_handler_hook.
> +*/
> +uint expected_error= 0;
> +extern "C" void test_error_handler_hook(uint err, const char *str, myf MyFlags)
> +{
> +  EXPECT_EQ(expected_error, err)<<  str;
> +}
> +
> +
> +/**
> +   A mock error handler which registers itself with the THD in the CTOR,
> +   and unregisters in the DTOR. The function handle_condition() will
> +   verify that it is called with the expected error number.
> +   The DTOR will verify that handle_condition() has actually been called.
> +*/
> +class Mock_error_handler : public Internal_error_handler

nice :)

-- 
Jørgen Løland | Senior Software Engineer | +47 73842138
Oracle MySQL
Trondheim, Norway
Thread
bzr commit into mysql-trunk branch (tor.didriksen:3705) Bug#11792200Tor Didriksen23 Feb
  • Re: bzr commit into mysql-trunk branch (tor.didriksen:3705) Bug#11792200Jorgen Loland23 Feb