we are dropping a column using mysql alter command but admin has set ndb_allow_copying_alter_table=OFF recently and now while running the alter query we are getting below error:
ERROR 1846 (0A000): Implicit copying alter is not supported. Reason:ndb_allow_copying_alter_table=0. Try ALGORITHM=COPY to force the alter.
Has anyone faced this earlier?
2
Answers
I would try using the instant method to see if that works:
Instant Operation
This should look like this:
If you are getting again an error that you should use "ALGORITHM=COPY" instead, please let me know.
config:
ndb_allow_copying_alter_table=OFF
to Confirm that the modified table structure will not be displayedwhen your mysql version > 8.0,you can use
it’s will force modification of table structure,but this operation will modified other mysql machine in the cluster, you must be clear to know what you are doing.
The command can be used to immediately delete table columns without copying the table, without the need for temporary tables, making it faster and more efficient, If the deleted column does not exist on any other related objects such as indexes, constraints, triggers, etc., the ALGORITHM=INSTANT option can be used to perform the immediate deletion. Otherwise, MySQL will fall back to copying the table to perform the deletion operation.
if you want to use coping method to delete this column,you can use other command: