← Back to team overview

maria-developers team mailing list archive

Re: MDEV-225: Replace with dummy events an event that is not understood by a slave to which it should be sent


Michael Widenius <monty@xxxxxxxxxxxx> writes:

> Kristian> And STRING_WITH_LEN(...) expands to two expressions with a comma between them
> Kristian> UUU, VVV - so I also cannot put DBUG_EVALUATE_IF() around STRING_WITH_LEN().
> Kristian> I rewrote it to use strlen() instead of STRING_WITH_LEN - this code is not
> Kristian> performance critical:
> I prefer to get rid of strlen() at all.
> Jani has a long going task to go trough the server and remove all
> strlen() adding a strlen() will cause more work for him sooner or
> later...

This is the code:

    const char *q=
                       "SET @mariadb_slave_capability="
                       "SET @mariadb_slave_capability="
    if (mysql_real_query(mysql, q, strlen(q)))

So what do you suggest? Go back to the original code that Serg did not like?

    int rc= DBUG_EVALUATE_IF("simulate_slave_capability_old_53",
        mysql_real_query(mysql, STRING_WITH_LEN("SET @mariadb_slave_capability="
        mysql_real_query(mysql, STRING_WITH_LEN("SET @mariadb_slave_capability="
    if (rc)

Or do you have a better idea?

 - Kristian.

Follow ups