Changeset: 718f2bb5d468 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=718f2bb5d468
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/server/sql_scan.c
Branch: Nov2019
Log Message:

Merge with Apr2019


diffs (54 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -566,7 +566,6 @@ exp_bin(backend *be, sql_exp *e, stmt *l
        case e_convert: {
                /* if input is type any NULL or column of nulls, change type */
                list *tps = e->r;
-               sql_exp *ll = (sql_exp *) e->l;
                sql_subtype *from = tps->h->data;
                sql_subtype *to = tps->h->next->data;
                stmt *l;
@@ -574,19 +573,11 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                if (from->type->localtype == 0) {
                        l = stmt_atom(be, atom_general(sql->sa, to, NULL));
                } else {
-                       l = exp_bin(be, ll, left, right, grp, ext, cnt, sel);
+                       l = exp_bin(be, e->l, left, right, grp, ext, cnt, sel);
                }
                if (!l)
                        return NULL;
-               /* if attempting to convert between strings, no conversion is 
needed */
-               if (ll->type == e_column && EC_VARCHAR(from->type->eclass) && 
EC_VARCHAR(to->type->eclass)) {
-                       sql_subtype *tpe = tail_type(l);
-                       assert(tpe->type->localtype == TYPE_str);
-                       tpe->digits = MAX(from->digits, to->digits); /* set the 
number of digits as the max between the two */
-                       s = l;
-               } else {
-                       s = stmt_convert(be, l, from, to, sel);
-               }
+               s = stmt_convert(be, l, from, to, sel);
        }       break;
        case e_func: {
                node *en;
diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c
--- a/sql/server/sql_scan.c
+++ b/sql/server/sql_scan.c
@@ -639,7 +639,7 @@ scanner_getc(struct scanner *lc)
        int c, m, n, mask;
 
        if (scanner_read_more(lc, 1) == EOF) {
-               lc->errstr = "end of input stream";
+               lc->errstr = SQLSTATE(42000) "end of input stream";
                return EOF;
        }
        lc->errstr = NULL;
@@ -679,7 +679,7 @@ scanner_getc(struct scanner *lc)
        }
        if ((c & mask) == 0) {
                /* incorrect UTF-8 sequence: not shortest possible */
-               lc->errstr = "!not shortest possible UTF-8 sequence";
+               lc->errstr = SQLSTATE(42000) "not shortest possible UTF-8 
sequence";
                goto error;
        }
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to