Changeset: 29627d20d2e0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29627d20d2e0
Added Files:
        
sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.sql
        
sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.err
Modified Files:
        monetdb5/mal/Tests/tst1200.stable.out
        monetdb5/mal/Tests/tst1202.stable.out
        monetdb5/modules/atoms/mtime.c
        sql/test/BugTracker-2019/Tests/All
        testing/Mtest.py.in
Branch: subquery
Log Message:

merged


diffs (259 lines):

diff --git a/monetdb5/mal/Tests/tst1200.stable.out 
b/monetdb5/mal/Tests/tst1200.stable.out
--- a/monetdb5/mal/Tests/tst1200.stable.out
+++ b/monetdb5/mal/Tests/tst1200.stable.out
@@ -88,11 +88,11 @@ stdout of test 'tst1200` in directory 'm
 [ 0@0, "GMT"   ]
 [ 1@0, "GMT+01:00"     ]
 [ 2@0, "GMT+01:00"     ]
-[ 3@0, "GMT+01:00-DST[october 31@01:15,first wednesday on or after march 
26@01:15]"    ]
-[ 4@0, "GMT-DST[17th monday from start of january@01:15,31th sunday from start 
of august@01:15]"       ]
-[ 5@0, "GMT-01:37-DST[october 31@01:15,first thursday on or after april 
31@01:15]"     ]
-[ 6@0, "GMT-01:37-DST[may 26@01:15,22th tuesday from start of 
september@01:15]"        ]
-[ 7@0, "GMT+23:00-DST[first thursday on or after april 31@01:15,first 
wednesday on or after november 22@01:15]"        ]
+[ 3@0, "GMT+01:00-DST[october 31@01:15,first wednesday on or after march 
10@01:15]"    ]
+[ 4@0, "GMT-DST[first monday from start of january@01:15,first sunday from end 
of august@01:15]"       ]
+[ 5@0, "GMT-01:37-DST[october 31@01:15,last thursday on or before april 
1@01:15]"      ]
+[ 6@0, "GMT-01:37-DST[may 26@01:15,10th tuesday from end of september@01:15]"  
]
+[ 7@0, "GMT+23:00-DST[last thursday on or before april 1@01:15,last wednesday 
on or before november 10@01:15]" ]
 [ 8@0, "GMT-23:36"     ]
 [ 9@0, "GMT"   ]
 [ 10@0,        "GMT-01:00"     ]
@@ -114,11 +114,11 @@ stdout of test 'tst1200` in directory 'm
 [ 0@0,   0,              nil,                                            nil   
                                          ]
 [ 1@0,   60,             nil,                                            nil   
                                          ]
 [ 2@0,   60,             nil,                                            nil   
                                          ]
-[ 3@0, 60,     october 31@01:15,       first wednesday on or after march 
26@01:15      ]
-[ 4@0, 0,      17th monday from start of january@01:15,        31th sunday 
from start of august@01:15  ]
-[ 5@0, -97,    october 31@01:15,       first thursday on or after april 
31@01:15       ]
-[ 6@0, -97,    may 26@01:15,   22th tuesday from start of september@01:15      
]
-[ 7@0, 1380,   first thursday on or after april 31@01:15,      first wednesday 
on or after november 22@01:15   ]
+[ 3@0, 60,     october 31@01:15,       first wednesday on or after march 
10@01:15      ]
+[ 4@0, 0,      first monday from start of january@01:15,       first sunday 
from end of august@01:15   ]
+[ 5@0, -97,    october 31@01:15,       last thursday on or before april 
1@01:15        ]
+[ 6@0, -97,    may 26@01:15,   10th tuesday from end of september@01:15        
]
+[ 7@0, 1380,   last thursday on or before april 1@01:15,       last wednesday 
on or before november 10@01:15   ]
 [ 8@0,   -1416,          nil,                                            nil   
                                          ]
 [ 9@0,   0,              nil,                                            nil   
                                          ]
 [ 10@0,          -60,            nil,                                          
  nil                                             ]
@@ -1001,7 +1001,7 @@ stdout of test 'tst1200` in directory 'm
 [ 3@0,   1-03-01 22:59:59.000,           1-03-01,        23:59:59.000    ]
 [ 4@0,   -5867411-01-01 01:00:00.000,    -5867411-01-01, 00:00:00.000    ]
 [ 5@0,   -768-10-01 02:37:00.000,        -768-10-01,     00:00:00.000    ]
-[ 6@0,   5000-11-01 01:37:00.001,        5000-11-01,     00:00:00.001    ]
+[ 6@0, 5000-11-01 02:37:00.001,        5000-11-01,     00:00:00.001    ]
 [ 7@0,   -1999-05-31 04:49:02.999,       -1999-06-01,    03:49:02.999    ]
 [ 8@0,   2000-07-15 21:24:42.999,        2000-07-14,     20:48:42.999    ]
 [ 9@0,   1999-09-01 18:53:38.999,        1999-09-01,     17:53:38.999    ]
@@ -1033,19 +1033,18 @@ stdout of test 'tst1200` in directory 'm
 [ 9@0, "Azore Islands",        "GMT-01:00"     ]
 [ 10@0,        "Hawaii/USA",   "GMT-10:00"     ]
 [ 11@0,        "American Samoa",       "GMT-11:00"     ]
-[ 12@0,        "Kazakhstan",   "GMT+06:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 13@0,        "Moscow/Russia",        "GMT+03:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 14@0,        "East/Europe",  "GMT+02:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 15@0,        "West/Europe",  "GMT+01:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 16@0,        "UK",   "GMT-DST[first sunday from end of march@02:01,first 
sunday from end of october@02:01]"  ]
-[ 17@0,        "Eastern/Brazil",       "GMT-02:00-DST[first sunday from end of 
october@02:01,first sunday from end of march@02:01]"    ]
-[ 18@0,        "Western/Brazil",       "GMT-03:00-DST[first sunday from end of 
october@02:01,first sunday from end of march@02:01]"    ]
-[ 19@0,        "Andes/Brazil", "GMT-04:00-DST[first sunday from end of 
october@02:01,first sunday from end of march@02:01]"    ]
-[ 20@0,        "East/USA",     "GMT-05:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 21@0,        "Central/USA",  "GMT-06:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 22@0,        "Mountain/USA", "GMT-07:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-[ 23@0,        "Alaska/USA",   "GMT-09:00-DST[first sunday from end of 
march@02:01,first sunday from end of october@02:01]"    ]
-#      io.print("print(timestamp_bat,th_a,wh_a,yh_a,ci_a)");
+[ 12@0,        "Kazakhstan",   "GMT+06:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 13@0,        "Moscow/Russia",        "GMT+03:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 14@0,        "East/Europe",  "GMT+02:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 15@0,        "West/Europe",  "GMT+01:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 16@0,        "UK",   "GMT-DST[first sunday from end of march@02:00,first 
sunday from end of october@02:00]"  ]
+[ 17@0,        "Eastern/Brazil",       "GMT-02:00-DST[first sunday from end of 
october@02:00,first sunday from end of march@02:00]"    ]
+[ 18@0,        "Western/Brazil",       "GMT-03:00-DST[first sunday from end of 
october@02:00,first sunday from end of march@02:00]"    ]
+[ 19@0,        "Andes/Brazil", "GMT-04:00-DST[first sunday from end of 
october@02:00,first sunday from end of march@02:00]"    ]
+[ 20@0,        "East/USA",     "GMT-05:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 21@0,        "Central/USA",  "GMT-06:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 22@0,        "Mountain/USA", "GMT-07:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
+[ 23@0,        "Alaska/USA",   "GMT-09:00-DST[first sunday from end of 
march@02:00,first sunday from end of october@02:00]"    ]
 [ "print(timestamp_bat,th_a,wh_a,yh_a,ci_a)" ]
 
#---------------------------------------------------------------------------------------------------------#
 # h    timestamp                       Wake Island     t               
American Samoa  t                 # name
@@ -1057,7 +1056,7 @@ stdout of test 'tst1200` in directory 'm
 [ 3@0,   1-03-01 22:59:59.000,           1-03-02,        09:59:59.000,   
1-03-01,        10:59:59.000    ]
 [ 4@0,   -5867411-01-01 01:00:00.000,    -5867411-01-01, 12:00:00.000,   nil,  
          nil             ]
 [ 5@0,   -768-10-01 02:37:00.000,        -768-10-01,     13:37:00.000,   
-768-09-30,     14:37:00.000    ]
-[ 6@0,   5000-11-01 01:37:00.001,        5000-11-01,     12:37:00.001,   
5000-10-31,     13:37:00.001    ]
+[ 6@0, 5000-11-01 02:37:00.001,        5000-11-01,     13:37:00.001,   
5000-10-31,     14:37:00.001    ]
 [ 7@0,   -1999-05-31 04:49:02.999,       -1999-05-31,    15:49:02.999,   
-1999-05-30,    16:49:02.999    ]
 [ 8@0,   2000-07-15 21:24:42.999,        2000-07-16,     08:24:42.999,   
2000-07-15,     09:24:42.999    ]
 [ 9@0,   1999-09-01 18:53:38.999,        1999-09-02,     05:53:38.999,   
1999-09-01,     06:53:38.999    ]
@@ -1083,7 +1082,7 @@ stdout of test 'tst1200` in directory 'm
 [ 3@0, 1-03-01 22:59:59.000,   1-03-02 21:59:59.000,   1-03-01 22:58:59.000,   
23      ]
 [ 4@0, -5867411-01-01 01:00:00.000,    -5867411-01-02 00:00:00.000,    nil,    
nil     ]
 [ 5@0, -768-10-01 02:37:00.000,        -768-10-02 01:37:00.000,        
-768-10-01 02:36:00.000,        23      ]
-[ 6@0, 5000-11-01 01:37:00.001,        5000-11-02 00:37:00.001,        
5000-11-01 01:36:00.001,        23      ]
+[ 6@0, 5000-11-01 02:37:00.001,        5000-11-02 01:37:00.001,        
5000-11-01 02:36:00.001,        23      ]
 [ 7@0, -1999-05-31 04:49:02.999,       -1999-06-01 03:49:02.999,       
-1999-05-31 04:48:02.999,       23      ]
 [ 8@0, 2000-07-15 21:24:42.999,        2000-07-16 20:24:42.999,        
2000-07-15 21:23:42.999,        23      ]
 [ 9@0, 1999-09-01 18:53:38.999,        1999-09-02 17:53:38.999,        
1999-09-01 18:52:38.999,        23      ]
diff --git a/monetdb5/mal/Tests/tst1202.stable.out 
b/monetdb5/mal/Tests/tst1202.stable.out
--- a/monetdb5/mal/Tests/tst1202.stable.out
+++ b/monetdb5/mal/Tests/tst1202.stable.out
@@ -187,11 +187,11 @@ stdout of test 'tst1202` in directory 'm
 [ 0@0, "GMT"   ]
 [ 1@0, "GMT+01:00"     ]
 [ 2@0, "GMT+01:00"     ]
-[ 3@0, "GMT+01:00-DST[october 31@01:15,first wednesday on or after march 
26@01:15]"    ]
-[ 4@0, "GMT-DST[17th monday from start of january@01:15,31th sunday from start 
of august@01:15]"       ]
-[ 5@0, "GMT-01:37-DST[october 31@01:15,first thursday on or after april 
31@01:15]"     ]
-[ 6@0, "GMT-01:37-DST[may 26@01:15,22th tuesday from start of 
september@01:15]"        ]
-[ 7@0, "GMT+23:00-DST[first thursday on or after april 31@01:15,first 
wednesday on or after november 22@01:15]"        ]
+[ 3@0, "GMT+01:00-DST[october 31@01:15,first wednesday on or after march 
10@01:15]"    ]
+[ 4@0, "GMT-DST[first monday from start of january@01:15,first sunday from end 
of august@01:15]"       ]
+[ 5@0, "GMT-01:37-DST[october 31@01:15,last thursday on or before april 
1@01:15]"      ]
+[ 6@0, "GMT-01:37-DST[may 26@01:15,10th tuesday from end of september@01:15]"  
]
+[ 7@0, "GMT+23:00-DST[last thursday on or before april 1@01:15,last wednesday 
on or before november 10@01:15]" ]
 [ 8@0, "GMT-23:36"     ]
 [ 9@0, "GMT"   ]
 [ 10@0,        "GMT-01:00"     ]
@@ -207,11 +207,11 @@ stdout of test 'tst1202` in directory 'm
 [ 0@0,   0,              nil,                                            nil   
                                          ]
 [ 1@0,   60,             nil,                                            nil   
                                          ]
 [ 2@0,   60,             nil,                                            nil   
                                          ]
-[ 3@0,   60,             october 31@01:15,                               first 
wednesday on or after march 26@01:15      ]
-[ 4@0,   0,              17th monday from start of january@01:15,        31th 
sunday from start of august@01:15          ]
-[ 5@0,   -97,            october 31@01:15,                               first 
thursday on or after april 31@01:15       ]
-[ 6@0,   -97,            may 26@01:15,                                   22th 
tuesday from start of september@01:15      ]
-[ 7@0,   1380,           first thursday on or after april 31@01:15,      first 
wednesday on or after november 22@01:15   ]
+[ 3@0, 60,     october 31@01:15,       first wednesday on or after march 
10@01:15      ]
+[ 4@0, 0,      first monday from start of january@01:15,       first sunday 
from end of august@01:15   ]
+[ 5@0, -97,    october 31@01:15,       last thursday on or before april 
1@01:15        ]
+[ 6@0, -97,    may 26@01:15,   10th tuesday from end of september@01:15        
]
+[ 7@0, 1380,   last thursday on or before april 1@01:15,       last wednesday 
on or before november 10@01:15   ]
 [ 8@0,   -1416,          nil,                                            nil   
                                          ]
 [ 9@0,   0,              nil,                                            nil   
                                          ]
 [ 10@0,          -60,            nil,                                          
  nil                                             ]
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -196,12 +196,12 @@ extern char *strptime(const char *, cons
 #endif
 
 
-#define get_rule(r)    ((r).s.weekday | ((r).s.day<<6) | ((r).s.minutes<<10) | 
((r).s.month<<21))
+#define get_rule(r)    ((r).s.weekday | ((r).s.day<<4) | ((r).s.minutes<<10) | 
((r).s.month<<21))
 #define set_rule(r,i)                                                  \
        do {                                                                    
        \
-               (r).asint = int_nil;                                    \
+               (r).s.empty = 0;                                                
\
                (r).s.weekday = (i)&15;                                 \
-               (r).s.day = ((i)&(63<<6))>>6;                   \
+               (r).s.day = ((i)&(63<<4))>>4;                   \
                (r).s.minutes = ((i)&(2047<<10))>>10;   \
                (r).s.month = ((i)&(15<<21))>>21;               \
        } while (0)
@@ -1128,6 +1128,7 @@ rule_fromstr(const char *buf, size_t *le
        if (day >= 1 && day <= LEAPDAYS[month] &&
                hours >= 0 && hours < 60 &&
                minutes >= 0 && minutes < 60) {
+               (*d)->s.empty = 0;
                (*d)->s.month = month;
                (*d)->s.weekday = WEEKDAY_ZERO + (neg_weekday ? -weekday : 
weekday);
                (*d)->s.day = DAY_ZERO + (neg_day ? -day : day);
@@ -2350,6 +2351,7 @@ MTIMErule_create(rule *ret, const int *m
                !is_int_nil(*minutes) && *minutes >= 0 && *minutes < 24 * 60 &&
                !is_int_nil(*day) && abs(*day) >= 1 && abs(*day) <= 
LEAPDAYS[*month] &&
                (*weekday || *day > 0)) {
+               ret->s.empty = 0;
                ret->s.month = *month;
                ret->s.day = DAY_ZERO + *day;
                ret->s.weekday = WEEKDAY_ZERO + *weekday;
diff --git a/sql/test/BugTracker-2019/Tests/All 
b/sql/test/BugTracker-2019/Tests/All
--- a/sql/test/BugTracker-2019/Tests/All
+++ b/sql/test/BugTracker-2019/Tests/All
@@ -7,3 +7,4 @@ insert-replica-table.Bug-6684
 subselect-count.Bug-6686
 subselect.Bug-6688
 timestamptransformation.Bug-6695
+duplicates-not-eliminated-long-CASE-stmt.Bug-6697
diff --git 
a/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.sql
 
b/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.sql
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.sql
@@ -0,0 +1,8 @@
+CREATE TABLE IF NOT EXISTS "task" (
+"sys_class_name" VARCHAR(80),
+"priority" BIGINT,
+"sys_created_on" TIMESTAMP
+);
+
+
+explain SELECT  sys.timestamp_to_str(case when task0."sys_created_on" >= 
'1999-10-31 09:00:00' and task0."sys_created_on" < '2000-04-02 10:00:00' then 
task0."sys_created_on" + interval '-28800' second when task0."sys_created_on" 
>= '2000-04-02 10:00:00' and task0."sys_created_on" < '2000-10-29 09:00:00' 
then task0."sys_created_on" + interval '-25200' second when 
task0."sys_created_on" >= '2000-10-29 09:00:00' and task0."sys_created_on" < 
'2001-04-01 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2001-04-01 10:00:00' and task0."sys_created_on" 
< '2001-10-28 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2001-10-28 09:00:00' and task0."sys_created_on" 
< '2002-04-07 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2002-04-07 10:00:00' and task0."sys_created_on" 
< '2002-10-27 09:00:00' then task0."sys_created_on" + interval '-25200' second w
 hen task0."sys_created_on" >= '2002-10-27 09:00:00' and task0."sys_created_on" 
< '2003-04-06 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2003-04-06 10:00:00' and task0."sys_created_on" 
< '2003-10-26 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2003-10-26 09:00:00' and task0."sys_created_on" 
< '2004-04-04 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2004-04-04 10:00:00' and task0."sys_created_on" 
< '2004-10-31 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2004-10-31 09:00:00' and task0."sys_created_on" 
< '2005-04-03 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2005-04-03 10:00:00' and task0."sys_created_on" 
< '2005-10-30 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2005-10-30 0
 9:00:00' and task0."sys_created_on" < '2006-04-02 10:00:00' then 
task0."sys_created_on" + interval '-28800' second when task0."sys_created_on" 
>= '2006-04-02 10:00:00' and task0."sys_created_on" < '2006-10-29 09:00:00' 
then task0."sys_created_on" + interval '-25200' second when 
task0."sys_created_on" >= '2006-10-29 09:00:00' and task0."sys_created_on" < 
'2007-03-11 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2007-03-11 10:00:00' and task0."sys_created_on" 
< '2007-11-04 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2007-11-04 09:00:00' and task0."sys_created_on" 
< '2008-03-09 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2008-03-09 10:00:00' and task0."sys_created_on" 
< '2008-11-02 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2008-11-02 09:00:00' and task0."sys_created_on" 
< '2009
 -03-08 10:00:00' then task0."sys_created_on" + interval '-28800' second when 
task0."sys_created_on" >= '2009-03-08 10:00:00' and task0."sys_created_on" < 
'2009-11-01 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2009-11-01 09:00:00' and task0."sys_created_on" 
< '2010-03-14 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2010-03-14 10:00:00' and task0."sys_created_on" 
< '2010-11-07 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2010-11-07 09:00:00' and task0."sys_created_on" 
< '2011-03-13 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2011-03-13 10:00:00' and task0."sys_created_on" 
< '2011-11-06 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2011-11-06 09:00:00' and task0."sys_created_on" 
< '2012-03-11 10:00:00' then task0."sys_created_on
 " + interval '-28800' second when task0."sys_created_on" >= '2012-03-11 
10:00:00' and task0."sys_created_on" < '2012-11-04 09:00:00' then 
task0."sys_created_on" + interval '-25200' second when task0."sys_created_on" 
>= '2012-11-04 09:00:00' and task0."sys_created_on" < '2013-03-10 10:00:00' 
then task0."sys_created_on" + interval '-28800' second when 
task0."sys_created_on" >= '2013-03-10 10:00:00' and task0."sys_created_on" < 
'2013-11-03 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2013-11-03 09:00:00' and task0."sys_created_on" 
< '2014-03-09 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2014-03-09 10:00:00' and task0."sys_created_on" 
< '2014-11-02 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2014-11-02 09:00:00' and task0."sys_created_on" 
< '2015-03-08 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sy
 s_created_on" >= '2015-03-08 10:00:00' and task0."sys_created_on" < 
'2015-11-01 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2015-11-01 09:00:00' and task0."sys_created_on" 
< '2016-03-13 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2016-03-13 10:00:00' and task0."sys_created_on" 
< '2016-11-06 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2016-11-06 09:00:00' and task0."sys_created_on" 
< '2017-03-12 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2017-03-12 10:00:00' and task0."sys_created_on" 
< '2017-11-05 09:00:00' then task0."sys_created_on" + interval '-25200' second 
when task0."sys_created_on" >= '2017-11-05 09:00:00' and task0."sys_created_on" 
< '2018-03-11 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2018-03-11 10:00:00' and 
 task0."sys_created_on" < '2018-11-04 09:00:00' then task0."sys_created_on" + 
interval '-25200' second when task0."sys_created_on" >= '2018-11-04 09:00:00' 
and task0."sys_created_on" < '2019-03-10 10:00:00' then task0."sys_created_on" 
+ interval '-28800' second when task0."sys_created_on" >= '2019-03-10 10:00:00' 
and task0."sys_created_on" < '2019-11-03 09:00:00' then task0."sys_created_on" 
+ interval '-25200' second when task0."sys_created_on" >= '2019-11-03 09:00:00' 
and task0."sys_created_on" < '2020-03-08 10:00:00' then task0."sys_created_on" 
+ interval '-28800' second when task0."sys_created_on" >= '2020-03-08 10:00:00' 
and task0."sys_created_on" < '2020-11-01 09:00:00' then task0."sys_created_on" 
+ interval '-25200' second when task0."sys_created_on" >= '2020-11-01 09:00:00' 
and task0."sys_created_on" < '2021-03-14 10:00:00' then task0."sys_created_on" 
+ interval '-28800' second when task0."sys_created_on" >= '2021-03-14 10:00:00' 
and task0."sys_created_on" < '2021-11-07 09:00:
 00' then task0."sys_created_on" + interval '-25200' second when 
task0."sys_created_on" >= '2021-11-07 09:00:00' and task0."sys_created_on" < 
'2022-03-13 10:00:00' then task0."sys_created_on" + interval '-28800' second 
when task0."sys_created_on" >= '2022-03-13 10:00:00' and task0."sys_created_on" 
< '2022-11-06 09:00:00' then task0."sys_created_on" + interval '-25200' second 
else task0."sys_created_on" + interval '-28800' second end,'%Y') AS yearref 
FROM task task0 WHERE task0."sys_class_name" = 'incident' AND task0."priority" 
IS NOT NULL ;
diff --git 
a/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.err
 
b/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'duplicates-not-eliminated-long-CASE-stmt.Bug-6697` in 
directory 'sql/test/BugTracker-2019` itself:
+
+
+# 14:05:07 >  
+# 14:05:07 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35928" "--set" 
"mapi_usock=/var/tmp/mtest-95248/.s.monetdb.35928" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/jennie/scratch/monet-install/Apr2019/debug/var/MonetDB/mTests_sql_test_BugTracker-2019"
 "--set" "embedded_c=true"
+# 14:05:07 >  
+
+# builtin opt  gdk_dbpath = 
/Users/jennie/scratch/monet-install/Apr2019/debug/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 35928
+# cmdline opt  mapi_usock = /var/tmp/mtest-95248/.s.monetdb.35928
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/jennie/scratch/monet-install/Apr2019/debug/var/MonetDB/mTests_sql_test_BugTracker-2019
+# cmdline opt  embedded_c = true
+#main thread:!ERROR:MALException:client.quit:Server stopped
+
+# 14:05:08 >  
+# 14:05:08 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-95248" "--port=35928"
+# 14:05:08 >  
+
+
+# 14:05:08 >  
+# 14:05:08 >  "Done."
+# 14:05:08 >  
+
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2016,6 +2016,28 @@ def RunTest(env, TST, BusyPorts, COND, o
             #elif os.name == "posix":
             else:
                 reason = "test missing: 
'"+os.path.join(TSTSRCDIR,TST)+"[.py|.mal|.malC|.sql|.R|.rb]`"
+            if quiet:
+                pass
+            elif verbose:
+                STDOUT.write('%s%s  ' %
+                             (prompt(), os.path.join(env['TSTDIR'], TST + 
EXT)))
+                prred('TEST MISSING')
+                STDOUT.write('\n')
+            else:
+                if ttywidth > 0 and length + 10 + 21 >= ttywidth:
+                    # 10 - length of prompt()
+                    # 21 - length of time plus result
+                    l = ttywidth - 10 - 21 - 1
+                    if len(TST) <= l:
+                        s = '%-*s ' % (l, TST)
+                    else:
+                        s = '%s...%s ' % (TST[:l//2 - 2], TST[l//2+1-l:])
+                else:
+                    s = '%-*s ' % (length, TST)
+                STDOUT.write('%s%s' % (prompt(), s))
+                prred('TEST MISSING')
+                STDOUT.write('\n')
+
             return TX,Failed,Failed,elem,reason,links
 
     MissingMods = CheckMods(env, TST, SERVER, CALL)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to