Posts

Showing posts from May, 2021

ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.

In this article I want to share my investigation, where I face this issue in GCP (why specially mention, you will know at the end), and hope that it might save someone's else time. The MySQL GCP version is:  5.7.33-google-log . mysql> ALTER TABLE t_user CHANGE COLUMN UserPassword UserPassword varchar(255) NOT null, ALGORITHM=INPLACE, LOCK=NONE; ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.   mysql> ALTER TABLE t_user CHANGE COLUMN UserPassword UserPassword varchar(70) NOT null, ALGORITHM=INPLACE, LOCK=NONE; Query OK, 0 rows affected (0.01 sec) Records: 0  Duplicates: 0  Warnings: 0 In MySQL, utf8 corresponds to 3 byte length per character, hence according to MySQL utf8 will change byte length around 85 characters. According to documentation: Extending VARCHAR column size ALT...

Why it is important that transaction do not commit on failed master in a MySQL HA cluster

Image
In this article we will look into a very important concept of distributed computing and that is we need to prevent happening of transaction on failed master in a HA cluster of MySQL, being other nodes has elected a new master (earlier slave) due to Network partitioning. Here we will assume the setup of HA cluster as follows: Client/s first connect to Service Discovery module to know the current Master , they cache the information for a specific interval. They then talk to the Master to proceed their transaction/s. The transaction are then replicated to connected replicas. The client who has the Master information will cache it and do not change it until told to do so. We will tell you, what will happen if we allow transactions on a failed master, using a real world use case, and so you will know why it is important to prevent it. The setup is as follows:  3 Clients. 1 Service Discovery Module. 3 MySQL server, 1 Master/Primary and 2 Replicas/Secondary. Please see the diagram repr...
Back To Top