Changeset: 0598929f9dff for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0598929f9dff
Modified Files:
        sql/backends/monet5/embeddedclient.h
        sql/backends/monet5/mal_backend.c
        sql/backends/monet5/mal_backend.h
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql.h
        sql/backends/monet5/sql.mal
        sql/backends/monet5/sql_aggr_bte.mal
        sql/backends/monet5/sql_aggr_dbl.mal
        sql/backends/monet5/sql_aggr_flt.mal
        sql/backends/monet5/sql_aggr_int.mal
        sql/backends/monet5/sql_aggr_lng.mal
        sql/backends/monet5/sql_aggr_sht.mal
        sql/backends/monet5/sql_aggr_wrd.mal
        sql/backends/monet5/sql_bat2time.c
        sql/backends/monet5/sql_cast.c
        sql/backends/monet5/sql_cast.h
        sql/backends/monet5/sql_cast.sh
        sql/backends/monet5/sql_fround.c
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_inspect.mal
        sql/backends/monet5/sql_octopus.mal
        sql/backends/monet5/sql_optimizer.c
        sql/backends/monet5/sql_optimizer.h
        sql/backends/monet5/sql_rank.mal
        sql/backends/monet5/sql_rdf.c
        sql/backends/monet5/sql_rdf.mal
        sql/backends/monet5/sql_readline.c
        sql/backends/monet5/sql_result.c
        sql/backends/monet5/sql_result.h
        sql/backends/monet5/sql_round.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_scenario.h
        sql/backends/monet5/sql_sort.mal
        sql/backends/monet5/sql_statement.c
        sql/backends/monet5/sql_statement.h
        sql/backends/monet5/sql_statistics.c
        sql/backends/monet5/sql_statistics.h
        sql/backends/monet5/sql_user.c
        sql/backends/monet5/sql_user.h
Branch: default
Log Message:

Ran through indent, fixed licenses.


diffs (truncated from 32609 to 300 lines):

diff --git a/sql/backends/monet5/embeddedclient.h 
b/sql/backends/monet5/embeddedclient.h
--- a/sql/backends/monet5/embeddedclient.h
+++ b/sql/backends/monet5/embeddedclient.h
@@ -1,3 +1,22 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
 #ifndef _EMBEDDEDCLIENT_H_
 #define _EMBEDDEDCLIENT_H_
 
diff --git a/sql/backends/monet5/mal_backend.c 
b/sql/backends/monet5/mal_backend.c
--- a/sql/backends/monet5/mal_backend.c
+++ b/sql/backends/monet5/mal_backend.c
@@ -1,3 +1,21 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
 
 #include "monetdb_config.h"
 #include "sql.h"
diff --git a/sql/backends/monet5/mal_backend.h 
b/sql/backends/monet5/mal_backend.h
--- a/sql/backends/monet5/mal_backend.h
+++ b/sql/backends/monet5/mal_backend.h
@@ -1,3 +1,22 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
 #ifndef MAL_BACKEND_H
 #define MAL_BACKEND_H
 
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -3,19 +3,19 @@
  * Version 1.1 (the "License"); you may not use this file except in
  * compliance with the License. You may obtain a copy of the License at
  * http://www.monetdb.org/Legal/MonetDBLicense
- * 
+ *
  * Software distributed under the License is distributed on an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific language governing rights and limitations
  * under the License.
- * 
+ *
  * The Original Code is the MonetDB Database System.
- * 
+ *
  * The Initial Developer of the Original Code is CWI.
  * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
  * Copyright August 2008-2013 MonetDB B.V.
  * All Rights Reserved.
-*/
+ */
 
 /*
  * authors M Kersten, N Nes
@@ -50,7 +50,7 @@
 #include "mal_instruction.h"
 
 static int
-rel_is_table( sql_rel *rel )
+rel_is_table(sql_rel *rel)
 {
        if (!rel || is_base(rel->op))
                return 1;
@@ -58,21 +58,21 @@ rel_is_table( sql_rel *rel )
 }
 
 static int
-exp_is_point_select( sql_exp * e) 
+exp_is_point_select(sql_exp *e)
 {
        if (!e)
                return 1;
-       if (e->type == e_cmp && !e->f && e->flag == (int)cmp_equal) {
+       if (e->type == e_cmp && !e->f && e->flag == (int) cmp_equal) {
                sql_exp *r = e->r;
 
-               if (r->card <= CARD_AGGR) 
+               if (r->card <= CARD_AGGR)
                        return 1;
        }
        return 0;
 }
 
 static int
-rel_is_point_query( sql_rel *rel)
+rel_is_point_query(sql_rel *rel)
 {
        int is_point = 0;
 
@@ -99,7 +99,7 @@ rel_is_point_query( sql_rel *rel)
 }
 
 static int
-rel_need_distinct_query( sql_rel *rel)
+rel_need_distinct_query(sql_rel *rel)
 {
        int need_distinct = 0;
 
@@ -107,31 +107,31 @@ rel_need_distinct_query( sql_rel *rel)
                rel = rel->l;
        if (!need_distinct && rel && is_groupby(rel->op) && rel->exps) {
                node *n, *m;
-               for (n=rel->exps->h; n && !need_distinct; n = n->next) {
+               for (n = rel->exps->h; n && !need_distinct; n = n->next) {
                        sql_exp *e = n->data;
                        if (e->type == e_aggr) {
                                list *l = e->l;
 
-                               if (l) for(m = l->h; m && !need_distinct; m = 
m->next){
-                                       sql_exp *a = m->data;
-       
-                                       if (need_distinct(a))
-                                               need_distinct = 1;
-                               }
+                               if (l)
+                                       for (m = l->h; m && !need_distinct; m = 
m->next) {
+                                               sql_exp *a = m->data;
+
+                                               if (need_distinct(a))
+                                                       need_distinct = 1;
+                                       }
                        }
                }
        }
        return need_distinct;
 }
 
-
 sql_rel *
 sql_symbol2relation(mvc *c, symbol *sym)
 {
        sql_rel *r;
 
        r = rel_semantic(c, sym);
-       if (!r) 
+       if (!r)
                return NULL;
        if (r) {
                r = rel_optimizer(c, r);
@@ -184,11 +184,11 @@ sqlcleanup(mvc *c, int err)
        }
        /* some statements dynamically disable caching */
        c->sym = NULL;
-       if (c->sa) 
+       if (c->sa)
                c->sa = sa_reset(c->sa);
-       if (err > 0)
+       if (err >0)
                c->session->status = -err;
-       if (err < 0)
+       if (err <0)
                c->session->status = err;
        c->label = 0;
        c->point_query = 0;
@@ -217,7 +217,7 @@ checkSQLContext(Client cntxt)
        return MAL_SUCCEED;
 }
 
-str 
+str
 getSQLContext(Client cntxt, MalBlkPtr mb, mvc **c, backend **b)
 {
        backend *be;
@@ -230,7 +230,7 @@ getSQLContext(Client cntxt, MalBlkPtr mb
        be = (backend *) cntxt->sqlcontext;
        if (be->mvc == NULL)
                throw(SQL, "mvc", "SQL module not initialized, mvc struct 
missing");
-       if (c) 
+       if (c)
                *c = be->mvc;
        if (b)
                *b = be;
@@ -242,7 +242,7 @@ SQLmvc(Client cntxt, MalBlkPtr mb, MalSt
 {
        mvc *sql = NULL;
        str msg = getSQLContext(cntxt, mb, &sql, NULL);
-       int *res = (int*) getArgReference(stk, pci, 0);
+       int *res = (int *) getArgReference(stk, pci, 0);
 
        if ((msg = checkSQLContext(cntxt)) != NULL)
                return msg;
@@ -255,9 +255,9 @@ SQLtransaction(Client cntxt, MalBlkPtr m
 {
        mvc *sql = NULL;
        str msg = getSQLContext(cntxt, mb, &sql, NULL);
-       int type = *(int*) getArgReference(stk, pci, 1);
-       int chain = *(int*) getArgReference(stk, pci, 2);
-       str name = *(str*) getArgReference(stk, pci, 3);
+       int type = *(int *) getArgReference(stk, pci, 1);
+       int chain = *(int *) getArgReference(stk, pci, 2);
+       str name = *(str *) getArgReference(stk, pci, 3);
        char buf[BUFSIZ];
        int ret = 0;
 
@@ -268,7 +268,7 @@ SQLtransaction(Client cntxt, MalBlkPtr m
 
        switch (type) {
        case DDL_RELEASE:
-               if (sql->session->auto_commit == 1) 
+               if (sql->session->auto_commit == 1)
                        throw(SQL, "sql.trans", "3BM30!RELEASE SAVEPOINT: not 
allowed in auto commit mode");
                ret = mvc_release(sql, name);
                if (ret < 0) {
@@ -279,18 +279,18 @@ SQLtransaction(Client cntxt, MalBlkPtr m
        case DDL_COMMIT:
                if (sql->session->auto_commit == 1) {
                        if (name)
-                               throw(SQL,"sql.trans", "3BM30!SAVEPOINT: not 
allowed in auto commit mode");
+                               throw(SQL, "sql.trans", "3BM30!SAVEPOINT: not 
allowed in auto commit mode");
                        else
-                               throw(SQL,"sql.trans", "2DM30!COMMIT: not 
allowed in auto commit mode");
+                               throw(SQL, "sql.trans", "2DM30!COMMIT: not 
allowed in auto commit mode");
                }
                ret = mvc_commit(sql, chain, name);
-               if (ret < 0 && !name) 
+               if (ret < 0 && !name)
                        throw(SQL, "sql.trans", "2D000!COMMIT: failed");
                if (ret < 0 && name)
                        throw(SQL, "sql.trans", "3B000!SAVEPOINT: (%s) failed", 
name);
                break;
        case DDL_ROLLBACK:
-               if (sql->session->auto_commit == 1) 
+               if (sql->session->auto_commit == 1)
                        throw(SQL, "sql.trans", "2DM30!ROLLBACK: not allowed in 
auto commit mode");
                RECYCLEdrop(cntxt);
                ret = mvc_rollback(sql, chain, name);
@@ -300,9 +300,9 @@ SQLtransaction(Client cntxt, MalBlkPtr m
                }
                break;
        case DDL_TRANS:
-               if (sql->session->auto_commit == 0) 
+               if (sql->session->auto_commit == 0)
                        throw(SQL, "sql.trans", "25001!START TRANSACTION: 
cannot start a transaction within a transaction");
-               if (sql->session->active){
+               if (sql->session->active) {
                        RECYCLEdrop(cntxt);
                        mvc_rollback(sql, 0, NULL);
                }
@@ -329,10 +329,10 @@ SQLcommit(Client cntxt, MalBlkPtr mb, Ma
        if ((msg = checkSQLContext(cntxt)) != NULL)
                return msg;
 
-       if (sql->session->auto_commit != 0) 
-               throw(SQL,"sql.trans", "2DM30!COMMIT: not allowed in auto 
commit mode");
+       if (sql->session->auto_commit != 0)
+               throw(SQL, "sql.trans", "2DM30!COMMIT: not allowed in auto 
commit mode");
        ret = mvc_commit(sql, 0, 0);
-       if (ret < 0 ) 
+       if (ret < 0)
                throw(SQL, "sql.trans", "2D000!COMMIT: failed");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to