MySQL 9.0 Reference Manual Including MySQL NDB Cluster 9.0

19.5.1.18 Replication and JavaScript Stored Programs

MySQL Replication is comppatible with JavaScript stored programs, provided that the MLE component is installed on every server in the topology, due to the following issues:

This means that, when a CREATE FUNCTION or CREATE PROCEDURE statement which contains invalid JavaScript code is executed on a server without the MLE component installed, the statement always succeeds, and thus is replicated. If the replica which has the MLE component installed, an error is raised when the replica attempts to execute it, leading to a break in replication.

For installing (or uninstalling) the MLE component on MySQL servers used in replication, it recommended that you stop replication, install (or uninstall) the component on every server in the topology, and only then allow replication to resume. Replicating between servers in a mixed setting (that is, in which some servers have the MLE component installed and some do not) is not supported for the reasons stated in the previous paragraph.

For more information about JavaScript stored programs in MySQL, see Section 27.3, “JavaScript Stored Programs”. For information about the MLE component, see Section 7.5.6, “Multilingual Engine Component (MLE)”.