Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 258.8Kb
Man Pages (Zip) - 365.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 Reference Manual  /  ...  /  Replication and JavaScript Stored Programs

19.5.1.18 Replication and JavaScript Stored Programs

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

  • A replica without the component installed accepts CREATE FUNCTION and CREATE PROCEDURE statements containing JavaScript code from the source, but the replica cannot execute the stored programs thus created.

  • A JavaScript stored program created on a server without the component installed is not checked for validity.

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)”.