Update of /cvsroot/monetdb/sql/src/sql
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5288

Modified Files:
        replicas.sql 
Log Message:
Make the interface such that the master keeps relevant persistent
information. 


U replicas.sql
Index: replicas.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/sql/replicas.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- replicas.sql        4 Sep 2009 19:13:08 -0000       1.2
+++ replicas.sql        4 Sep 2009 20:37:12 -0000       1.3
@@ -15,15 +15,25 @@
 -- All Rights Reserved.
 
 
--- The replicator information is stored in the table 'replicas'
+-- The master contains a builtin table whose content is updated each
+-- time a slave initiates a session, starts processing a logfile
+-- and leaves the scene.
 
-create table sys.replicas(id int, stamp timestamp);
+CREATE FUNCTION slaves()
+RETURNS TABLE (
+       uri              varchar(100),
+       last_connect     timestamp,     
+       last_disconnect  timestamp,     -- null when connected
+       last_tag                 bigint,        -- tag associated with log file 
finished
+       tag_delay        bigint,        -- replicationTag - logfile tag in 
processs
+       time_delay       timestamp 
+) EXTERNAL NAME master."slaves";
 
-CREATE TABLE sys.slaves (
-       uri              varchar(100)   NOT NULL,
-       last_connect     timestamp,
-       last_disconnect  timestamp,
-       logfile          varchar(100),
-       tag_delay        bigint,
-       time_delay       timestamp
-);
+-- Each slave contains a table of replication tags successfully executed.
+-- It can synchronise with multiple masters and provides a persistent
+-- store for the master name.
+CREATE TABLE sys.replicas(uri varchar(100) NOT NULL, tag int, stamp timestamp);
+
+-- Controling the synchronisation by the slave
+CREATE PROCEDURE master_start(uri string) EXTERNAL NAME master."start";
+CREATE PROCEDURE master_stop(uri string) EXTERNAL NAME master."stop";


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to