Changeset: dbc08d32a038 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbc08d32a038
Added Files:
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out
Modified Files:
        sql/server/sql_parser.y
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
Branch: Mar2018
Log Message:

fixed precedence of +- unary operator, fixes part 1 of bug 6600


diffs (121 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -578,8 +578,8 @@ int yydebug=1;
 %left <operation> AND
 %left <sval> COMPARISON /* <> < > <= >= */
 %left <operation> '+' '-' '&' '|' '^' LEFT_SHIFT RIGHT_SHIFT LEFT_SHIFT_ASSIGN 
RIGHT_SHIFT_ASSIGN CONCATSTRING SUBSTRING POSITION SPLIT_PART
-%right UMINUS
 %left <operation> '*' '/' '%'
+%left UMINUS
 %left <operation> '~'
 
 %left <operation> GEOM_OVERLAP GEOM_OVERLAP_OR_ABOVE GEOM_OVERLAP_OR_BELOW 
GEOM_OVERLAP_OR_LEFT
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'sqlitelogictest-coalesce-division-by-zero.Bug-6556` in 
directory 'sql/test/BugTracker-2018` itself:
+
+
+# 19:24:33 >  
+# 19:24:33 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31020" "--set" 
"mapi_usock=/var/tmp/mtest-27357/.s.monetdb.31020" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_c=true"
+# 19:24:33 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-old/Linux-x86_64/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# 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 = 31020
+# cmdline opt  mapi_usock = /var/tmp/mtest-27357/.s.monetdb.31020
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 19:24:33 >  
+# 19:24:33 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-27357" "--port=31020"
+# 19:24:33 >  
+
+
+# 19:24:33 >  
+# 19:24:33 >  "Done."
+# 19:24:33 >  
+
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out
@@ -0,0 +1,37 @@
+stdout of test 'sqlitelogictest-coalesce-division-by-zero.Bug-6556` in 
directory 'sql/test/BugTracker-2018` itself:
+
+
+# 19:24:33 >  
+# 19:24:33 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31020" "--set" 
"mapi_usock=/var/tmp/mtest-27357/.s.monetdb.31020" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_c=true"
+# 19:24:33 >  
+
+# MonetDB 5 server v11.29.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2018', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.386 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://xps13:31020/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-27357/.s.monetdb.31020
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 19:24:33 >  
+# 19:24:33 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-27357" "--port=31020"
+# 19:24:33 >  
+
+#SELECT COALESCE ( + 55, + 71 * - 23 + 20 + 74 / - COUNT ( ALL - 0 ) / + 75, - 
85 / - 71 ) - + - 62 + - - CAST ( + 88 AS INTEGER ) * + + 83 AS col0;
+% .L5 # table_name
+% col0 # name
+% hugeint # type
+% 4 # length
+[ 7421 ]
+
+# 19:24:33 >  
+# 19:24:33 >  "Done."
+# 19:24:33 >  
+
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
@@ -27,17 +27,17 @@ Ready.
 #CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
 #INSERT INTO tab0 VALUES(97,1,99), (15,81,47), (87,21,10);
 [ 3    ]
-#SELECT - col0 - - - col0 * + CAST ( NULL AS INTEGER ) FROM tab0;
-% sys.L3 # table_name
+#SELECT CAST ( - col0 - - - col0 * + CAST ( NULL AS INTEGER ) AS BIGINT ) FROM 
tab0;
+% .L3 # table_name
 % L3 # name
 % bigint # type
 % 1 # length
 [ NULL ]
 [ NULL ]
 [ NULL ]
-#SELECT ALL - col1 * - 16 * + CAST ( NULL AS INTEGER ) FROM tab0 cor0;
-% sys.L3 # table_name
-% L3 # name
+#SELECT ALL - CAST ( col1 * - 16 * + CAST ( NULL AS INTEGER ) AS BIGINT ) FROM 
tab0 cor0;
+% .L4 # table_name
+% L4 # name
 % bigint # type
 % 1 # length
 [ NULL ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to