← Back to team overview

maria-developers team mailing list archive

Re: Doubt in bin logging for CREATE VIEW

 

Hi Kristian,

I have not yet tried setting up the replication and writing the tests for
it. I am reading about it.

I will look into setting up the replication and writing test cases for it.
Will get back to you when I have the test results ready.

Thanks,
Sriram


On Thu, Jun 19, 2014 at 2:15 PM, Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx>
wrote:

> sriram patil <spsrirampatil@xxxxxxxxx> writes:
>
> > In case of CREATE VIEW (method: mysql_create_view file: sql/sql_view.cc),
> > while the bin logging is skipped for most of the errors by jumping to
> "err"
> > label, it is not skipped in following code snippet (line number: 616)
> >
> > res= mysql_register_view(thd, view, mode);
>
> > If an error occurs in mysql_register_view, e.g. ER_OUT_OF_RESOURCES,
> > ER_TABLE_EXISTS_ERROR, etc. the query is still logged.
> >
> > Is there a specific reason why it is logged even though an error occurs?
> Or
> > is it a bug?
>
> Looks like a bug to me.
>
> If you want to verify it, you can make a test case in the following way:
>
> 1. Add a DBUG_EXECUTE_IF("simulate_register_view_failure") that causes
> mysql_register_view to return an error.
>
> 2. Create a test case with master-slave replication that sets
> simulate_register_view_failure in @@debug_dbug and attempts to create the
> view
> on the master.
>
> 3. If the bug is as it looks from the code and from your explanation, we
> should see that the view is missing from the master, but present on the
> slave.
>
>  - Kristian.
>

References