From: Jorgen Loland Date: February 23 2011 3:04pm Subject: Re: bzr commit into mysql-trunk branch (tor.didriksen:3705) Bug#11792200 List-Archive: http://lists.mysql.com/commits/131955 Message-Id: <4D6521F2.1070904@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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(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