You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our automation, we inspect statements and detect which engine to execute them with. For example, a CREATE TABLE or a DROP TABLE are applied directly, but an ALTER TABLE goes to the spirit engine.
The problem with this is, what do you do with a CREATE INDEX statement? Well, we've decided to rewrite it to an ALTER TABLE (which is possible via the TiDB parser..)
But an alternative view of the layering here is that Spirit should do this detection and be able to execute all statements. This would allow us to maintain less logic in our internal systems, since no doubt others have the same use-case and can help maintain it.
Thus, I propose adding a new command line option for --statement which is mutually exclusive to --table and --alter. We inherited --alter from gh-ost, but in future I think it's reasonable that we can default to and promote --statement instead.
The text was updated successfully, but these errors were encountered:
In our automation, we inspect statements and detect which engine to execute them with. For example, a
CREATE TABLE
or aDROP TABLE
are applied directly, but anALTER TABLE
goes to the spirit engine.The problem with this is, what do you do with a
CREATE INDEX
statement? Well, we've decided to rewrite it to anALTER TABLE
(which is possible via the TiDB parser..)But an alternative view of the layering here is that Spirit should do this detection and be able to execute all statements. This would allow us to maintain less logic in our internal systems, since no doubt others have the same use-case and can help maintain it.
Thus, I propose adding a new command line option for
--statement
which is mutually exclusive to--table
and--alter
. We inherited--alter
from gh-ost, but in future I think it's reasonable that we can default to and promote--statement
instead.The text was updated successfully, but these errors were encountered: