Changeset: b1efe52241ae for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1efe52241ae Modified Files: sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out sql/server/rel_select.c sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 sql/test/BugTracker-2012/Tests/querycache.Bug-3212.stable.out sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128 sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker-2017/Tests/sqllitelogistest_case.Bug-6335.sql sql/test/BugTracker/Tests/caching.SF-1651599.stable.out sql/test/mapi/Tests/sql_int128.stable.out.int128 sql/test/mergetables/Tests/mergequery.stable.out sql/test/pg_regress/Tests/strings.stable.out sql/test/pg_regress/Tests/strings_cast.stable.out sql/test/remote/Tests/partition_elim.stable.out Branch: Jul2017 Log Message:
fixed bug 6335, ie don't do inplace conversions on shared atoms diffs (truncated from 2475 to 300 lines): diff --git a/sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out b/sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out --- a/sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out +++ b/sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out @@ -108,7 +108,7 @@ end user.s4_1; % mal # name % clob # type % 106 # length -function user.s12_1():void; +function user.s16_1():void; X_1:void := querylog.define("explain select reverse(x) from udf_reverse;", "sequential_pipe", 22:int); X_22 := bat.new(nil:str); X_28 := bat.new(nil:int); @@ -126,32 +126,29 @@ function user.s12_1():void; X_35 := bat.append(X_26, 0:int); X_36 := bat.append(X_28, 0:int); sql.resultSet(X_29, X_31, X_33, X_35, X_36, X_18); -end user.s12_1; -#inline actions= 0 time=4 usec -#candidates actions= 1 time=15 usec -#remap actions= 1 time=25 usec -#costModel actions= 1 time=12 usec -#coercions actions= 0 time=2 usec -#evaluate actions= 0 time=3 usec -#emptybind actions= 0 time=4 usec -#pushselect actions= 0 time=4 usec -#aliases actions= 1 time=16 usec -#mergetable actions= 0 time=23 usec -#deadcode actions= 2 time=15 usec -#aliases actions= 0 time=4 usec -#constants actions= 0 time=5 usec -#commonTerms actions= 0 time=5 usec -#projectionpath actions= 0 time=4 usec -#reorder actions= 1 time=25 usec -#deadcode actions= 0 time=5 usec -#reduce actions=26 time=26 usec -#matpack actions= 0 time=4 usec -#querylog actions= 0 time=1 usec -#multiplex actions= 0 time=3 usec -#generator actions= 0 time=2 usec -#profiler actions= 1 time=10 usec -#garbageCollector actions= 1 time=15 usec -#total actions= 1 time=291 usec +end user.s16_1; +#inline actions= 0 time=3 usec +#remap actions= 1 time=10 usec +#costmodel actions= 1 time=2 usec +#coercion actions= 0 time=2 usec +#evaluate actions= 0 time=5 usec +#emptybind actions= 3 time=18 usec +#pushselect actions= 0 time=5 usec +#aliases actions= 1 time=9 usec +#mergetable actions= 0 time=46 usec +#deadcode actions= 3 time=10 usec +#aliases actions= 0 time=0 usec +#constants actions= 2 time=10 usec +#commonTerms actions= 0 time=6 usec +#projectionpath actions= 0 time=5 usec +#reorder actions= 1 time=33 usec +#deadcode actions= 0 time=6 usec +#matpack actions= 0 time=1 usec +#multiplex actions= 0 time=2 usec +#profiler actions=1 time=2 usec +#candidates actions=1 time=1 usec +#garbagecollector actions= 1 time=52 usec +#total actions=23 time=362 usec #select reverse(x) from udf_reverse; % sys.L2 # table_name % L2 # name diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1204,14 +1204,10 @@ exp_convert_inplace(mvc *sql, sql_subtyp atom *a; /* exclude named variables and variable lists */ - if (exp->type != e_atom || exp->r /* named */ || exp->f /* list */) + if (exp->type != e_atom || exp->r /* named */ || exp->f /* list */ || !exp->l /* not direct atom */) return NULL; - if (exp->l) - a = exp->l; - else - a = sql_bind_arg(sql, exp->flag); - + a = exp->l; if (t->scale && t->type->eclass != EC_FLT) return NULL; diff --git a/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out b/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out --- a/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out +++ b/sql/test/BugDay_2005-11-09_2.9.3/Tests/sql_server_crash.SF-1080024.stable.out @@ -25,10 +25,10 @@ Ready. # 11:50:54 > #select NULLIF(NULLIF('first', 'second'), 'first'); -% .L1 # table_name -% L1 # name +% .L2 # table_name +% L2 # name % char # type -% 6 # length +% 5 # length [ NULL ] # 12:45:31 > diff --git a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 b/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 --- a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 +++ b/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 @@ -47,8 +47,8 @@ Ready. #select bit_and(1, power(2, 1)); % .L2 # table_name % L2 # name -% decimal # type -% 39 # length +% tinyint # type +% 1 # length [ 0 ] # 14:12:27 > diff --git a/sql/test/BugTracker-2012/Tests/querycache.Bug-3212.stable.out b/sql/test/BugTracker-2012/Tests/querycache.Bug-3212.stable.out --- a/sql/test/BugTracker-2012/Tests/querycache.Bug-3212.stable.out +++ b/sql/test/BugTracker-2012/Tests/querycache.Bug-3212.stable.out @@ -52,7 +52,9 @@ Ready. % clob, int # type % 78, 1 # length [ "select * from querycache();", 1 ] -[ "select i, s from qrys where i = 1 and s = \\'hello\\';", 3 ] +[ "select i, s from qrys where i = 3 and s = \\'new\\';", 1 ] +[ "select i, s from qrys where i = 2 and s = \\'brave\\';", 1 ] +[ "select i, s from qrys where i = 1 and s = \\'hello\\';", 1 ] [ "insert into qrys values (1,\\'hello\\'),(2,\\'brave\\'),(3,\\'new\\'),(4,\\'world\\');", 1 ] #drop table qrys; diff --git a/sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out b/sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out --- a/sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out +++ b/sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out @@ -129,12 +129,12 @@ end user.s4_1; % clob # type % 202 # length function user.s6_1():void; - X_4:void := querylog.define("explain select replace(a1,a2,a3), id\nfrom (\n select name as a1, \\'a\\' as a2, \\'A\\' as a3, id + 1 as id \n from sys.functions\n) as x;", "sequential_pipe", 39:int); - X_41 := bat.new(nil:str); + X_4:void := querylog.define("explain select replace(a1,a2,a3), id\nfrom (\n select name as a1, \\'a\\' as a2, \\'A\\' as a3, id + 1 as id \n from sys.functions\n) as x;", "sequential_pipe", 41:int); + X_43 := bat.new(nil:str); + X_49 := bat.new(nil:int); X_47 := bat.new(nil:int); - X_45 := bat.new(nil:int); - X_44 := bat.new(nil:str); - X_43 := bat.new(nil:str); + X_46 := bat.new(nil:str); + X_45 := bat.new(nil:str); X_7 := sql.mvc(); C_8:bat[:oid] := sql.tid(X_7, "sys", "functions"); X_21:bat[:str] := sql.bind(X_7, "sys", "functions", "name", 0:int); @@ -149,20 +149,20 @@ function user.s6_1():void; X_20 := algebra.projection(C_8, X_19); X_29 := algebra.project(X_20, "a"); X_31 := algebra.project(X_20, "A"); - X_37:bat[:str] := mal.manifold("str", "replace", X_27, X_29, X_31); + X_39:bat[:str] := mal.manifold("str", "replace", X_27, X_29, X_31); X_32 := batcalc.lng(X_20); - X_34:bat[:lng] := batcalc.+(X_32, 1:lng); - X_48 := bat.append(X_41, "sys.L12"); - X_50 := bat.append(X_43, "L12"); - X_52 := bat.append(X_44, "varchar"); - X_54 := bat.append(X_45, 0:int); + X_36:bat[:lng] := batcalc.+(X_32, 1:lng); + X_50 := bat.append(X_43, "sys.L12"); + X_52 := bat.append(X_45, "L12"); + X_54 := bat.append(X_46, "varchar"); X_56 := bat.append(X_47, 0:int); - X_57 := bat.append(X_48, "sys.x"); - X_59 := bat.append(X_50, "id"); - X_61 := bat.append(X_52, "bigint"); - X_63 := bat.append(X_54, 64:int); - X_65 := bat.append(X_56, 0:int); - sql.resultSet(X_57, X_59, X_61, X_63, X_65, X_37, X_34); + X_58 := bat.append(X_49, 0:int); + X_59 := bat.append(X_50, "sys.x"); + X_61 := bat.append(X_52, "id"); + X_63 := bat.append(X_54, "bigint"); + X_65 := bat.append(X_56, 64:int); + X_67 := bat.append(X_58, 0:int); + sql.resultSet(X_59, X_61, X_63, X_65, X_67, X_39, X_36); end user.s6_1; #inline actions= 0 time=3 usec #candidates actions= 1 time=23 usec diff --git a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out --- a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out +++ b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out @@ -3150,7 +3150,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, convert(v, float(24)) from T_real; % sys.t_real, sys.L3 # table_name @@ -3201,7 +3201,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, convert(v, double precision) from T_real; % sys.t_real, sys.L3 # table_name @@ -3218,7 +3218,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, convert(v, numeric) from T_real; % sys.t_real, sys.L3 # table_name @@ -3337,7 +3337,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #SELECT v, convert(v, CHARACTER LARGE OBJECT) from T_real; % sys.t_real, sys.L3 # table_name @@ -3354,7 +3354,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #SELECT v, convert(v, Clob) from T_real; % sys.t_real, sys.L3 # table_name @@ -3371,7 +3371,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #SELECT v, cast(v as tinyint) from T_real where v between -127 and 127; % sys.t_real, sys.L3 # table_name @@ -3431,7 +3431,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, cast(v as float(24)) from T_real; % sys.t_real, sys.L3 # table_name @@ -3482,7 +3482,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, cast(v as double precision) from T_real; % sys.t_real, sys.L3 # table_name @@ -3499,7 +3499,7 @@ Ready. [ -2.1475e+09, -2147483648 ] [ 2.1475e+09, 2147483648 ] [ 0.12, 0.1199999973 ] -[ -3.1416, -3.141562939 ] +[ -3.1416, -3.1415627 ] [ NULL, NULL ] #SELECT v, cast(v as numeric) from T_real; % sys.t_real, sys.L3 # table_name @@ -3618,7 +3618,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #SELECT v, cast(v as CHARACTER LARGE OBJECT) from T_real; % sys.t_real, sys.L3 # table_name @@ -3635,7 +3635,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #SELECT v, cast(v as Clob) from T_real; % sys.t_real, sys.L3 # table_name @@ -3652,7 +3652,7 @@ Ready. [ -2.1475e+09, "-2.1474836e+09" ] [ 2.1475e+09, "2.1474836e+09" ] [ 0.12, "0.12" ] -[ -3.1416, "-3.141563" ] +[ -3.1416, "-3.1415627" ] [ NULL, NULL ] #DROP TABLE T_real; #CREATE TABLE T_double (v DOUBLE); @@ -5862,8 +5862,8 @@ Ready. [ "", "" ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list