Changeset: d70597e58c01 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d70597e58c01
Modified Files:
        sql/ChangeLog.Jun2010
        sql/src/server/rel_select.mx
Branch: default
Log Message:

Merged from Jun2010


diffs (127 lines):

diff -r 9b2fd9544969 -r d70597e58c01 sql/ChangeLog.Jun2010
--- a/sql/ChangeLog.Jun2010     Thu Jul 08 15:47:07 2010 +0200
+++ b/sql/ChangeLog.Jun2010     Thu Jul 08 17:39:21 2010 +0200
@@ -1,6 +1,9 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Thu Jul  8 2010 Fabian Groffen <fab...@cwi.nl>
+- Improved error message for certain type-related problems by including the 
affected column name.
+
 * Wed Jul  7 2010 Fabian Groffen <fab...@cwi.nl>
 - Make TEXT a separate keyword, separating it from CLOB, such that we can 
sloppily allow TEXT to appear as a column name, since it seems not to be in the 
standard as reserved keyword.
 
diff -r 9b2fd9544969 -r d70597e58c01 sql/src/server/rel_select.mx
--- a/sql/src/server/rel_select.mx      Thu Jul 08 15:47:07 2010 +0200
+++ b/sql/src/server/rel_select.mx      Thu Jul 08 17:39:21 2010 +0200
@@ -1758,15 +1758,16 @@
        if (err) {
                sql_exp *res = sql_error(
                        sql, 03,
-                       "types %s(%d,%d) (%s) and %s(%d,%d) (%s) are not equal",
+                       "types %s(%d,%d) and %s(%d,%d) are not equal%s%s%s",
                        fromtype->type->sqlname,
                        fromtype->digits,
                        fromtype->scale,
-                       fromtype->type->base.name,
                        t->type->sqlname,
                        t->digits,
                        t->scale,
-                       t->type->base.name
+                       (exp->type == e_column ? " for column '" : ""),
+                       (exp->type == e_column ? exp->name : ""),
+                       (exp->type == e_column ? "'" : "")
                );
                if (exp)
                        exp_destroy(exp);
diff -r 9b2fd9544969 -r d70597e58c01 
sql/src/test/BugTracker/Tests/between_with_column.SF-1959410.stable.err
--- a/sql/src/test/BugTracker/Tests/between_with_column.SF-1959410.stable.err   
Thu Jul 08 15:47:07 2010 +0200
+++ b/sql/src/test/BugTracker/Tests/between_with_column.SF-1959410.stable.err   
Thu Jul 08 17:39:21 2010 +0200
@@ -12,9 +12,9 @@
 # 10:53:08 >  mclient -lsql -umonetdb -Pmonetdb --host=alviss --port=39845 
 # 10:53:08 >  
 
-MAPI  = mone...@alf:30201
+MAPI  = mone...@volund:38056
 QUERY = select yea from t4, t5 where age between 0.03 and id < 30 ;
-ERROR = !types boolean(1,0) (bit) and double(53,2) (dbl) are not equal
+ERROR = !types boolean(1,0) and double(53,2) are not equal
 
 # 10:53:08 >  
 # 10:53:08 >  Done.
diff -r 9b2fd9544969 -r d70597e58c01 
sql/src/test/BugTracker/Tests/insert_date.SF-1838785.stable.err
--- a/sql/src/test/BugTracker/Tests/insert_date.SF-1838785.stable.err   Thu Jul 
08 15:47:07 2010 +0200
+++ b/sql/src/test/BugTracker/Tests/insert_date.SF-1838785.stable.err   Thu Jul 
08 17:39:21 2010 +0200
@@ -10,9 +10,9 @@
 # 00:53:56 >  mclient -lsql -umonetdb -Pmonetdb --host=koala --port=35202 
 # 00:53:56 >  
 
-MAPI  = mone...@amelia:38636
+MAPI  = mone...@volund:38056
 QUERY = insert into test1838785(id,name,date33)
-ERROR = !types smallint(16,0) (sht) and date(0,0) (date) are not equal
+ERROR = !types smallint(16,0) and date(0,0) are not equal
 
 # 00:53:56 >  
 # 00:53:56 >  Done.
diff -r 9b2fd9544969 -r d70597e58c01 
sql/src/test/BugTracker/Tests/set_operation_coersions.SF-1543216.stable.err
--- 
a/sql/src/test/BugTracker/Tests/set_operation_coersions.SF-1543216.stable.err   
    Thu Jul 08 15:47:07 2010 +0200
+++ 
b/sql/src/test/BugTracker/Tests/set_operation_coersions.SF-1543216.stable.err   
    Thu Jul 08 17:39:21 2010 +0200
@@ -10,12 +10,13 @@
 # 11:19:45 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=36646  < set_operation_coersions.SF-1543216.sql
 # 11:19:45 >  
 
-MAPI  = mone...@localhost:36646
+MAPI  = mone...@volund:32544
 QUERY = select * from t1543216 union select * from s1543216;
-ERROR = !types varchar(23,0) (str) and int(32,0) (int) are not equal
-MAPI  = mone...@localhost:36646
+ERROR = !types varchar(23,0) and int(32,0) are not equal for column 'id'
+MAPI  = mone...@volund:32544
 QUERY = select * from f1543216 union select * from b1543216;
-ERROR = !types boolean(1,0) (bit) and double(53,0) (dbl) are not equal
+ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'id'
+
 
 # 11:19:45 >  
 # 11:19:45 >  Done.
diff -r 9b2fd9544969 -r d70597e58c01 
sql/src/test/Via-m/Tests/event_s11.stable.err
--- a/sql/src/test/Via-m/Tests/event_s11.stable.err     Thu Jul 08 15:47:07 
2010 +0200
+++ b/sql/src/test/Via-m/Tests/event_s11.stable.err     Thu Jul 08 17:39:21 
2010 +0200
@@ -67,16 +67,16 @@
 # 15:59:49 >  mclient -lsql -umonetdb -Pmonetdb --host=yngling --port=32412 
 # 15:59:49 >  
 
-MAPI  = mone...@alf:37695
+MAPI  = mone...@volund:38056
 QUERY = set id_event = add_event('event 4', 123456, 'artist2', 'location3', 
'description3');
-ERROR = !types int(32,0) (int) and date(0,0) (date) are not equal
-MAPI  = mone...@alf:37695
+ERROR = !types int(32,0) and date(0,0) are not equal
+MAPI  = mone...@volund:38056
 QUERY = delete from event where event_name = 'event 2';
 ERROR = !SQLException:assert:DELETE: FOREIGN KEY constraint 
'event.event_event_id_pkey' violated
-MAPI  = mone...@alf:37695
+MAPI  = mone...@volund:38056
 QUERY = insert into event_metadata (
 ERROR = !SQLException:assert:INSERT INTO: UNIQUE constraint 
'event_metadata.unq_metadata' violated
-MAPI  = mone...@alf:37695
+MAPI  = mone...@volund:38056
 QUERY = set id_event = add_event('event 4', '2009-06-24', 'artist4', 
'location4', 'description4');
 ERROR = !SQLException:assert:INSERT INTO: UNIQUE constraint 
'event.unq_event_name' violated
 
diff -r 9b2fd9544969 -r d70597e58c01 
sql/src/test/bugs/Tests/interval_convert_bugs-sf-1274077-1274085.stable.err
--- 
a/sql/src/test/bugs/Tests/interval_convert_bugs-sf-1274077-1274085.stable.err   
    Thu Jul 08 15:47:07 2010 +0200
+++ 
b/sql/src/test/bugs/Tests/interval_convert_bugs-sf-1274077-1274085.stable.err   
    Thu Jul 08 17:39:21 2010 +0200
@@ -10,9 +10,9 @@
 # 14:19:19 >  Mtimeout -timeout 60 MapiClient -lsql -u monetdb -P monetdb 
--host=localhost --port=40835  < interval_convert_bugs-sf-1274077-1274085.sql
 # 14:19:19 >  
 
-MAPI  = mone...@alf:37233
+MAPI  = mone...@volund:38056
 QUERY = select interval '1' year = interval '12' second;
-ERROR = !types month_interval(1,0) (int) and sec_interval(13,0) (lng) are not 
equal
+ERROR = !types month_interval(1,0) and sec_interval(13,0) are not equal
 
 # 14:19:19 >  
 # 14:19:19 >  Done.
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to