- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How are actions that take place inside stored procedure and functions replicated?
Actually standard actions carried out in stored procedures and functions are replicated from a master MySQL server to a slave MySQL server. Even the creation of stored procedures and functions carried out through normal DDL statements on a master MySQL server are replicated to a slave MySQL server. In this way, objects will exist on both the servers.
The actions that take place inside the stored procedure and functions are replicated because MySQL records each DDL event that occurs inside stored procedures and functions. After recording the events it is replicated to the slave MySQL server. But the actual calls made to execute stored procedures are not replicated. Following is an example in which the procedure CALL will not replicate because it is actually one on the master MySQL server.
Example
mysql> Delimiter // mysql> CREATE PROCEDURE myproc() -> BEGIN -> DELETE FROM mytable LIMIT 1; -> END //
Now when we call this procedure on master MySQL server then it will not replicate.
mysql> Delimiter ; mysql> CALL myproc();
- Related Articles
- How can a MySQL stored procedure call another MySQL stored procedure inside it?
- What are the limitations for replicating stored procedure and functions?
- Calling Stored Procedure inside foreach PHP Codeigniter
- How can we perform START transactions inside MySQL stored procedure?
- How can we perform COMMIT transactions inside MySQL stored procedure?
- How can we handle a result set inside MySQL stored procedure?
- How can we perform ROLLBACK transactions inside a MySQL stored procedure?
- Implement Dynamic SQL query inside a MySQL stored procedure?
- Create a table inside a MySQL stored procedure and insert a record on calling the procedure
- What do you mean by Scope of variables inside MySQL stored procedure?
- What is stored procedure and how can we create MySQL stored procedures?
- What are MySQL stored functions and how can we create them?
- How are involuntary actions and reflex actions different from each other?
- How to create MongoDB stored procedure?
- What is STORED PROCEDURE in a DB2? How will you create a new stored procedure?
