Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

mysql conditional executing statement

$
0
0

From this post, we can do leader election with MySQL, but I don't know if we can do fencing in MySQL. That is: let MySQL determine if the client is primary master or not. Consider following case: server A, B, C formed a quorum, and A is primary master, at certain moment, A is not primary anymore, but A doesn't know, and issued an insert statement, we need to prevent that.

So I'm wondering if we can change SQL statements into something like:

IF i'm primary master do xxx ENDIF


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>