Changeset: 642e282e1a32 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=642e282e1a32 Modified Files: clients/odbc/driver/SQLGetTypeInfo.c sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out sql/benchmarks/tpch/LOCKED/Tests/01.stable.out sql/benchmarks/tpch/LOCKED/Tests/03.stable.out sql/benchmarks/tpch/LOCKED/Tests/05.stable.out sql/benchmarks/tpch/LOCKED/Tests/06.stable.out sql/benchmarks/tpch/LOCKED/Tests/07.stable.out sql/benchmarks/tpch/LOCKED/Tests/08.stable.out sql/benchmarks/tpch/LOCKED/Tests/09.stable.out sql/benchmarks/tpch/LOCKED/Tests/10.stable.out sql/benchmarks/tpch/LOCKED/Tests/11.stable.out sql/benchmarks/tpch/LOCKED/Tests/14.stable.out sql/benchmarks/tpch/LOCKED/Tests/15.stable.out sql/benchmarks/tpch/LOCKED/Tests/19.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out sql/benchmarks/tpch/Tests/01.stable.out sql/benchmarks/tpch/Tests/03.stable.out sql/benchmarks/tpch/Tests/05.stable.out sql/benchmarks/tpch/Tests/06.stable.out sql/benchmarks/tpch/Tests/07.stable.out sql/benchmarks/tpch/Tests/08.stable.out sql/benchmarks/tpch/Tests/09.stable.out sql/benchmarks/tpch/Tests/10.stable.out sql/benchmarks/tpch/Tests/11.stable.out sql/benchmarks/tpch/Tests/14.stable.out sql/benchmarks/tpch/Tests/15.stable.out sql/benchmarks/tpch/Tests/19.stable.out sql/common/sql_types.c sql/server/rel_exp.c sql/server/rel_select.c sql/test/BugTracker-2008/Tests/extract_bug.SF-2075266.stable.out sql/test/BugTracker-2008/Tests/mul_div_bug.SF-2075135.stable.out sql/test/BugTracker-2009/Tests/arithmetic-small-values-null.SF-2921310.stable.out sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out sql/test/BugTracker-2011/Tests/non-stable-select-bug.Bug-2894.stable.out sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.stable.out Branch: Feb2013 Log Message:
Backout of changeset f8f1b9c98a40. It turns out that the parser already limits decimals to 18 digits. A simple test that failed (by inserting a 19 digit value into a column that can hold only 18 digits) and now works correctly (by giving an error message) is: create table t (i decimal(18)); insert into t values (123456789123456789); insert into t (select 9*i from t); diffs (truncated from 700 to 300 lines): diff --git a/clients/odbc/driver/SQLGetTypeInfo.c b/clients/odbc/driver/SQLGetTypeInfo.c --- a/clients/odbc/driver/SQLGetTypeInfo.c +++ b/clients/odbc/driver/SQLGetTypeInfo.c @@ -182,7 +182,7 @@ static struct types { { "bigint", /* type_name */ SQL_BIGINT, /* data_type */ - 18, /* column_size */ + 19, /* column_size */ NULL, /* literal_prefix */ NULL, /* literal_suffix */ "precision", /* create_params */ @@ -315,7 +315,7 @@ static struct types { { "numeric", /* type_name */ SQL_NUMERIC, /* data_type */ - 18, /* column_size */ + 19, /* column_size */ NULL, /* literal_prefix */ NULL, /* literal_suffix */ "precision,scale", /* create_params */ @@ -327,7 +327,7 @@ static struct types { SQL_FALSE, /* auto_unique_value */ NULL, /* local_type_name */ 0, /* minimum_scale */ - 18, /* maximum_scale */ + 19, /* maximum_scale */ SQL_NUMERIC, /* sql_data_type */ -1, /* sql_datetime_sub */ 10, /* num_prec_radix */ @@ -337,7 +337,7 @@ static struct types { { "decimal", /* type_name */ SQL_DECIMAL, /* data_type */ - 18, /* column_size */ + 19, /* column_size */ NULL, /* literal_prefix */ NULL, /* literal_suffix */ "precision,scale", /* create_params */ @@ -349,7 +349,7 @@ static struct types { SQL_FALSE, /* auto_unique_value */ NULL, /* local_type_name */ 0, /* minimum_scale */ - 18, /* maximum_scale */ + 19, /* maximum_scale */ SQL_DECIMAL, /* sql_data_type */ -1, /* sql_datetime_sub */ 10, /* num_prec_radix */ diff --git a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out @@ -52,7 +52,7 @@ Ready. % sys.lineitem, sys.lineitem, sys.L1, sys.L2, sys.L3, sys.L4, sys.L5, sys.L6, sys.L7, sys.L10 # table_name % l_returnflag, l_linestatus, sum_qty, sum_base_price, sum_disc_price, sum_charge, avg_qty, avg_price, avg_disc, count_order # name % varchar, varchar, bigint, decimal, decimal, decimal, double, double, double, wrd # type -% 1, 1, 6, 17, 20, 20, 24, 24, 24, 5 # length +% 1, 1, 6, 17, 21, 21, 24, 24, 24, 5 # length [ "A", "F", 380456, 532348211.65, 505822441.4861, 526165934.000839, 25.57515461, 35785.70931, 0.05008133907, 14876 ] [ "N", "F", 8971, 12384801.37, 11798257.2080, 12282485.056933, 25.77873563, 35588.50968, 0.04775862069, 348 ] [ "N", "O", 742802, 1041502841.45, 989737518.6346, 1029418531.523350, 25.45498783, 35691.12921, 0.04993111956, 29181 ] @@ -111,7 +111,7 @@ Ready. % sys.lineitem, sys.L1, sys.orders, sys.orders # table_name % l_orderkey, revenue, o_orderdate, o_shippriority # name % int, decimal, date, int # type -% 5, 20, 10, 1 # length +% 5, 21, 10, 1 # length [ 47714, 267010.5894, 1995-03-11, 0 ] [ 22276, 266351.5562, 1995-01-29, 0 ] [ 32965, 263768.3414, 1995-02-25, 0 ] @@ -199,7 +199,7 @@ Ready. % sys.nation, sys.L1 # table_name % n_name, revenue # name % varchar, decimal # type -% 9, 20 # length +% 9, 21 # length [ "VIETNAM", 1000926.6999 ] [ "CHINA", 740210.7570 ] [ "JAPAN", 660651.2425 ] @@ -227,7 +227,7 @@ Ready. % sys.L1 # table_name % revenue # name % decimal # type -% 20 # length +% 21 # length [ 1193053.2253 ] % .stats, .stats # table_name % rewrite, count # name @@ -269,7 +269,7 @@ Ready. % sys.shipping, sys.shipping, sys.shipping, sys.L1 # table_name % supp_nation, cust_nation, l_year, revenue # name % varchar, varchar, int, decimal # type -% 7, 7, 4, 20 # length +% 7, 7, 4, 21 # length [ "FRANCE", "GERMANY", 1995, 268068.5774 ] [ "FRANCE", "GERMANY", 1996, 303862.2980 ] [ "GERMANY", "FRANCE", 1995, 621159.4882 ] @@ -315,7 +315,7 @@ Ready. % sys.all_nations, sys.L3 # table_name % o_year, mkt_share # name % int, decimal # type -% 4, 20 # length +% 4, 21 # length [ 1995, 0.0000 ] [ 1996, 0.0000 ] % .stats, .stats # table_name @@ -357,7 +357,7 @@ Ready. % sys.profit, sys.profit, sys.L1 # table_name % nation, o_year, sum_profit # name % varchar, int, decimal # type -% 14, 4, 20 # length +% 14, 4, 21 # length [ "ALGERIA", 1998, 386617.8283 ] [ "ALGERIA", 1997, 401601.1258 ] [ "ALGERIA", 1996, 156938.7971 ] @@ -577,7 +577,7 @@ Ready. % sys.customer, sys.customer, sys.L1, sys.customer, sys.nation, sys.customer, sys.customer, sys.customer # table_name % c_custkey, c_name, revenue, c_acctbal, n_name, c_address, c_phone, c_comment # name % int, varchar, decimal, decimal, varchar, varchar, varchar, varchar # type -% 4, 18, 20, 17, 14, 40, 15, 104 # length +% 4, 18, 21, 17, 14, 40, 15, 104 # length [ 679, "Customer#000000679", 378211.3252, 1394.44, "IRAN", "IJf1FlZL9I9m,rvofcoKy5pRUOjUQV", "20-146-696-9508", "regular ideas promise against the furiously final deposits. f" ] [ 1201, "Customer#000001201", 374331.5340, 5165.39, "IRAN", "LfCSVKWozyWOGDW02g9UX,XgH5YU2o5ql1zBrN", "20-825-400-1187", "fluffily final grouches doubt. bold dependencies dazzle caref" ] [ 422, "Customer#000000422", 366451.0126, -272.14, "INDONESIA", "AyNzZBvmIDo42JtjP9xzaK3pnvkh Qc0o08ssnvq", "19-299-247-2444", "furiously ironic asymptotes are slyly ironic, ironic requests. bold," ] @@ -638,7 +638,7 @@ Ready. % sys.partsupp, sys.L1 # table_name % ps_partkey, value # name % int, decimal # type -% 4, 20 # length +% 4, 21 # length [ 1376, 13271249.89 ] #select * from optimizer_stats() stats; % .stats, .stats # table_name @@ -773,7 +773,7 @@ Ready. % .L2 # table_name % promo_revenue # name % decimal # type -% 20 # length +% 21 # length [ 15.48 ] #select * from optimizer_stats() stats; % .stats, .stats # table_name @@ -789,7 +789,7 @@ Ready. % sys.supplier, sys.supplier, sys.supplier, sys.supplier, sys.revenue0 # table_name % s_suppkey, s_name, s_address, s_phone, total_revenue # name % int, varchar, varchar, varchar, decimal # type -% 2, 18, 36, 15, 20 # length +% 2, 18, 36, 15, 21 # length [ 21, "Supplier#000000021", "81CavellcrJ0PQ3CPBID0Z0JwyJm0ka5igEs", "12-253-590-5816", 1161099.4636 ] % .stats, .stats # table_name % rewrite, count # name @@ -1246,7 +1246,7 @@ Ready. % sys.L1 # table_name % revenue # name % decimal # type -% 20 # length +% 21 # length [ 22923.0280 ] % .stats, .stats # table_name % rewrite, count # name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/01.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/01.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/01.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/01.stable.out @@ -51,7 +51,7 @@ Ready. % sys.lineitem, sys.lineitem, sys.L1, sys.L2, sys.L3, sys.L4, sys.L5, sys.L6, sys.L7, sys.L10 # table_name % l_returnflag, l_linestatus, sum_qty, sum_base_price, sum_disc_price, sum_charge, avg_qty, avg_price, avg_disc, count_order # name % varchar, varchar, bigint, decimal, decimal, decimal, double, double, double, wrd # type -% 1, 1, 6, 17, 20, 20, 24, 24, 24, 5 # length +% 1, 1, 6, 17, 21, 21, 24, 24, 24, 5 # length [ "A", "F", 380456, 532348211.65, 505822441.4861, 526165934.000839, 25.57515461, 35785.70931, 0.05008133907, 14876 ] [ "N", "F", 8971, 12384801.37, 11798257.2080, 12282485.056933, 25.77873563, 35588.50968, 0.04775862069, 348 ] [ "N", "O", 742802, 1041502841.45, 989737518.6346, 1029418531.523350, 25.45498783, 35691.12921, 0.04993111956, 29181 ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/03.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/03.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/03.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/03.stable.out @@ -43,7 +43,7 @@ Ready. % sys.lineitem, sys.L1, sys.orders, sys.orders # table_name % l_orderkey, revenue, o_orderdate, o_shippriority # name % int, decimal, date, int # type -% 5, 20, 10, 1 # length +% 5, 21, 10, 1 # length [ 47714, 267010.5894, 1995-03-11, 0 ] [ 22276, 266351.5562, 1995-01-29, 0 ] [ 32965, 263768.3414, 1995-02-25, 0 ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/05.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/05.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/05.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/05.stable.out @@ -44,7 +44,7 @@ Ready. % sys.nation, sys.L1 # table_name % n_name, revenue # name % varchar, decimal # type -% 9, 20 # length +% 9, 21 # length [ "VIETNAM", 1000926.6999 ] [ "CHINA", 740210.7570 ] [ "JAPAN", 660651.2425 ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/06.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/06.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/06.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/06.stable.out @@ -29,7 +29,7 @@ Ready. % sys.L1 # table_name % revenue # name % decimal # type -% 20 # length +% 21 # length [ 1193053.2253 ] % .stats, .stats # table_name % rewrite, count # name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/07.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/07.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/07.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/07.stable.out @@ -58,7 +58,7 @@ Ready. % sys.shipping, sys.shipping, sys.shipping, sys.L1 # table_name % supp_nation, cust_nation, l_year, revenue # name % varchar, varchar, int, decimal # type -% 7, 7, 4, 20 # length +% 7, 7, 4, 21 # length [ "FRANCE", "GERMANY", 1995, 268068.5774 ] [ "FRANCE", "GERMANY", 1996, 303862.2980 ] [ "GERMANY", "FRANCE", 1995, 621159.4882 ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/08.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/08.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/08.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/08.stable.out @@ -48,7 +48,7 @@ Ready. % sys.all_nations, sys.L3 # table_name % o_year, mkt_share # name % int, decimal # type -% 4, 20 # length +% 4, 21 # length [ 1995, 0.0000 ] [ 1996, 0.0000 ] % .stats, .stats # table_name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/09.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/09.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/09.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/09.stable.out @@ -46,7 +46,7 @@ Ready. % sys.profit, sys.profit, sys.L1 # table_name % nation, o_year, sum_profit # name % varchar, int, decimal # type -% 14, 4, 20 # length +% 14, 4, 21 # length [ "ALGERIA", 1998, 386617.8283 ] [ "ALGERIA", 1997, 401601.1258 ] [ "ALGERIA", 1996, 156938.7971 ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/10.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/10.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/10.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/10.stable.out @@ -63,7 +63,7 @@ Ready. % sys.customer, sys.customer, sys.L1, sys.customer, sys.nation, sys.customer, sys.customer, sys.customer # table_name % c_custkey, c_name, revenue, c_acctbal, n_name, c_address, c_phone, c_comment # name % int, varchar, decimal, decimal, varchar, varchar, varchar, varchar # type -% 4, 18, 20, 17, 14, 40, 15, 104 # length +% 4, 18, 21, 17, 14, 40, 15, 104 # length [ 679, "Customer#000000679", 378211.3252, 1394.44, "IRAN", "IJf1FlZL9I9m,rvofcoKy5pRUOjUQV", "20-146-696-9508", "regular ideas promise against the furiously final deposits. f" ] [ 1201, "Customer#000001201", 374331.5340, 5165.39, "IRAN", "LfCSVKWozyWOGDW02g9UX,XgH5YU2o5ql1zBrN", "20-825-400-1187", "fluffily final grouches doubt. bold dependencies dazzle caref" ] [ 422, "Customer#000000422", 366451.0126, -272.14, "INDONESIA", "AyNzZBvmIDo42JtjP9xzaK3pnvkh Qc0o08ssnvq", "19-299-247-2444", "furiously ironic asymptotes are slyly ironic, ironic requests. bold," ] diff --git a/sql/benchmarks/tpch/LOCKED/Tests/11.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/11.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/11.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/11.stable.out @@ -47,7 +47,7 @@ Ready. % sys.partsupp, sys.L1 # table_name % ps_partkey, value # name % int, decimal # type -% 4, 20 # length +% 4, 21 # length [ 1376, 13271249.89 ] #select * from optimizer_stats() stats; % .stats, .stats # table_name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/14.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/14.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/14.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/14.stable.out @@ -33,7 +33,7 @@ Ready. % .L2 # table_name % promo_revenue # name % decimal # type -% 20 # length +% 21 # length [ 15.48 ] #select * from optimizer_stats() stats; % .stats, .stats # table_name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/15.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/15.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/15.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/15.stable.out @@ -21,7 +21,7 @@ Ready. % sys.supplier, sys.supplier, sys.supplier, sys.supplier, sys.revenue0 # table_name % s_suppkey, s_name, s_address, s_phone, total_revenue # name % int, varchar, varchar, varchar, decimal # type -% 2, 18, 36, 15, 20 # length +% 2, 18, 36, 15, 21 # length [ 21, "Supplier#000000021", "81CavellcrJ0PQ3CPBID0Z0JwyJm0ka5igEs", "12-253-590-5816", 1161099.4636 ] % .stats, .stats # table_name % rewrite, count # name diff --git a/sql/benchmarks/tpch/LOCKED/Tests/19.stable.out b/sql/benchmarks/tpch/LOCKED/Tests/19.stable.out --- a/sql/benchmarks/tpch/LOCKED/Tests/19.stable.out +++ b/sql/benchmarks/tpch/LOCKED/Tests/19.stable.out @@ -52,7 +52,7 @@ Ready. % sys.L1 # table_name % revenue # name % decimal # type -% 20 # length +% 21 # length _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list