List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:August 18 2010 2:23pm
Subject:Re: bzr commit into mysql-5.5-bugfixing branch (jon.hauglid:3113)
Bug#56085
View as plain text  
Hello Jon Olav!

* Jon Olav Hauglid <jon.hauglid@stripped> [10/08/18 17:18]:
> #At file:///export/home/x/mysql-5.5-runtime-bug56085/ based on
> revid:jon.hauglid@stripped
> 
>  3113 Jon Olav Hauglid	2010-08-18
>       Bug #56085 Embedded server tests fails with assert in
>                  check_if_table_exists()

...

> === modified file 'sql/sql_plugin.cc'
> --- a/sql/sql_plugin.cc	2010-08-05 12:34:19 +0000
> +++ b/sql/sql_plugin.cc	2010-08-18 13:11:30 +0000
> @@ -1382,6 +1382,60 @@ static bool register_builtin(struct st_m
>  }
>  
>  
> +#ifdef EMBEDDED_LIBRARY
> +/**
> +  This internal handler is used to trap ER_NO_SUCH_TABLE.
> +  During loading of plugins using an embedded library,
> +  we wish to ignore ER_NO_SUCH_TABLE when opening mysql.plugin.
> +*/
> +class Plugin_load_error_handler : public Internal_error_handler
> +{
> +public:
> +  Plugin_load_error_handler()
> +    : m_no_such_table(FALSE)
> +  {}
> +
> +  virtual ~Plugin_load_error_handler() {}
> +
> +  virtual bool handle_condition(THD *thd,
> +                                uint sql_errno,
> +                                const char* sqlstate,
> +                                MYSQL_ERROR::enum_warning_level level,
> +                                const char* msg,
> +                                MYSQL_ERROR ** cond_hdl);
> +
> +  bool no_such_table();
> +
> +private:
> +  bool m_no_such_table;
> +};

IMO, it is better to reuse existing Prelock_error_handler class in
this case. Of course, the latter should be renamed appropriately
(AFAIK Alik has used  "No_such_table_error_handler" in one of his
recent patches) and made available outside of sql_base.cc by moving
its definition to sql_base.h.

-- 
Dmitry Lenev, Software Developer
Oracle Development SPB/MySQL, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification
Thread
bzr commit into mysql-5.5-bugfixing branch (jon.hauglid:3113) Bug#56085Jon Olav Hauglid18 Aug
  • Re: bzr commit into mysql-5.5-bugfixing branch (jon.hauglid:3113)Bug#56085Dmitry Lenev18 Aug