Changeset: 5797874334a3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5797874334a3
Modified Files:
        MacOSX/post-install.sh
        clients/python2/monetdb/mapi.py
        clients/python3/monetdb/mapi.py
        monetdb5/modules/atoms/mtime.c
        sql/storage/bat/bat_storage.c
Branch: Jun2016
Log Message:

merge


diffs (124 lines):

diff --git a/MacOSX/post-install.sh b/MacOSX/post-install.sh
--- a/MacOSX/post-install.sh
+++ b/MacOSX/post-install.sh
@@ -2,6 +2,14 @@
 
 monetdb_path=/usr/local/monetdb/bin
 
-if [[ ":$PATH:" != *":$monetdb_path:"* ]]; then
-    printf '\n# Set MonetDB path\nexport PATH=$PATH:'$monetdb_path'\n' >> 
~/.profile
-fi
+case $PATH in
+*:$monetdb_path|*:$monetdb_path:*|$monetdb_path:*)
+    ;;
+*)
+    cat >> ~/.profile <<EOF
+
+# Set MonetDB path
+export PATH=\$PATH:$monetdb_path
+EOF
+    ;;
+esac
diff --git a/clients/python2/monetdb/mapi.py b/clients/python2/monetdb/mapi.py
--- a/clients/python2/monetdb/mapi.py
+++ b/clients/python2/monetdb/mapi.py
@@ -142,8 +142,9 @@ class Connection(object):
                 logger.info("redirect to monetdb://%s:%s/%s" %
                             (self.hostname, self.port, self.database))
                 self.socket.close()
-                self.connect(self.hostname, self.port, self.username,
-                             self.password, self.database, self.language)
+                self.connect(hostname=self.hostname, port=self.port,
+                             username=self.username, password=self.password,
+                             database=self.database, language=self.language)
 
             else:
                 raise ProgrammingError("unknown redirect: %s" % prompt)
diff --git a/clients/python3/monetdb/mapi.py b/clients/python3/monetdb/mapi.py
--- a/clients/python3/monetdb/mapi.py
+++ b/clients/python3/monetdb/mapi.py
@@ -143,8 +143,9 @@ class Connection(object):
                 logger.info("redirect to monetdb://%s:%s/%s" %
                             (self.hostname, self.port, self.database))
                 self.socket.close()
-                self.connect(self.hostname, self.port, self.username,
-                             self.password, self.database, self.language)
+                self.connect(hostname=self.hostname, port=self.port,
+                             username=self.username, password=self.password,
+                             database=self.database, language=self.language)
 
             else:
                 raise ProgrammingError("unknown redirect: %s" % prompt)
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -1739,16 +1739,18 @@ gtr_update_table(sql_trans *tr, sql_tabl
        int ok = LOG_OK;
        node *n;
 
+       if (t->base.wtime <= t->base.allocated)
+               return ok;
        gtr_update_dbat(t->data, tchanges);
        for (n = t->columns.set->h; ok == LOG_OK && n; n = n->next) {
                int changes = 0;
                sql_column *c = n->data;
 
-               if (!c->base.wtime) 
+               if (!c->base.wtime || c->base.wtime <= c->base.allocated) 
                        continue;
                ok = gtr_update_delta(tr, c->data, &changes);
                if (changes)
-                       c->base.wtime = tr->wstime;
+                       c->base.allocated = c->base.wtime = tr->wstime;
                (*tchanges) |= changes;
        }
        if (ok == LOG_OK && t->idxs.set) {
@@ -1757,17 +1759,17 @@ gtr_update_table(sql_trans *tr, sql_tabl
                        sql_idx *ci = n->data;
 
                        /* some indices have no bats */
-                       if (!ci->base.wtime)
+                       if (!ci->base.wtime || ci->base.wtime <= 
ci->base.allocated) 
                                continue;
 
                        ok = gtr_update_delta(tr, ci->data, &changes);
                        if (changes)
-                               ci->base.wtime = tr->wstime;
+                               ci->base.allocated = ci->base.wtime = 
tr->wstime;
                        (*tchanges) |= changes;
                }
        }
        if (*tchanges)
-               t->base.wtime = tr->wstime;
+               t->base.allocated = t->base.wtime = tr->wstime;
        return ok;
 }
 
@@ -1783,6 +1785,11 @@ static int
                int schanges = 0;
                sql_schema *s = sn->data;
                
+               if (s->base.wtime <= s->base.allocated && 
+                       gtr_update_table_f == gtr_update_table)
+                       continue;
+               if (!s->base.wtime)
+                       continue;
                if (!isTempSchema(s) && s->tables.set) {
                        node *n;
                        for (n = s->tables.set->h; n && ok == LOG_OK; n = 
n->next) {
@@ -1794,12 +1801,12 @@ static int
                                schanges |= changes;
                        }
                }
-               if (schanges){
-                       s->base.wtime = tr->wstime;
+               if (schanges && gtr_update_table_f == gtr_update_table){
+                       s->base.allocated = s->base.wtime = tr->wstime;
                        tchanges ++;
                }
        }
-       if (tchanges)
+       if (tchanges && gtr_update_table_f == gtr_update_table)
                tr->wtime = tr->wstime;
        return LOG_OK;
 }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to