Changeset: d7fe1e26deec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d7fe1e26deec
Added Files:
        MonetDB5/mal/mal_debugger.h
Modified Files:
        sql/server/sql_mvc.c
Branch: gdk-tracer
Log Message:

Changed component in sql_mvc.c and removed an unused define


diffs (125 lines):

diff --git a/MonetDB5/mal/mal_debugger.h b/MonetDB5/mal/mal_debugger.h
new file mode 100644
--- /dev/null
+++ b/MonetDB5/mal/mal_debugger.h
@@ -0,0 +1,24 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+ */
+
+#ifndef _MAL_DEBUGGER_H
+#define _MAL_DEBUGGER_H
+
+#include "mal.h"
+#include "mal_scenario.h"
+#include "mal_client.h"
+
+#define MAXBREAKS 32
+
+mal_export void mdbDump(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
+mal_export void printStack(stream *f, MalBlkPtr mb, MalStkPtr s);
+
+mal_export void mdbSetBreakRequest(Client cntxt, MalBlkPtr mb, str request, 
char cmd);
+mal_export str runMALDebugger(Client cntxt, MalBlkPtr mb);
+
+#endif /* _MAL_DEBUGGER_h */
diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -109,25 +109,25 @@ mvc_init(int debug, store_type store, in
        DEBUG(SQL_MVC, "Initialization\n");
        keyword_init();
        if(scanner_init_keywords() != 0) {
-               CRITICAL(ALL, "Malloc failure\n");
+               CRITICAL(SQL_MVC, "Malloc failure\n");
                return -1;
        }
 
        if ((first = store_init(debug, store, ro, su, stk)) < 0) {
-               CRITICAL(ALL, "Unable to create system tables\n");
+               CRITICAL(SQL_MVC, "Unable to create system tables\n");
                return -1;
        }
 
        m = mvc_create(0, stk, 0, NULL, NULL);
        if (!m) {
-               CRITICAL(ALL, "Malloc failure\n");
+               CRITICAL(SQL_MVC, "Malloc failure\n");
                return -1;
        }
 
        m->sa = sa_create();
        if (!m->sa) {
                mvc_destroy(m);
-               CRITICAL(ALL, "Malloc failure\n");
+               CRITICAL(SQL_MVC, "Malloc failure\n");
                return -1;
        }
 
@@ -139,7 +139,7 @@ mvc_init(int debug, store_type store, in
        if (first || catalog_version) {
                if (mvc_trans(m) < 0) {
                        mvc_destroy(m);
-                       CRITICAL(ALL, "Failed to start transaction\n");
+                       CRITICAL(SQL_MVC, "Failed to start transaction\n");
                        return -1;
                }
 
@@ -155,7 +155,7 @@ mvc_init(int debug, store_type store, in
                t = mvc_init_create_view(m, s, "tables", "SELECT \"id\", 
\"name\", \"schema_id\", \"query\", CAST(CASE WHEN \"system\" THEN \"type\" + 
10 /* system table/view */ ELSE (CASE WHEN \"commit_action\" = 0 THEN \"type\" 
/* table/view */ ELSE \"type\" + 20 /* global temp table */ END) END AS 
SMALLINT) AS \"type\", \"system\", \"commit_action\", \"access\", CASE WHEN 
(NOT \"system\" AND \"commit_action\" > 0) THEN 1 ELSE 0 END AS \"temporary\" 
FROM \"sys\".\"_tables\" WHERE \"type\" <> 2 UNION ALL SELECT \"id\", \"name\", 
\"schema_id\", \"query\", CAST(\"type\" + 30 /* local temp table */ AS 
SMALLINT) AS \"type\", \"system\", \"commit_action\", \"access\", 1 AS 
\"temporary\" FROM \"tmp\".\"_tables\";");
                if (!t) {
                        mvc_destroy(m);
-                       CRITICAL(ALL, "Failed to create 'tables' view\n");
+                       CRITICAL(SQL_MVC, "Failed to create 'tables' view\n");
                        return -1;
                }
 
@@ -191,7 +191,7 @@ mvc_init(int debug, store_type store, in
                t = mvc_init_create_view(m, s, "columns", "SELECT * FROM 
(SELECT p.* FROM \"sys\".\"_columns\" AS p UNION ALL SELECT t.* FROM 
\"tmp\".\"_columns\" AS t) AS columns;");
                if (!t) {
                        mvc_destroy(m);
-                       CRITICAL(ALL, "Failed to create 'columns' view\n");
+                       CRITICAL(SQL_MVC, "Failed to create 'columns' view\n");
                        return -1;
                }
                ncid = t->base.id;
@@ -232,7 +232,7 @@ mvc_init(int debug, store_type store, in
                assert(m->session->schema != NULL);
 
                if ((msg = mvc_commit(m, 0, NULL, false)) != MAL_SUCCEED) {
-                       CRITICAL(ALL, "Unable to commit system tables: %s\n", 
(msg + 6));
+                       CRITICAL(SQL_MVC, "Unable to commit system tables: 
%s\n", (msg + 6));
                        freeException(msg);
                        return -1;
                }
@@ -240,7 +240,7 @@ mvc_init(int debug, store_type store, in
 
        if(mvc_trans(m) < 0) {
                mvc_destroy(m);
-               CRITICAL(ALL, "Failed to start transaction\n");
+               CRITICAL(SQL_MVC, "Failed to start transaction\n");
                return -1;
        }
 
@@ -253,7 +253,7 @@ mvc_init(int debug, store_type store, in
                                if(isPartitionedByColumnTable(tt) || 
isPartitionedByExpressionTable(tt)) {
                                        char *err;
                                        if((err = initialize_sql_parts(m, tt)) 
!= NULL) {
-                                               CRITICAL(ALL, "Unable to start 
partitioned table: %s.%s: %s\n", ss->base.name, tt->base.name, err);
+                                               CRITICAL(SQL_MVC, "Unable to 
start partitioned table: %s.%s: %s\n", ss->base.name, tt->base.name, err);
                                                freeException(err);
                                                return -1;
                                        }
@@ -263,7 +263,7 @@ mvc_init(int debug, store_type store, in
        }
 
        if ((msg = mvc_commit(m, 0, NULL, false)) != MAL_SUCCEED) {
-               CRITICAL(ALL, "Unable to commit system tables: %s\n", (msg + 
6));
+               CRITICAL(SQL_MVC, "Unable to commit system tables: %s\n", (msg 
+ 6));
                freeException(msg);
                return -1;
        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to