Changeset: 63c6ab3a5ba2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63c6ab3a5ba2
Modified Files:
        monetdb5/modules/mal/wlcr.c
        monetdb5/optimizer/opt_wlcr.c
Branch: wlcr
Log Message:

Avoid temporary tables to be passed to the replica


diffs (43 lines):

diff --git a/monetdb5/modules/mal/wlcr.c b/monetdb5/modules/mal/wlcr.c
--- a/monetdb5/modules/mal/wlcr.c
+++ b/monetdb5/modules/mal/wlcr.c
@@ -133,6 +133,7 @@
  *
  * [TODO] consider the roll forward of SQL session variables, i.e. 
optimizer_pipe (for now assume default pipe).
  * For updates we don't need special care for this.
+ * [TODO] limit replication logs to persistent tables. Temporary tables should 
never be forwarded to the clone.
  */
 #include "monetdb_config.h"
 #include <time.h>
diff --git a/monetdb5/optimizer/opt_wlcr.c b/monetdb5/optimizer/opt_wlcr.c
--- a/monetdb5/optimizer/opt_wlcr.c
+++ b/monetdb5/optimizer/opt_wlcr.c
@@ -69,12 +69,14 @@ OPTwlcrImplementation(Client cntxt, MalB
                        updates++;
                } else
                /* the catalog operations all need to be re-executed */
-               if( getModuleId(p) == sqlcatalogRef){
+               if( getModuleId(p) == sqlcatalogRef &&
+                       strcmp( getVarConstant(mb,getArg(p,1)).val.sval, "tmp") 
!= 0 ){
                        assert( def);// should always be there
                        setFunctionId(def,catalogRef);
                        updates++;
                } else
-               if( getModuleId(p) == sqlRef && getFunctionId(p) == 
clear_tableRef ){
+               if( getModuleId(p) == sqlRef && getFunctionId(p) == 
clear_tableRef &&
+                       strcmp( getVarConstant(mb,getArg(p,1)).val.sval, "tmp") 
!= 0 ){
                        setFunctionId(def,changeRef);
                                assert(def);
                                q= copyInstruction(p);
@@ -88,8 +90,9 @@ OPTwlcrImplementation(Client cntxt, MalB
                        ( getFunctionId(p) == appendRef  ||
                          getFunctionId(p) == updateRef  ||
                          getFunctionId(p) == deleteRef  ||
-                         getFunctionId(p) == clear_tableRef )){
-                               assert( def);// should always be there
+                         getFunctionId(p) == clear_tableRef ) &&
+                         strcmp( getVarConstant(mb,getArg(p,2)).val.sval, 
"tmp") != 0 ){
+                               assert( def);// should always be there, 
temporary tables are always ignored
                                setFunctionId(def,changeRef);
                                q= copyInstruction(p);
                                delArgument(q, q->retc);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to