how about
--gtid_auto_create_engine_list=

default value = innodb,tokudb

(and the stored proc)

/Jonas

On Wed, Mar 8, 2017 at 9:58 AM, Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
Will Fong <will.fong@mariadb.com> writes:

> What about a configuration setting in my.cnf that will do the above magically?
>
> I would prefer not making direct changes to the mysql database.

I agree that this is not ideal.

But do you have a suggestion for how the semantics of such an option should
be? Too much magic is not good either.

For example, if the user does a blackhole engine transaction, do we really
want a blackhole mysql.gtid_slave_pos? Or archive engine, which does not
support deletes?

One thing that could be done is to supply a standard stored procedure to add
an engine table, to avoid direct changes to the mysql database:

  mysql.gtid_pos_add_engine("MyRocks");

This would create the table, and could also check eg. that a table does not
already exist etc. This seems better.

But even better woulf be if most users did not have to do anything to get
the improved performance. Maybe we could just have a hardcoded list of
engines that are suitable for mysql.gtid_slave_pos (eg. innodb, tokudb,
myrocks). And replication will automatically create a suitable
mysql.gtid_slave_pos_XXX if it sees a transaction in one of those engines,
unless --skip-gtid-auto-create-pos-table is set. For more
exotic/experimental engine, the user can manually call
mysql.gtid_pos_add_engine() if desired.

So to summarise

 - Auto create mysql.gtid_slave_pos_{innodb,tokudb,myrocks} if a transaction
   is seen in one of those engines

 - A --skip-gtid-auto-create-pos-table to disable this auto behaviour

 - A stored procedure mysql.gtid_pos_add_engine() to facilitate manually
   adding an engine table.

What do you think, does this sound ok? Suggestions for better ways?

And thanks for commenting, this helped me rethink this part of the design
which I was not very happy with.

 - Kristian.

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp