Changeset: b50eff32fc80 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b50eff32fc80
Modified Files:
        sql/backends/monet5/sql_gencode.c
Branch: linear-hashing
Log Message:

Set error messages at mvc structure


diffs (47 lines):

diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -203,6 +203,7 @@ static int
                }
        }
        if (curBlk->errors) {
+               sql_error(m, 003, SQLSTATE(42000) "Internal error while 
compiling statement: %s", curBlk->errors);
                freeSymbol(curPrg);
                return -1;
        }
@@ -762,8 +763,10 @@ backend_callinline(backend *be, Client c
                }
        }
        c->curprg->def = curBlk;
-       if (curBlk->errors)
+       if (curBlk->errors) {
+               sql_error(m, 003, SQLSTATE(42000) "Internal error while 
compiling statement: %s", curBlk->errors);
                return -1;
+       }
        return 0;
 }
 
@@ -935,8 +938,14 @@ backend_call(backend *be, Client c, cq *
                        }
                }
        }
-       if (!q || mb->errors)
+       if (!q) {
+               sql_error(m, 001, SQLSTATE(HY013) MAL_MALLOC_FAIL);
                return -1;
+       }
+       if (mb->errors) {
+               sql_error(m, 003, SQLSTATE(42000) "Internal error while 
compiling statement: %s", mb->errors);
+               return -1;
+       }
        return 0;
 }
 
@@ -1262,7 +1271,6 @@ backend_create_sql_func(backend *be, sql
                        f->sql--;
                return -1;
        }
-       assert(r);
 
        backup = c->curprg;
        curPrg = c->curprg = newFunction(userRef, putName(f->base.name), 
FUNCTIONsymbol);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to