MonetDB: default - Merge with Oct2012 branch.
Changeset: c341b78e1c2e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c341b78e1c2e Added Files: sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.sql sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.err sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out Removed Files: monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.sql monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.err monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.out Modified Files: sql/backends/monet5/sql_scenario.c sql/server/sql_mvc.c Branch: default Log Message: Merge with Oct2012 branch. diffs (25 lines): diff --git a/monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.sql b/sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.sql rename from monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.sql rename to sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.sql diff --git a/monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.err b/sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.err rename from monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.err rename to sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.err --- a/monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.err +++ b/sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.err @@ -1,4 +1,4 @@ -stderr of test 'large-number-operation-strange-results.Bug-2929` in directory 'tests/BugTracker` itself: +stderr of test 'large-number-operation-strange-results.Bug-2929` in directory 'test/BugTracker-2012` itself: # 14:36:23 diff --git a/monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.out b/sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out rename from monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.out rename to sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out --- a/monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.out +++ b/sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out @@ -1,4 +1,4 @@ -stdout of test 'large-number-operation-strange-results.Bug-2929` in directory 'tests/BugTracker` itself: +stdout of test 'large-number-operation-strange-results.Bug-2929` in directory 'test/BugTracker-2012` itself: # 14:36:23 ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 76ee92d07b71 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=76ee92d07b71 Added Files: monetdb5/tests/BugTracker/Tests/kunion-and-nil.Bug-1667.mal monetdb5/tests/BugTracker/Tests/kunion-and-nil.Bug-1667.stable.err monetdb5/tests/BugTracker/Tests/kunion-and-nil.Bug-1667.stable.out monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.sql monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.err monetdb5/tests/BugTracker/Tests/large-number-operation-strange-results.Bug-2929.stable.out monetdb5/tests/BugTracker/Tests/stdev.Bug-3178.mal monetdb5/tests/BugTracker/Tests/stdev.Bug-3178.stable.err monetdb5/tests/BugTracker/Tests/stdev.Bug-3178.stable.out sql/test/BugTracker-2012/Tests/algebra_find.Bug-2728.sql sql/test/BugTracker-2012/Tests/algebra_find.Bug-2728.stable.err sql/test/BugTracker-2012/Tests/algebra_find.Bug-2728.stable.out sql/test/BugTracker-2012/Tests/conditions_when_for_triggers_do_not_work.Bug-2073.sql sql/test/BugTracker-2012/Tests/conditions_when_for_triggers_do_not_work.Bug-2073.stable.err sql/test/BugTracker-2012/Tests/conditions_when_for_triggers_do_not_work.Bug-2073.stable.out sql/test/BugTracker-2012/Tests/create_function.Bug-3172.sql sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.err sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.out sql/test/BugTracker-2012/Tests/create_index_update.Bug-3098.sql sql/test/BugTracker-2012/Tests/create_index_update.Bug-3098.stable.err sql/test/BugTracker-2012/Tests/create_index_update.Bug-3098.stable.out sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.err sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.SQL.py sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.stable.err sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.stable.out sql/test/BugTracker-2012/Tests/huge_table_update.Bug-2803.sql sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.sql sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.stable.err sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.stable.out sql/test/BugTracker-2012/Tests/insert_gives_39000_program_error.Bug-3097.sql sql/test/BugTracker-2012/Tests/insert_gives_39000_program_error.Bug-3097.stable.err sql/test/BugTracker-2012/Tests/insert_gives_39000_program_error.Bug-3097.stable.out sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.stable.err sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.stable.out sql/test/BugTracker-2012/Tests/null_except_null.Bug-3040.sql sql/test/BugTracker-2012/Tests/null_except_null.Bug-3040.stable.err sql/test/BugTracker-2012/Tests/null_except_null.Bug-3040.stable.out sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.sql sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.stable.err sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.stable.out sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.sql sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.stable.err sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.stable.out sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.sql sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.err sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.out sql/test/BugTracker-2012/Tests/strange_escaping_in_csv.Bug-2133.sql sql/test/BugTracker-2012/Tests/strange_escaping_in_csv.Bug-2133.stable.err sql/test/BugTracker-2012/Tests/strange_escaping_in_csv.Bug-2133.stable.out sql/test/BugTracker-2012/Tests/timestamp_minus_date.Bug-2977.sql sql/test/BugTracker-2012/Tests/timestamp_minus_date.Bug-2977.stable.err sql/test/BugTracker-2012/Tests/timestamp_minus_date.Bug-2977.stable.out sql/test/BugTracker-2012/Tests/tuples_INTERSECT_vs_count_intersect_differs.Bug-2659.sql sql/test/BugTracker-2012/Tests/tuples_INTERSECT_vs_count_intersect_differs.Bug-2659.stable.err sql/test/BugTracker-2012/Tests/tuples_INTERSECT_vs_count_intersect_differs.Bug-2659.stable.out sql/test/BugTracker-2012/Tests/type_resolution_error_in_SQL_procedural_code.Bug-3143.sql
MonetDB: default - Merge with Oct2012 branch, not making any cha...
Changeset: f315cc9aea46 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f315cc9aea46 Modified Files: monetdb5/mal/mal_namespace.c monetdb5/mal/mal_namespace.h Branch: default Log Message: Merge with Oct2012 branch, not making any changes. ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 74ff3932c4ae for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=74ff3932c4ae Modified Files: sql/common/sql_types.c sql/server/rel_psm.c sql/server/rel_select.c sql/test/BugTracker-2012/Tests/algebra_find.Bug-2728.sql sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.stable.out sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.stable.out sql/test/BugTracker-2012/Tests/timestamp_minus_date.Bug-2977.stable.err sql/test/BugTracker-2012/Tests/type_resolution_error_in_SQL_procedural_code.Bug-3143.stable.err Branch: default Log Message: Merge with Oct2012 branch. diffs (188 lines): diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c --- a/sql/common/sql_types.c +++ b/sql/common/sql_types.c @@ -100,7 +100,7 @@ static int convert_matrix[EC_MAX][EC_MAX /* EC_DEC */ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0 }, /* EC_FLT */ { 0, 0, 0, 1, 1, 0, 1, 3, 1, 1, 0, 0, 0, 0 }, /* EC_TIME */ { 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0 }, -/* EC_DATE */ { 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 3, 0 }, +/* EC_DATE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 3, 0 }, /* EC_TSTAMP */{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0 }, /* EC_EXTERNAL*/{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c --- a/sql/server/rel_psm.c +++ b/sql/server/rel_psm.c @@ -227,8 +227,11 @@ psm_if_then_else( mvc *sql, sql_subtype n = n-next; elsestmts = psm_if_then_else( sql, res, n, is_func); - if (sql-session-status || !cond || !ifstmts || rel) + if (sql-session-status || !cond || !ifstmts || rel) { + if (rel) + return sql_error(sql, 02, IF THEN: No SELECT statements allowed within the IF condition); return NULL; + } return append(sa_list(sql-sa), exp_if( sql-sa, cond, ifstmts, elsestmts)); } else { /* else */ symbol *e = elseif-data.sym; @@ -255,8 +258,11 @@ rel_psm_if_then_else( mvc *sql, sql_subt ifstmts = sequential_block(sql, res, n-data.lval, NULL, is_func); n = n-next; elsestmts = psm_if_then_else( sql, res, n, is_func); - if (sql-session-status || !cond || !ifstmts || rel) + if (sql-session-status || !cond || !ifstmts || rel) { + if (rel) + return sql_error(sql, 02, IF THEN ELSE: No SELECT statements allowed within the IF condition); return NULL; + } return exp_if( sql-sa, cond, ifstmts, elsestmts); } return NULL; @@ -295,8 +301,10 @@ rel_psm_case( mvc *sql, sql_subtype *res exp_kind ek = {type_value, card_value, FALSE}; sql_exp *v = rel_value_exp(sql, rel, case_value, sql_sel, ek); - if (!v || rel) + if (!v) return NULL; + if (rel) + return sql_error(sql, 02, CASE: No SELECT statements allowed within the CASE condition); if (else_statements) { else_stmt = sequential_block( sql, res, else_statements, NULL, is_func); if (!else_stmt) @@ -311,8 +319,11 @@ rel_psm_case( mvc *sql, sql_subtype *res if (!when_value || rel || (cond = rel_binop_(sql, v, when_value, NULL, =, card_value)) == NULL || - (if_stmts = sequential_block( sql, res, m-next-data.lval, NULL, is_func)) == NULL ) + (if_stmts = sequential_block( sql, res, m-next-data.lval, NULL, is_func)) == NULL ) { + if (rel) + return sql_error(sql, 02, CASE: No SELECT statements allowed within the CASE condition); return NULL; + } case_stmt = exp_if(sql-sa, cond, if_stmts, NULL); list_append(case_stmts, case_stmt); n = n-next; @@ -341,8 +352,11 @@ rel_psm_case( mvc *sql, sql_subtype *res sql_exp *case_stmt = NULL; if (!cond || rel || - (if_stmts = sequential_block( sql, res, m-next-data.lval, NULL, is_func)) == NULL ) + (if_stmts = sequential_block( sql, res, m-next-data.lval, NULL, is_func)) == NULL ) { + if (rel) + return sql_error(sql, 02, CASE: No SELECT statements allowed within the CASE condition); return NULL; + } case_stmt = exp_if(sql-sa,
MonetDB: default - Merge with Oct2012 branch, not including 822e...
Changeset: e3dde3db2775 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3dde3db2775 Branch: default Log Message: Merge with Oct2012 branch, not including 822e78b1baa5. ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 6211e231de43 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6211e231de43 Added Files: sql/test/BugTracker-2012/Tests/case_evaluated_too_early.Bug-3186.sql sql/test/BugTracker-2012/Tests/case_evaluated_too_early.Bug-3186.stable.err sql/test/BugTracker-2012/Tests/case_evaluated_too_early.Bug-3186.stable.out sql/test/BugTracker-2012/Tests/recursive_optimizer.Bug-3191.sql sql/test/BugTracker-2012/Tests/recursive_optimizer.Bug-3191.stable.err sql/test/BugTracker-2012/Tests/recursive_optimizer.Bug-3191.stable.out Modified Files: sql/benchmarks/viam/Tests/viam.sql sql/benchmarks/viam/Tests/viam.stable.out sql/server/rel_optimizer.c sql/test/BugTracker-2012/Tests/All Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 501 to 300 lines): diff --git a/sql/benchmarks/viam/Tests/viam.sql b/sql/benchmarks/viam/Tests/viam.sql --- a/sql/benchmarks/viam/Tests/viam.sql +++ b/sql/benchmarks/viam/Tests/viam.sql @@ -5,4 +5,5 @@ select s1.framenumber, avg(c.zanger_c) and s2.video_id = v.video_id and v.media_uri = '20050407_mocky.mpg' and s2.framenumber between s1.framenumber and (s1.framenumber + 124) - group by s1.framenumber; + group by s1.framenumber + order by s1.framenumber; diff --git a/sql/benchmarks/viam/Tests/viam.stable.out b/sql/benchmarks/viam/Tests/viam.stable.out --- a/sql/benchmarks/viam/Tests/viam.stable.out +++ b/sql/benchmarks/viam/Tests/viam.stable.out @@ -29,6 +29,15 @@ Ready. % int, double # type % 2, 24 # length [ 0, 0.3069530136] +[ 1, 0.3113380553] +[ 2, 0.3158491548] +[ 3, 0.3202903953] +[ 4, 0.3248978475] +[ 5, 0.3292224557] +[ 6, 0.3330400058] +[ 7, 0.3366659278] +[ 8, 0.3393862282] +[ 9, 0.3415804093] [ 10, 0.3421598259] [ 11, 0.3414150065] [ 12, 0.3382639558] @@ -39,29 +48,12 @@ Ready. [ 17, 0.3240110451] [ 18, 0.3202647068] [ 19, 0.3168082588] -[ 1, 0.3113380553] [ 20, 0.3158073029] [ 21, 0.3154659088] [ 22, 0.3139201927] [ 23, 0.3134433635] [ 24, 0.3130393499] -[ 2, 0.3158491548] -[ 3, 0.3202903953] -[ 4, 0.3248978475] -[ 5, 0.3292224557] -[ 6, 0.3330400058] -[ 7, 0.3366659278] -[ 8, 0.3393862282] -[ 9, 0.3415804093] [ 25, 0.3135247271] -[ 35, 0.3000286778] -[ 36, 0.296002269 ] -[ 37, 0.290913483 ] -[ 38, 0.2835143166] -[ 39, 0.2787728265] -[ 40, 0.2731191759] -[ 41, 0.2711542817] -[ 42, 0.2679928431] [ 26, 0.3128866098] [ 27, 0.3136826694] [ 28, 0.3143216616] @@ -71,6 +63,14 @@ Ready. [ 32, 0.3090121901] [ 33, 0.3060122738] [ 34, 0.3028020651] +[ 35, 0.3000286778] +[ 36, 0.296002269 ] +[ 37, 0.290913483 ] +[ 38, 0.2835143166] +[ 39, 0.2787728265] +[ 40, 0.2731191759] +[ 41, 0.2711542817] +[ 42, 0.2679928431] [ 43, 0.2675193019] [ 44, 0.2673059053] [ 45, 0.2655931324] @@ -79,6 +79,11 @@ Ready. [ 48, 0.2567394975] [ 49, 0.2519025657] [ 50, 0.2493345457] +[ 51, 0.2496920232] +[ 52, 0.2486809716] +[ 53, 0.2519123037] +[ 54, 0.2604823805] +[ 55, 0.271042367 ] [ 60, 0.2834349046] [ 61, 0.2985857118] [ 62, 0.3154686896] @@ -89,16 +94,11 @@ Ready. [ 67, 0.2983151227] [ 68, 0.3048942813] [ 69, 0.315040494 ] -[ 51, 0.2496920232] [ 70, 0.3288443923] [ 71, 0.3404737413] [ 72, 0.3572909931] [ 73, 0.3603464961] [ 74, 0.3620469868] -[ 52, 0.2486809716] -[ 53, 0.2519123037] -[ 54, 0.2604823805] -[ 55, 0.271042367 ] # 19:17:39 # 19:17:39 Done. diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -173,6 +173,7 @@ exp_find_column_( sql_rel *rel, sql_exp return NULL; } +/* find column for the select/join expression */ static sql_column * sjexp_col(sql_exp *e, sql_rel *r) { @@ -728,7 +729,7 @@ order_joins(mvc *sql, list *rels, list * /* complex expressions may touch multiple base tables * Should be pushed up to extra selection. * */ - if (cje-type != e_cmp || !is_complex_exp(cje-flag) /*|| + if (cje-type != e_cmp || !is_complex_exp(cje-flag) || !find_prop(cje-p, PROP_HASHCOL) /*|| (cje-type == e_cmp cje-f == NULL)*/) { l = find_one_rel(rels, cje-l); r = find_one_rel(rels, cje-r); @@ -2051,12 +2052,24 @@ exp_case_fixup( mvc *sql, sql_exp *e ) a1 = sql_div_fixup(sql, a1, cond, 0); } else if (a1-type == e_func a1-l) { a1-l = exps_case_fixup(sql, a1-l, cond, 0); +
MonetDB: default - Merge with Oct2012 branch, not including 96df...
Changeset: 5db9d0678dbe for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5db9d0678dbe Added Files: sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.sql sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.stable.err sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.stable.out sql/test/BugTracker-2012/Tests/join_over_multitable_using_index.Bug-3181.sql sql/test/BugTracker-2012/Tests/join_over_multitable_using_index.Bug-3181.stable.err sql/test/BugTracker-2012/Tests/join_over_multitable_using_index.Bug-3181.stable.out Modified Files: monetdb5/modules/kernel/algebra.mx sql/server/rel_optimizer.c sql/test/BugTracker-2012/Tests/All Branch: default Log Message: Merge with Oct2012 branch, not including 96df3b8b4bcc. diffs (truncated from 350 to 300 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -50,7 +50,7 @@ static sql_subfunc *find_func( mvc *sql, */ /* currently we only find simple column expressions */ -static sql_column * +static void * name_find_column( sql_rel *rel, char *rname, char *name, int pnr, sql_rel **bt ) { sql_exp *alias = NULL; @@ -85,6 +85,15 @@ name_find_column( sql_rel *rel, char *rn return c; } } + for (cn = t-idxs.set-h; cn; cn = cn-next) { + sql_idx *c = cn-data; + if (strcmp(c-base.name, name+1 /* skip % */) == 0) { + *bt = rel; + if (pnr 0 || (c-t-p + list_position(c-t-p-tables.set, c-t) == pnr)) + return c; + } + } break; } case op_table: @@ -136,7 +145,7 @@ name_find_column( sql_rel *rel, char *rn else alias = exps_bind_column(rel-r, alias-r, NULL); } - if (!alias rel-l) { + if (is_groupby(rel-op) !alias rel-l) { /* Group by column not found as alias in projection * list, fall back to check plain input columns */ return name_find_column( rel-l, rname, name, pnr, bt); @@ -650,8 +659,10 @@ find_fk(sql_allocator *sa, list *rels, l int swapped = 0; list *aaje = matching_joins(sa, rels, aje, je); list *eje = list_select(aaje, (void*)1, (fcmp) exp_is_eqjoin, (fdup)NULL); - sql_rel *lr = find_rel(rels, le); - sql_rel *rr = find_rel(rels, re); + sql_rel *lr = find_rel(rels, le), *olr = lr; + sql_rel *rr = find_rel(rels, re), *orr = rr; + sql_rel *bt = NULL; + char *iname; sql_table *l, *r; list *lexps = list_map(eje, lr, (fmap) joinexp_col); @@ -678,7 +689,12 @@ find_fk(sql_allocator *sa, list *rels, l swapped = 1; } - if (idx) { + if (idx (iname = sa_strconcat( sa, %, idx-base.name)) != NULL + ((!swapped name_find_column(olr, NULL, iname, -2, bt) == NULL) || + ( swapped name_find_column(orr, NULL, iname, -2, bt) == NULL))) + idx = NULL; + + if (idx) { prop *p; node *n; diff --git a/sql/test/BugTracker-2012/Tests/All b/sql/test/BugTracker-2012/Tests/All --- a/sql/test/BugTracker-2012/Tests/All +++ b/sql/test/BugTracker-2012/Tests/All @@ -48,6 +48,7 @@ insert_serial_with_unique_key.Bug-3091 with_and_exists.Bug-3099 index_column_crash.Bug-3113 foreign_key.Bug-3114 +insert_into_table_with_2_foreignkeys.Bug-3124 cast-tinyint-Bug-3137 not-equal-Bug.3139 many-columns-truncated.Bug-3161 diff --git a/sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.sql b/sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/insert_into_table_with_2_foreignkeys.Bug-3124.sql @@ -0,0 +1,11 @@ +start transaction; +create table t3 (id int auto_increment ,text varchar(8) ,primary key (id)); +create table t2 (id int auto_increment ,ds int not null ,ra double not null ,primary key (id) ,foreign key (ds) references t3 (id)) ; +create table t1 (id int auto_increment ,runcat int ,ds int not null ,ra double default 0 ,primary key (id)
MonetDB: default - Merge with Oct2012 branch.
Changeset: 446cb560e23e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=446cb560e23e Added Files: debian/libmonetdb-client6.install debian/libmonetdb8.install java/src/nl/cwi/monetdb/jdbc/types/INET.java java/src/nl/cwi/monetdb/jdbc/types/URL.java java/tests/Test_PSmetadata.java java/tests/Test_PSsqldata.java java/tests/Test_Rsqldata.java sql/jdbc/tests/Tests/Test_PSmetadata.SQL.bat sql/jdbc/tests/Tests/Test_PSmetadata.SQL.sh sql/jdbc/tests/Tests/Test_PSmetadata.stable.err sql/jdbc/tests/Tests/Test_PSmetadata.stable.out sql/jdbc/tests/Tests/Test_PSsqldata.SQL.bat sql/jdbc/tests/Tests/Test_PSsqldata.SQL.sh sql/jdbc/tests/Tests/Test_PSsqldata.stable.err sql/jdbc/tests/Tests/Test_PSsqldata.stable.out sql/jdbc/tests/Tests/Test_Rsqldata.SQL.bat sql/jdbc/tests/Tests/Test_Rsqldata.SQL.sh sql/jdbc/tests/Tests/Test_Rsqldata.stable.err sql/jdbc/tests/Tests/Test_Rsqldata.stable.out Removed Files: debian/libmonetdb-client5.install debian/libmonetdb6.install Modified Files: debian/control java/ChangeLog.Oct2012 java/Makefile.ag java/build.properties java/pom.xml java/release.txt java/src/nl/cwi/monetdb/jdbc/MonetConnection.java java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java java/src/nl/cwi/monetdb/jdbc/MonetResultSet.java java/tests/build.xml sql/jdbc/tests/Tests/All sql/test/BugTracker-2012/Tests/All Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 1828 to 300 lines): diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Standards-Version: 3.8.0 X-Python-Version: = 2.6 X-Python3-Version: = 3.0 -Package: libmonetdb6 +Package: libmonetdb8 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libmonetdb1, libmonetdb2, libmonetdb-dev @@ -57,7 +57,7 @@ Description: MonetDB stream library deve This package contains the files to develop with the libmonetdb-stream3 library. -Package: libmonetdb-client5 +Package: libmonetdb-client6 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libmonetdb-client1, libmonetdb-client2 @@ -73,14 +73,14 @@ Description: MonetDB client/server inter Package: libmonetdb-client-dev Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonetdb-client5 +Depends: ${shlibs:Depends}, ${misc:Depends}, libmonetdb-client6 Description: MonetDB client/server interface library development files MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, automatic index management, extensibility of data types and search accelerators. It also has an SQL frontend. . - This package contains the files to develop with the libmonetdb-client5 + This package contains the files to develop with the libmonetdb-client6 library. Package: monetdb-client diff --git a/debian/libmonetdb-client5.install b/debian/libmonetdb-client6.install rename from debian/libmonetdb-client5.install rename to debian/libmonetdb-client6.install diff --git a/debian/libmonetdb6.install b/debian/libmonetdb8.install rename from debian/libmonetdb6.install rename to debian/libmonetdb8.install diff --git a/java/ChangeLog.Oct2012 b/java/ChangeLog.Oct2012 --- a/java/ChangeLog.Oct2012 +++ b/java/ChangeLog.Oct2012 @@ -1,3 +1,15 @@ # ChangeLog file for java # This file is updated with Maddlog +* Fri Nov 23 2012 Fabian Groffen fab...@monetdb.org +- Implemented type map support of Connection to allow custom mapping + of UDTs to Java classes. By default the INET and URL UDTs are + now mapped to nl.cwi.monetdb.jdbc.types.{INET,URL}. Most notably, + ResultSet.getObject() and PreparedStatement.setObject() deal with the + type map. + +* Thu Nov 22 2012 Fabian Groffen fab...@monetdb.org +- Fixed a problem in PreparedStatement where the prepared statement's + ResultSetMetaData (on its columns to be produced) incorrectly threw + exceptions about non existing columns. Bug #3192 + diff --git a/java/Makefile.ag b/java/Makefile.ag --- a/java/Makefile.ag +++ b/java/Makefile.ag @@ -27,7 +27,7 @@ JAVA_HOME = @JAVA_HOME@ ant_distjdbc = { COND = HAVE_JAVAJDBC DIR = datadir/monetdb/lib - FILES = monetdb-mcl-1.8.jar monetdb-jdbc-2.7.jar jdbcclient.jar + FILES = monetdb-mcl-1.8.jar monetdb-jdbc-2.8.jar jdbcclient.jar } ant_distmerocontrol = { diff --git a/java/build.properties b/java/build.properties --- a/java/build.properties +++ b/java/build.properties @@ -19,7 +19,7 @@ MCL_MINOR=8 # major release number JDBC_MAJOR=2 # minor release number -JDBC_MINOR=7 +JDBC_MINOR=8 # an additional identifying string JDBC_VER_SUFFIX=Liberica # the default port to connect on, if no port given when using
MonetDB: default - Merge with Oct2012 branch.
Changeset: 5892f2a6584c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5892f2a6584c Modified Files: clients/mapiclient/mclient.1 monetdb5/extras/jaql/jaql.c monetdb5/extras/jaql/jaql.h monetdb5/extras/jaql/jaql.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/jaqlscenario.c monetdb5/extras/jaql/jaqltree.h monetdb5/extras/jaql/parser/jaql.l monetdb5/extras/jaql/parser/jaql.y monetdb5/modules/kernel/alarm.c tools/merovingian/client/monetdb.1 Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 629 to 300 lines): diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -1,4 +1,4 @@ -.TH MCLIENT 1 APRIL 2011 MonetDB MonetDB Applications +.TH MCLIENT 1 NOVEMBER 2012 MonetDB MonetDB Applications .SH NAME mclient \- the MonetDB command-line tool .SH SYNOPSIS @@ -17,7 +17,7 @@ mclient \- the MonetDB command-line tool MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, automatic index management, extensibility of data types and search -accelerators, SQL- and XML- frontends. +accelerators, SQL- and JAQL- frontends. .PP .I mclient is the command-line interface to the MonetDB server. diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c --- a/monetdb5/extras/jaql/jaql.c +++ b/monetdb5/extras/jaql/jaql.c @@ -1949,7 +1949,9 @@ JAQLexecute(Client cntxt, MalBlkPtr mb, jaqllex_init_extra(j, j-scanner); do { + j-timing.parse = GDKusec(); jaqlparse(j); + j-timing.parse = GDKusec() - j-timing.parse; if (j-err[0] != '\0') break; @@ -1971,7 +1973,9 @@ JAQLexecute(Client cntxt, MalBlkPtr mb, if (j-err[0] != '\0') break; + j-timing.optimise = GDKusec(); chkProgram(cntxt-fdout, cntxt-nspace, prg-def); + j-timing.optimise = GDKusec() - j-timing.optimise; if (j-explain) { printFunction(cntxt-fdout, prg-def, 0, LIST_MAL_STMT | LIST_MAPI); @@ -2208,3 +2212,37 @@ JAQLbatconcat(Client cntxt, MalBlkPtr mb *ret = b-batCacheid; return MAL_SUCCEED; } + +str +JAQLprintTimings(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) +{ + int *ret = (int *)getArgReference(stk, pci, 0); + lng *exec = (lng *)getArgReference(stk, pci, 1); + lng *trans = (lng *)getArgReference(stk, pci, 2); + jc *j = NULL; + str err; + + (void)mb; + (void)stk; + (void)pci; + + if ((err = getJAQLContext(cntxt, j)) != MAL_SUCCEED) + GDKfree(err); + + mnstr_printf(cntxt-fdout, + # [\n + #{ \parse\: %9lld },\n + #{ \gencode\: %9lld },\n + #{ \optimise\: %9lld },\n + #{ \execute\: %9lld },\n + #{ \transport\: %9lld }\n + # ]\n, + j-timing.parse, + j-timing.gencode, + j-timing.optimise, + *exec, + *trans); + + *ret = 0; + return MAL_SUCCEED; +} diff --git a/monetdb5/extras/jaql/jaql.h b/monetdb5/extras/jaql/jaql.h --- a/monetdb5/extras/jaql/jaql.h +++ b/monetdb5/extras/jaql/jaql.h @@ -43,6 +43,7 @@ jaql_export str JAQLgetVar(Client cntxt, jaql_export str JAQLsetVar(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); jaql_export str JAQLcast(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); jaql_export str JAQLbatconcat(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); +jaql_export str JAQLprintTimings(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); #endif diff --git a/monetdb5/extras/jaql/jaql.mal b/monetdb5/extras/jaql/jaql.mal --- a/monetdb5/extras/jaql/jaql.mal +++ b/monetdb5/extras/jaql/jaql.mal @@ -41,6 +41,10 @@ pattern batconcat(l:bat[:oid,:str], r:ba address JAQLbatconcat comment Return the string concatenation of the tails of both input BATs; +pattern printTimings(execute:lng, transport:lng):void +address JAQLprintTimings +comment Print timing breakdown information to stdout stream; + # scenario functions and init call command prelude() address JAQLprelude; diff --git a/monetdb5/extras/jaql/jaqlgencode.c b/monetdb5/extras/jaql/jaqlgencode.c --- a/monetdb5/extras/jaql/jaqlgencode.c +++ b/monetdb5/extras/jaql/jaqlgencode.c @@ -5427,6 +5427,7 @@
MonetDB: default - Merge with Oct2012 branch.
Changeset: db529d5806a8 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=db529d5806a8 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Oct2012 branch. diffs (63 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -506,3 +506,5 @@ d762ae2e83bd42a48aebf0ebb051a643f77f77d7 6f4501510506b9f074351d5b592a2a745b296571 Oct2012_3 4233be3c7f49f704e5ed466d2c1836c9dcfbb9f7 Oct2012_release 3c157ea4be5369d5718c7d578f10c0b934fbf2e6 Oct2012_release +55c1892e82a764a7a6003dded13a6228de3d1661 Oct2012_5 +5ba19bc11f7691610501c95ba8d0f1d9e5083a94 Oct2012_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -27,7 +27,7 @@ Vendor: MonetDB BV i...@monetdb.org Group: Applications/Databases License: MPL - http://www.monetdb.org/Legal/MonetDBLicense URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Oct2012/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Oct2012-SP1/%{name}-%{version}.tar.bz2 BuildRequires: bison BuildRequires: bzip2-devel @@ -695,6 +695,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Fri Nov 16 2012 Sjoerd Mullender sjo...@acm.org - 11.13.5-20121116 +- Rebuilt. + * Tue Oct 16 2012 Fabian Groffen fab...@monetdb.org - 11.13.3-20121016 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.13.5-20121116) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender sjo...@acm.org Fri, 16 Nov 2012 09:29:41 +0100 + monetdb (11.13.3-20121016) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=8:0:0 +GDK_VERSION=8:1:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=6:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=13:0:0 +MONETDB5_VERSION=13:1:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=4:5:1 ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 9dd60c11d6c8 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9dd60c11d6c8 Modified Files: monetdb5/extras/jaql/jaqlgencode.c sql/jdbc/tests/Tests/All sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out Branch: default Log Message: Merge with Oct2012 branch. diffs (92 lines): diff --git a/monetdb5/extras/jaql/jaqlgencode.c b/monetdb5/extras/jaql/jaqlgencode.c --- a/monetdb5/extras/jaql/jaqlgencode.c +++ b/monetdb5/extras/jaql/jaqlgencode.c @@ -3201,15 +3201,16 @@ dumpvariabletransformation(jc *j, Client assert(0); } q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); - q = pushArgument(mb, q, s); - q = pushArgument(mb, q, v); + p = copyInstruction(q); /* reuse for dbl case below */ + if (v != -1) { + q = pushArgument(mb, q, s); + q = pushArgument(mb, q, v); h = getArg(q, 0); pushInstruction(mb, q); } else { h = -1; } - p = copyInstruction(q); /* reuse for dbl case below */ if (h != -1) { q = newInstruction(mb, ASSIGNsymbol); @@ -3469,8 +3470,8 @@ dumpvariabletransformation(jc *j, Client } q = p; - getArg(q, 1) = s; - getArg(q, 2) = v; + q = pushArgument(mb, q, s); + q = pushArgument(mb, q, v); s = getArg(q, 0) = newTmpVariable(mb, TYPE_any); pushInstruction(mb, q); diff --git a/sql/jdbc/tests/Tests/All b/sql/jdbc/tests/Tests/All --- a/sql/jdbc/tests/Tests/All +++ b/sql/jdbc/tests/Tests/All @@ -4,7 +4,7 @@ HAVE_JDBCTESTS?Test_Cmanycon HAVE_JDBCTESTS?Test_Creplysize HAVE_JDBCTESTS?Test_Csavepoints HAVE_JDBCTESTS?Test_Ctransaction -HAVE_JDBCTESTS?Test_Csendthread +#HAVE_JDBCTESTS?Test_Csendthread # unfortunately has runtime-dependant output HAVE_JDBCTESTS?Test_Dobjects HAVE_JDBCTESTS?Test_PSgeneratedkeys HAVE_JDBCTESTS?Test_PSsomeamount diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out @@ -22,6 +22,19 @@ Ready. Running database upgrade commands: drop function sys.zorder_slice; +Running database upgrade commands: +create aggregate sys.stddev(val TINYINT) returns TINYINT external name aggr.stddev; +create aggregate sys.stddev(val SMALLINT) returns SMALLINT external name aggr.stddev; +create aggregate sys.stddev(val INTEGER) returns INTEGER external name aggr.stddev; +create aggregate sys.stddev(val BIGINT) returns BIGINT external name aggr.stddev; +create aggregate sys.stddev(val REAL) returns REAL external name aggr.stddev; +create aggregate sys.stddev(val DOUBLE) returns DOUBLE external name aggr.stddev; +create aggregate sys.stddev(val DATE) returns DATE external name aggr.stddev; +create aggregate sys.stddev(val TIME) returns TIME external name aggr.stddev; +create aggregate sys.stddev(val TIMESTAMP) returns TIMESTAMP external name aggr.stddev; +insert into sys.systemfunctions (select f.id from sys.functions f, sys.schemas s where f.name = 'stddev' and f.type = 3 and f.schema_id = s.id and s.name = 'sys'); + + # 15:17:06 # 15:17:06 /usr/bin/python upgrade.SQL.py upgrade # 15:17:06 diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out b/sql/test/testdb-upgrade/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out @@ -22,6 +22,19 @@ Ready. Running database upgrade commands: drop function sys.zorder_slice; +Running database upgrade commands: +create aggregate sys.stddev(val TINYINT) returns TINYINT external name aggr.stddev; +create aggregate sys.stddev(val SMALLINT) returns SMALLINT external name aggr.stddev; +create aggregate sys.stddev(val INTEGER) returns INTEGER external name aggr.stddev; +create aggregate sys.stddev(val BIGINT) returns BIGINT external name aggr.stddev; +create aggregate sys.stddev(val REAL) returns REAL external name aggr.stddev; +create aggregate sys.stddev(val DOUBLE) returns DOUBLE external name aggr.stddev; +create aggregate sys.stddev(val DATE) returns DATE external name aggr.stddev; +create aggregate sys.stddev(val TIME) returns TIME external name aggr.stddev; +create aggregate sys.stddev(val TIMESTAMP) returns TIMESTAMP external name aggr.stddev; +insert into sys.systemfunctions (select f.id
MonetDB: default - Merge with Oct2012 branch.
Changeset: 9b3cc21644b4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b3cc21644b4 Added Files: sql/test/BugTracker-2012/Tests/aggregate_incorrect_precision_scale.Bug-3182.sql sql/test/BugTracker-2012/Tests/aggregate_incorrect_precision_scale.Bug-3182.stable.err sql/test/BugTracker-2012/Tests/aggregate_incorrect_precision_scale.Bug-3182.stable.out Modified Files: gdk/gdk_align.c monetdb5/extras/jaql/Tests/plan00.stable.out monetdb5/extras/jaql/jaql.c monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/jaqltests/Tests/All monetdb5/extras/jaql/jaqltests/Tests/calculations.stable.out monetdb5/mal/Tests/tst601.mal monetdb5/mal/Tests/tst601.stable.out monetdb5/mal/mal_box.c sql/backends/monet5/sql_scenario.c sql/scripts/39_analytics.sql sql/server/rel_select.c sql/test/BugTracker-2012/Tests/All sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.err sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out sql/test/Tests/systemfunctions.stable.out sql/test/leaks/Tests/check0.stable.out sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check5.stable.out sql/test/mapi/Tests/php_monetdb.stable.out Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 885 to 300 lines): diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -721,8 +721,16 @@ VIEWreset(BAT *b) /* reset capacity */ n-U-capacity = cnt; + /* swap n and v in case the original input was reversed, because +* BATins demands (v)oid-headed input */ + if (b-batCacheid 0) { + n = m; + m = BATmirror(v); + } else { + m = v; + } /* insert all of v in n, and quit */ - BATins(n, v, FALSE); + BATins(n, m, FALSE); BBPreclaim(v); BBPunfix(n-batCacheid); } diff --git a/monetdb5/extras/jaql/Tests/plan00.stable.out b/monetdb5/extras/jaql/Tests/plan00.stable.out --- a/monetdb5/extras/jaql/Tests/plan00.stable.out +++ b/monetdb5/extras/jaql/Tests/plan00.stable.out @@ -58,10 +58,10 @@ A as $ - expand: $.ids = result [1,2,3] as $ - transform: { value: $ } [1,2,3] = result [1,2,3] as $ - transform: ( $ * 2 ) -[1,2,3] as $ - transform: ( $ * 2 ) +[1,2,3] as $ - transform: ( 2 * $ ) [1,2,3] as $ - transform: 4 -[1,2,3] as $ - transform: ( ( $ * 2 ) * 2 ) -[1,2,3] as $ - transform: ( ( $ * 2.00 ) * 2 ) +[1,2,3] as $ - transform: ( 2 * ( $ * 2 ) ) +[1,2,3] as $ - transform: ( 2 * ( 2.00 * $ ) ) [1,2,3] as $ - transform: ( ( $ * 2.00 ) / 4 ) as users in users , pages in pages - join: where ( ( users.id == pages.userid ) ) into { name: users.name , url: pages.url } as u in users , p in pages - join: where ( ( u.id == p.userid ) ) into { name: u.name , url: p.url } diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c --- a/monetdb5/extras/jaql/jaql.c +++ b/monetdb5/extras/jaql/jaql.c @@ -1186,66 +1186,59 @@ make_operation(tree *var1, tree *op, tre return res; } - if (var1-type != j_var var1-type != j_operation) { - /* left is value (literal) */ - if (var2-type == j_var || var2-type == j_operation) { - /* right is var, or another operation, swap (want the var -* left eventually (if any)) */ - tree *t = var1; - var1 = var2; - var2 = t; - } else { - /* right is literal, pre-compute the value -* only cases left are number/double combinations */ - if (var1-type == j_num) - var1-dval = (double)var1-nval; - if (var2-type == j_num) - var2-dval = (double)var2-nval; - switch (op-cval) { - case j_plus: - if (var1-type == j_dbl || var2-type == j_dbl) { - res-type = j_dbl; - res-dval = var1-dval + var2-dval; - } else { - res-type = j_num; - res-nval = var1-nval + var2-nval; - } - break; - case j_min:
MonetDB: default - Merge with Oct2012 branch.
Changeset: 8c0a7dc23f11 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c0a7dc23f11 Modified Files: monetdb5/mal/Tests/tst274.stable.out monetdb5/mal/mal_box.c monetdb5/modules/mal/const.mal Branch: default Log Message: Merge with Oct2012 branch. diffs (65 lines): diff --git a/monetdb5/mal/Tests/tst274.stable.out b/monetdb5/mal/Tests/tst274.stable.out --- a/monetdb5/mal/Tests/tst274.stable.out +++ b/monetdb5/mal/Tests/tst274.stable.out @@ -66,7 +66,7 @@ end main; [ 1@0, 0 ] [ 2@0, 0 ] [ 3@0, 0 ] -[ 4@0, 12 ] +[ 4@0, 0 ] [ 5@0, 0 ] [ 6@0, 0 ] #-# @@ -88,7 +88,7 @@ end main; [ 1@0, 0, 12 ] [ 2@0, 0, 0 ] [ 3@0, 0, 0 ] -[ 4@0, 12, 12 ] +[ 4@0, 0, 12 ] [ 5@0, 0, 12 ] [ 6@0, 0, 0 ] diff --git a/monetdb5/mal/mal_box.c b/monetdb5/mal/mal_box.c --- a/monetdb5/mal/mal_box.c +++ b/monetdb5/mal/mal_box.c @@ -358,12 +358,15 @@ destroyBox(str name) for (i = j = 0; i topbox; i++) { if (idcmp(malbox[i]-name, name) == 0) { freeMalBlk(malbox[i]-sym); + malbox[i]-sym = NULL; if ( malbox[i]-val) freeStack(malbox[i]-val); + malbox[i]-val = NULL; boxfile = boxFileName(malbox[i], 0); unlink(boxfile); GDKfree(boxfile); GDKfree(malbox[i]-name); + malbox[i]-name = NULL; MT_lock_destroy(malbox[i]-lock); } else { if (j i) @@ -371,6 +374,8 @@ destroyBox(str name) j++; } } + for (i = j; i topbox; i++) + malbox[i] = NULL; topbox = j; MT_lock_unset(mal_contextLock, destroyBox); } diff --git a/monetdb5/modules/mal/const.mal b/monetdb5/modules/mal/const.mal --- a/monetdb5/modules/mal/const.mal +++ b/monetdb5/modules/mal/const.mal @@ -48,10 +48,10 @@ comment Get the string representation o pattern discard(name:any_1) :void address CSTdiscard comment Release the const from the box.; -pattern newIterator()(:lng,:str) +pattern newIterator()(:oid,:str) address CSTnewIterator comment Locate next element in the box.; -pattern hasMoreElements()(:lng,:str) +pattern hasMoreElements()(:oid,:str) address CSThasMoreElements comment Locate next element in the box.; ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 05426c8cd12b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05426c8cd12b Modified Files: monetdb5/extras/jaql/Tests/transform00.stable.out monetdb5/extras/jaql/jaql.c monetdb5/extras/jaql/jaql.h monetdb5/extras/jaql/jaql.mal monetdb5/extras/jaql/jaqlfunc.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/jaqltests/Tests/calculations.jaql monetdb5/extras/jaql/jaqltests/Tests/calculations.stable.out monetdb5/mal/mal_instruction.c Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 541 to 300 lines): diff --git a/monetdb5/extras/jaql/Tests/transform00.stable.out b/monetdb5/extras/jaql/Tests/transform00.stable.out --- a/monetdb5/extras/jaql/Tests/transform00.stable.out +++ b/monetdb5/extras/jaql/Tests/transform00.stable.out @@ -15,7 +15,6 @@ stdout of test 'transform00` in director # Listening for connection requests on mapi:monetdb://sofia.ins.cwi.nl:35341/ # MonetDB/GIS module loaded # MonetDB/SQL module loaded -# MonetDB/DataCell module not loaded: MALException:jaql.context:JAQL environment not found function user.main():void; jaql.x([1,2,3] - transform 2 * 2;); jaql.x([1,2,3] - transform {\value\:2 + 2};); diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c --- a/monetdb5/extras/jaql/jaql.c +++ b/monetdb5/extras/jaql/jaql.c @@ -1162,8 +1162,9 @@ make_op(enum comptype t) /* create an operation over two vars/literals, apply some simple rules * to reduce work lateron (e.g. static calculations) - * return is either a j_num, j_dbl or j_operation with tval1 being j_val - * or j_operation and tval2 being j_num, j_dbl, j_val or j_operation */ + * return is either a j_num, j_dbl, j_str or j_operation with tval1 + * being j_val or j_operation and tval2 being j_num, j_dbl, j_val or + * j_operation */ tree * make_operation(tree *var1, tree *op, tree *var2) { @@ -1173,13 +1174,13 @@ make_operation(tree *var1, tree *op, tre assert(op != NULL op-type == j_op); assert(var2 != NULL); - if (var1-type == j_bool || var1-type == j_str || - var2-type == j_bool || var2-type == j_str) + if (var1-type == j_bool || var1-type == j_null || + var2-type == j_bool || var2-type == j_null) { /* we can't do arithmetic with these */ res-type = j_error; res-sval = GDKstrdup(transform: cannot perform arithmetic on - string or boolean values); + null or boolean values); freetree(var1); freetree(op); freetree(var2); @@ -1197,7 +1198,32 @@ make_operation(tree *var1, tree *op, tre var2-dval = (double)var2-nval; switch (op-cval) { case j_plus: - if (var1-type == j_dbl || var2-type == j_dbl) { + if (var1-type == j_str || var2-type == j_str) { + size_t tsize; + + if (var1-type != var2-type) { + res-type = j_error; + res-sval = GDKstrdup(transform: can only concatenate + two strings); + freetree(var1); + freetree(op); + freetree(var2); + return res; + } + + tsize = strlen(var1-sval) + strlen(var2-sval) + 1; + res-type = j_str; + if ((res-sval = GDKmalloc(tsize)) == NULL) { + res-type = j_error; + res-sval = GDKstrdup(transform: str concat: + out of memory); + freetree(var1); + freetree(op); + freetree(var2); + return res; + } + snprintf(res-sval, tsize, %s%s, var1-sval, var2-sval); + } else if (var1-type == j_dbl || var2-type == j_dbl) { res-type = j_dbl; res-dval = var1-dval + var2-dval; } else { @@ -1206,7 +1232,15 @@ make_operation(tree *var1, tree *op, tre }
MonetDB: default - Merge with Oct2012 branch; not changing any f...
Changeset: 0cc66df1a5e9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0cc66df1a5e9 Modified Files: sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out sql/test/Tests/systemfunctions.stable.out sql/test/leaks/Tests/check0.stable.out sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check5.stable.out sql/test/mapi/Tests/php_monetdb.stable.out Branch: default Log Message: Merge with Oct2012 branch; not changing any files, as the approvals of changeset 5e8122756643 were already done in changeset 9b3cc21644b4 ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 54d545343a55 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54d545343a55 Added Files: java/tests/Test_Csendthread.java sql/jdbc/tests/Tests/Test_Csendthread.SQL.bat sql/jdbc/tests/Tests/Test_Csendthread.SQL.sh sql/jdbc/tests/Tests/Test_Csendthread.stable.err sql/jdbc/tests/Tests/Test_Csendthread.stable.out Modified Files: buildtools/autogen/autogen/am.py configure.ag debian/monetdb5-server.install debian/monetdb5-sql.install java/Makefile.ag java/build.properties java/pom.xml java/release.txt java/src/nl/cwi/monetdb/jdbc/MonetConnection.java java/tests/build.xml monetdb5/optimizer/opt_centipede.c sql/jdbc/tests/Tests/All Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 733 to 300 lines): diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py --- a/buildtools/autogen/autogen/am.py +++ b/buildtools/autogen/autogen/am.py @@ -1133,7 +1133,7 @@ def am_includes(fd, var, values, am): else: incs = incs + -I + am_translate_dir(i, am) \ + am_add_srcdir(i, am, -I) -fd.write(INCLUDES = + incs + \n) +fd.write(AM_CPPFLAGS = + incs + \n) output_funcs = {'SUBDIRS': am_subdirs, 'EXTRA_DIST': am_extra_dist, diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -870,80 +870,59 @@ if test x$enable_optim = xyes; then JAVACFLAGS=$JAVACFLAGS -g:none -O case $GCC-$CC in yes-*clang*) - CFLAGS=$CFLAGS -O3 -fomit-frame-pointer -finline-functions + CFLAGS=$CFLAGS -O3 -fomit-frame-pointer -finline-functions ;; yes-*) dnl -fomit-frame-pointer crashes memprof - case $host-$gcc_ver in - powerpc*-apple-darwin*) - # -fast switch causes arithmetic differences, and slower - # running code for SQL, some faster for M5, so we don't use - # it. Instead we just run with modest -O3 and - # -fomit-frame-pointer (we don't intend to debug the binary). - CFLAGS=-O3 -fomit-frame-pointer -pipe ${CFLAGS} - ;; - i?86-apple-darwin*|x86_64-apple-darwin*) - # -fast switch on Intel is a lot less tuned, and hence safer: - # -O3 -fomit-frame-pointer -fstrict-aliasing - # -momit-leaf-frame-pointer -fno-tree-pre -falign-loops - CFLAGS=-fast -pipe ${CFLAGS} - ;; -*) - # -O1 on gcc enables all slight optimisations: - # -fauto-inc-dec -fcprop-registers -fdce -fdefer-pop - # -fdelayed-branch -fdse -fguess-branch-probability - # -fif-conversion2 -fif-conversion -fipa-pure-const - # -fipa-reference -fmerge-constants -fsplit-wide-types - # -ftree-builtin-call-dce -ftree-ccp -ftree-ch - # -ftree-copyrename -ftree-dce -ftree-dominator-opts - # -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop - # -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time - # on top of this -fomit-frame-pointer is enabled on machines - # where this does not interfere with debugging. - # -O2 on gcc enables optimisations which do not involve a - # speed-space tradeoff on top of -O1: - # -fthread-jumps -falign-functions -falign-jumps - # -falign-loops -falign-labels -fcaller-saves -fcrossjumping - # -fcse-follow-jumps -fcse-skip-blocks - # -fdelete-null-pointer-checks -fexpensive-optimizations - # -fgcse -fgcse-lm -finline-small-functions - # -findirect-inlining -fipa-sra -foptimize-sibling-calls - # -fpeephole2 -fregmove -freorder-blocks -freorder-functions - # -frerun-cse-after-loop -fsched-interblock -fsched-spec - # -fschedule-insns -fschedule-insns2 -fstrict-aliasing - # -fstrict-overflow -ftree-switch-conversion -ftree-pre - # -ftree-vrp - # (Gentoo enables -D_FORTIFY_SOURCE=2 starting at -O2) - # -O3 on gcc enables some more expensive optimisations on top - # of -O2: - # -finline-functions, -funswitch-loops, - # -fpredictive-commoning, -fgcse-after-reload, - # -ftree-vectorize and -fipa-cp-clone - CFLAGS=-O3 -fomit-frame-pointer -pipe ${CFLAGS} - # because we explicitly disable debugging, we can explicitly - # enable -fomit-frame-pointer here - # notes on -funroll-all-loops: - # - does
MonetDB: default - Merge with Oct2012 branch.
Changeset: b04142aa578b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b04142aa578b Added Files: sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.sql sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.stable.err sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.stable.out Modified Files: configure.ag sql/test/BugTracker-2012/Tests/All testing/Mtest.py.in Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 410 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2220,7 +2220,11 @@ yes|auto) fi if test x$have_geos != xno; then GEOS_INCS=`$GEOS_CONFIG --cflags` - GEOS_LIBS=`$GEOS_CONFIG --libs | sed 's:-lgeos:-lgeos_c:'` + if GEOS_LIBS=`$GEOS_CONFIG --clibs 2 /dev/null`; then + : + else + GEOS_LIBS=`$GEOS_CONFIG --libs | sed 's:-lgeos:-lgeos_c:'` + fi fi if test x$have_geos = xno; then if test x$enable_geom = xyes; then diff --git a/sql/test/BugTracker-2012/Tests/All b/sql/test/BugTracker-2012/Tests/All --- a/sql/test/BugTracker-2012/Tests/All +++ b/sql/test/BugTracker-2012/Tests/All @@ -50,3 +50,4 @@ index_column_crash.Bug-3113 foreign_key.Bug-3114 cast-tinyint-Bug-3137 not-equal-Bug.3139 +many-columns-truncated.Bug-3161 diff --git a/sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.sql b/sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.sql @@ -0,0 +1,215 @@ +create table household ( +RT VARCHAR(255), +SERIALNO INT, +DIVISION INT, +PUMA INT, +REGION INT, +ST INT, +ADJHSG INT, +ADJINC INT, +WGTP INT, +NP INT, + INT, +ACR INT, +AGS INT, +BATH INT, +BDSP INT, +BLD INT, +BUS INT, +CONP INT, +ELEP INT, +FS INT, +FULP INT, +GASP INT, +HFL INT, +INSP INT, +MHP INT, +MRGI INT, +MRGP INT, +MRGT INT, +MRGX INT, +REFR INT, +RMSP INT, +RNTM INT, +RNTP INT, +RWAT INT, +SINK INT, +SMP INT, +STOV INT, +TEL INT, +TEN INT, +TOIL INT, +VACS INT, +VALP INT, +VEH INT, +WATP INT, +YBL INT, +FES INT, +FINCP INT, +FPARC INT, +GRNTP INT, +GRPIP INT, +HHL INT, +HHT INT, +HINCP INT, +HUGCL INT, +HUPAC INT, +HUPAOC INT, +HUPARC INT, +KIT INT, +LNGI INT, +MULTG INT, +MV INT, +NOC INT, +NPF INT, +NPP INT, +NR INT, +NRC INT, +OCPIP INT, +PARTNER INT, +PLM INT, +PSF INT, +R18 INT, +R60 INT, +R65 INT, +RESMODE INT, +SMOCP INT, +SMX INT, +SRNT INT, +SVAL INT, +TAXP INT, +WIF INT, +WKEXREL INT, +WORKSTAT INT, +FACRP INT, +FAGSP INT, +FBATHP INT, +FBDSP INT, +FBLDP INT, +FBUSP INT, +FCONP INT, +FELEP INT, +FFSP INT, +FFULP INT, +FGASP INT, +FHFLP INT, +FINSP INT, +FKITP INT, +FMHP INT, +FMRGIP INT, +FMRGP INT, +FMRGTP INT, +FMRGXP INT, +FMVP INT, +FPLMP INT, +FREFRP INT, +FRMSP INT, +FRNTMP INT, +FRNTP INT, +FRWATP INT, +FSINKP INT, +FSMP INT, +FSMXHP INT, +FSMXSP INT, +FSTOVP INT, +FTAXP INT, +FTELP INT, +FTENP INT, +FTOILP INT, +FVACSP INT, +FVALP INT, +FVEHP INT, +FWATP INT, +FYBLP INT, +wgtp1 INT, +wgtp2 INT, +wgtp3 INT, +wgtp4 INT, +wgtp5 INT, +wgtp6 INT, +wgtp7 INT, +wgtp8 INT, +wgtp9 INT, +wgtp10 INT, +wgtp11 INT, +wgtp12 INT, +wgtp13 INT, +wgtp14 INT, +wgtp15 INT, +wgtp16 INT, +wgtp17 INT, +wgtp18 INT, +wgtp19 INT, +wgtp20 INT, +wgtp21 INT, +wgtp22 INT, +wgtp23 INT, +wgtp24 INT, +wgtp25 INT, +wgtp26 INT, +wgtp27 INT, +wgtp28 INT, +wgtp29 INT, +wgtp30 INT, +wgtp31 INT, +wgtp32 INT, +wgtp33 INT, +wgtp34 INT, +wgtp35 INT, +wgtp36 INT, +wgtp37 INT, +wgtp38 INT, +wgtp39 INT, +wgtp40 INT, +wgtp41 INT, +wgtp42 INT, +wgtp43 INT, +wgtp44 INT, +wgtp45 INT, +wgtp46 INT, +wgtp47 INT, +wgtp48 INT, +wgtp49 INT, +wgtp50 INT, +wgtp51 INT, +wgtp52 INT, +wgtp53 INT, +wgtp54 INT, +wgtp55 INT, +wgtp56 INT, +wgtp57 INT, +wgtp58 INT, +wgtp59 INT, +wgtp60 INT, +wgtp61 INT, +wgtp62 INT, +wgtp63 INT, +wgtp64 INT, +wgtp65 INT, +wgtp66 INT, +wgtp67 INT, +wgtp68 INT, +wgtp69 INT, +wgtp70 INT, +wgtp71 INT, +wgtp72 INT, +wgtp73 INT, +wgtp74 INT, +wgtp75 INT, +wgtp76 INT, +wgtp77 INT, +wgtp78
MonetDB: default - Merge with Oct2012 branch.
Changeset: a2caff28f0c3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2caff28f0c3 Added Files: monetdb5/extras/jaql/jaqltests/Tests/calculations.jaql monetdb5/extras/jaql/jaqltests/Tests/calculations.stable.err monetdb5/extras/jaql/jaqltests/Tests/calculations.stable.out Modified Files: HowToStart.rst monetdb5/extras/jaql/Tests/func00.mal monetdb5/extras/jaql/Tests/func00.stable.out monetdb5/extras/jaql/jaqlfunc.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/modules/mal/tablet.c Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 352 to 300 lines): diff --git a/HowToStart.rst b/HowToStart.rst --- a/HowToStart.rst +++ b/HowToStart.rst @@ -164,8 +164,7 @@ development sources on your computer. hg clone http://dev.monetdb.org/hg/MonetDB This will create the directory MonetDB in your current working directory -with underneath all subcomponents. Then first follow the instructions -in ``buildtools/README`` before continuing with the others. +with underneath all subcomponents. Bootstrap, Configure and Make diff --git a/monetdb5/extras/jaql/Tests/func00.mal b/monetdb5/extras/jaql/Tests/func00.mal --- a/monetdb5/extras/jaql/Tests/func00.mal +++ b/monetdb5/extras/jaql/Tests/func00.mal @@ -1,3 +1,6 @@ # test of native functions (all inputs/outputs are json arrays) jaql.x(arrayToRecord([\DEF\, \ABC\], [123, 456]);); jaql.x(arrayToRecord([\DEF\, \ABC\], [456]);); + +jaql.x(pairwise([\DEF\, \ABC\], [123, 456]);); +jaql.x(pairwise([\DEF\, \ABC\], [456]);); diff --git a/monetdb5/extras/jaql/Tests/func00.stable.out b/monetdb5/extras/jaql/Tests/func00.stable.out --- a/monetdb5/extras/jaql/Tests/func00.stable.out +++ b/monetdb5/extras/jaql/Tests/func00.stable.out @@ -20,9 +20,13 @@ function user.main():void; # test of native functions (all inputs/outputs are json arrays) jaql.x(arrayToRecord([\DEF\, \ABC\], [123, 456]);); jaql.x(arrayToRecord([\DEF\, \ABC\], [456]);); +jaql.x(pairwise([\DEF\, \ABC\], [123, 456]);); +jaql.x(pairwise([\DEF\, \ABC\], [456]);); end main; { DEF: 123, ABC: 456 } { DEF: 456, ABC: null } +[ [ DEF, 123 ], [ ABC, 456 ] ] +[ [ DEF, 456 ], [ ABC, null ] ] # 21:34:47 # 21:34:47 Done. diff --git a/monetdb5/extras/jaql/jaqlfunc.mal b/monetdb5/extras/jaql/jaqlfunc.mal --- a/monetdb5/extras/jaql/jaqlfunc.mal +++ b/monetdb5/extras/jaql/jaqlfunc.mal @@ -20,6 +20,7 @@ module jaqlfunc; # generate a JSON record by merging two JSON arrays +# http://code.google.com/p/jaql/wiki/Builtin_functions#arrayToRecord() function arrayToRecord(kindn:bat[:oid,:bte],stringn:bat[:oid,:str],integern:bat[:oid,:lng],doublen:bat[:oid,:dbl],arrayn:bat[:oid,:oid],objectn:bat[:oid,:oid],namen:bat[:oid,:str],kindv:bat[:oid,:bte],stringv:bat[:oid,:str],integerv:bat[:oid,:lng],doublev:bat[:oid,:dbl],arrayv:bat[:oid,:oid],objectv:bat[:oid,:oid],namev:bat[:oid,:str])(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]); r1 := bat.new(:oid,:bte); r2 := bat.new(:oid,:str); @@ -78,6 +79,56 @@ function arrayToRecord(kindn:bat[:oid,:b return (r1,r2,r3,r4,r5,r6,r7); end arrayToRecord; +# combine two arrays (A,B) into one array C +# http://code.google.com/p/jaql/wiki/Builtin_functions#pairwise() +function pairwise(kindn:bat[:oid,:bte],stringn:bat[:oid,:str],integern:bat[:oid,:lng],doublen:bat[:oid,:dbl],arrayn:bat[:oid,:oid],objectn:bat[:oid,:oid],namen:bat[:oid,:str],kindv:bat[:oid,:bte],stringv:bat[:oid,:str],integerv:bat[:oid,:lng],doublev:bat[:oid,:dbl],arrayv:bat[:oid,:oid],objectv:bat[:oid,:oid],namev:bat[:oid,:str])(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]); + nextid := json.nextid(kindn); + + # re-base second json to be appended to the first + elems := algebra.selectH(arrayv, 0@0); + (v1,v2,v3,v4,v5,v6,v7) := json.extract(kindv, stringv, integerv, doublev, arrayv, objectv, namev, elems, nextid); + + u1 := bat.insert(kindn, v1); + u2 := bat.insert(stringn, v2); + u3 := bat.insert(integern, v3); + u4 := bat.insert(doublen, v4); + u5 := bat.insert(arrayn, v5); + u6 := bat.insert(objectn, v6); + u7 := bat.insert(namen, v7); + + # construct arrays with values from n and v, the size of n is + # leading, that is, we pad with nulls on v, but don't pad nulls on n + # when v is larger + elemsn := algebra.selectH(u5, 0@0); + elemsv := algebra.selectH(u5, nextid); + + nullid := json.nextid(u1); + u1 := bat.insert(u1, nullid, 110:bte); # n + + nextid := json.nextid(u1); + + t1 := algebra.project(elemsn, 97:bte); # a + t2 := algebra.markH(t1, nextid); + + t3 := algebra.markH(elemsn, nextid); + t4 :=
MonetDB: default - Merge with Oct2012 branch, not changing any f...
Changeset: 352f9cc65fad for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=352f9cc65fad Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py clients/python3/setup.py configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Oct2012 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: e72a64880cf7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e72a64880cf7 Modified Files: .hgtags MonetDB.spec debian/changelog java/ChangeLog-Archive java/ChangeLog.Oct2012 Branch: default Log Message: Merge with Oct2012 branch. diffs (62 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -695,6 +695,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Tue Oct 16 2012 Fabian Groffen fab...@monetdb.org - 11.13.3-20121016 +- Rebuilt. + +* Wed Oct 10 2012 Fabian Groffen fab...@cwi.nl - 11.13.3-20121016 +- java: Fixed problem with PreparedStatements and setXXX() methods using column + numbers instead of names, bug #3158 + * Wed Oct 10 2012 Fabian Groffen fab...@monetdb.org - 11.13.1-20121010 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +monetdb (11.13.3-20121016) unstable; urgency=low + + * Rebuilt. + + -- Fabian Groffen fab...@monetdb.org Tue, 16 Oct 2012 13:02:31 +0200 + +monetdb (11.13.3-20121016) unstable; urgency=low + + * java: Fixed problem with PreparedStatements and setXXX() methods using column +numbers instead of names, bug #3158 + + -- Fabian Groffen fab...@cwi.nl Wed, 10 Oct 2012 13:02:30 +0200 + monetdb (11.13.1-20121010) unstable; urgency=low * Rebuilt. diff --git a/java/ChangeLog-Archive b/java/ChangeLog-Archive --- a/java/ChangeLog-Archive +++ b/java/ChangeLog-Archive @@ -1,6 +1,10 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Wed Oct 10 2012 Fabian Groffen fab...@cwi.nl - 11.13.3-20121016 +- Fixed problem with PreparedStatements and setXXX() methods using column + numbers instead of names, bug #3158 + * Tue Aug 14 2012 Fabian Groffen fab...@cwi.nl - 11.11.9-20120911 - Fixed a bug where DatabaseMetaData.getURL() did return null:0 for hostname:port. diff --git a/java/ChangeLog.Oct2012 b/java/ChangeLog.Oct2012 --- a/java/ChangeLog.Oct2012 +++ b/java/ChangeLog.Oct2012 @@ -1,7 +1,3 @@ # ChangeLog file for java # This file is updated with Maddlog -* Wed Oct 10 2012 Fabian Groffen fab...@cwi.nl -- Fixed problem with PreparedStatements and setXXX() methods using column - numbers instead of names, bug #3158 - ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch, not changing any f...
Changeset: 347210716e69 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=347210716e69 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py clients/python3/setup.py configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Oct2012 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 24ee6edbf335 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24ee6edbf335 Modified Files: .hgtags MonetDB.spec buildtools/ChangeLog-Archive buildtools/ChangeLog.Oct2012 clients/ChangeLog-Archive clients/ChangeLog.Oct2012 debian/changelog gdk/ChangeLog-Archive gdk/ChangeLog.Oct2012 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Oct2012 tools/merovingian/ChangeLog-Archive tools/merovingian/ChangeLog.Oct2012 Branch: default Log Message: Merge with Oct2012 branch. diffs (300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -500,3 +500,5 @@ f21bc494423c56e9cb68bae0b400e1f2a6d0c2bc 3350908e3e6786034cea69f151e22f841eb3b49a Jul2012_11 f21bc494423c56e9cb68bae0b400e1f2a6d0c2bc Jul2012_SP2_release f8e913e56b99223764b1c22f526087d6bcad2656 Jul2012_SP2_release +2d08000a18ddbe8f2cc3f12e09b6def8e53ae53a Oct2012_1 +4233be3c7f49f704e5ed466d2c1836c9dcfbb9f7 Oct2012_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -27,7 +27,7 @@ Vendor: MonetDB BV i...@monetdb.org Group: Applications/Databases License: MPL - http://www.monetdb.org/Legal/MonetDBLicense URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Jul2012-SP2/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Oct2012/%{name}-%{version}.tar.bz2 BuildRequires: bison BuildRequires: bzip2-devel @@ -695,6 +695,41 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Wed Oct 10 2012 Fabian Groffen fab...@monetdb.org - 11.13.1-20121010 +- Rebuilt. + +* Tue Oct 9 2012 Fabian Groffen fab...@cwi.nl - 11.13.1-20121010 +- merovingian: Fixed problem where monetdbd would refuse to startup when discovery + was set to false, bug #3155 + +* Tue Sep 25 2012 Sjoerd Mullender sjo...@acm.org - 11.13.1-20121010 +- monetdb5: Removed module attach since it wasn't used or even tested. + +* Mon Sep 17 2012 Fabian Groffen fab...@cwi.nl - 11.13.1-20121010 +- clients: mclient now accepts URIs as database to connect to. + +* Mon Sep 17 2012 Fabian Groffen fab...@cwi.nl - 11.13.1-20121010 +- monetdb5: The MAL-to-C Compiler (mcc) was removed. The code wasn't tested and + most likely non-functional. + +* Mon Sep 17 2012 Sjoerd Mullender sjo...@acm.org - 11.13.1-20121010 +- gdk: Removed the gdk_embedded (and embedded) option. The code wasn't tested + and most likely non-functional. + +* Mon Sep 17 2012 Gijs Molenaar g.j.molen...@uva.nl - 11.13.1-20121010 +- clients: all strings returned by python2 are unicode, removed use_unicode option +- clients: python2 and 3 type convertion speed improvements +- clients: python2 uses new styl objects now (bug #3104) +- clients: split python2 and python3 + +* Mon Sep 17 2012 Sjoerd Mullender sjo...@acm.org - 11.13.1-20121010 +- gdk: BAT-of-BATs is no longer allowed. It was already not allowed to + make these types of BATs persistent, but now they can't be created at + all anymore. + +* Mon Sep 17 2012 Sjoerd Mullender sjo...@acm.org - 11.13.1-20121010 +- buildtools: Removed --enable-noexpand configure option. + * Mon Sep 17 2012 Sjoerd Mullender sjo...@acm.org - 11.11.11-20120917 - Rebuilt. diff --git a/buildtools/ChangeLog-Archive b/buildtools/ChangeLog-Archive --- a/buildtools/ChangeLog-Archive +++ b/buildtools/ChangeLog-Archive @@ -1,6 +1,9 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Mon Jul 16 2012 Sjoerd Mullender sjo...@acm.org - 11.13.1-20121010 +- Removed --enable-noexpand configure option. + * Mon Jul 2 2012 Sjoerd Mullender sjo...@acm.org - 11.11.1-20120706 - Created seperate RPM and DEB packages for MonetDB/JAQL. diff --git a/buildtools/ChangeLog.Oct2012 b/buildtools/ChangeLog.Oct2012 --- a/buildtools/ChangeLog.Oct2012 +++ b/buildtools/ChangeLog.Oct2012 @@ -1,6 +1,3 @@ # ChangeLog file for buildtools # This file is updated with Maddlog -* Mon Jul 16 2012 Sjoerd Mullender sjo...@acm.org -- Removed --enable-noexpand configure option. - diff --git a/clients/ChangeLog-Archive b/clients/ChangeLog-Archive --- a/clients/ChangeLog-Archive +++ b/clients/ChangeLog-Archive @@ -1,6 +1,15 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Tue Sep 4 2012 Fabian Groffen fab...@cwi.nl - 11.13.1-20121010 +- mclient now accepts URIs as database to connect to. + +* Thu Jul 19 2012 Gijs Molenaar g.j.molen...@uva.nl - 11.13.1-20121010 +- all strings returned by python2 are unicode, removed use_unicode option +- python2 and 3 type convertion speed improvements +- python2 uses new styl objects now (bug #3104) +- split python2 and python3 + * Tue Jul 17 2012 Fabian Groffen fab...@cwi.nl - 11.11.7-20120813 - mclient no longer prints the SQLSTATE at the start of each error returned by the SQL-server. diff --git
MonetDB: default - Merge with Oct2012 branch.
Changeset: ec7e83e63973 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec7e83e63973 Modified Files: sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out sql/test/Tests/systemfunctions_nogeom.stable.out sql/test/Tests/trace_nogeom.stable.out sql/test/leaks/Tests/check0_nogeom.stable.out sql/test/leaks/Tests/check1_nogeom.stable.out sql/test/leaks/Tests/check2_nogeom.stable.out sql/test/leaks/Tests/check3_nogeom.stable.out sql/test/leaks/Tests/check4_nogeom.stable.out sql/test/leaks/Tests/check5_nogeom.stable.out sql/test/leaks/Tests/drop3_nogeom.stable.out sql/test/leaks/Tests/select1_nogeom.stable.out sql/test/leaks/Tests/select2_nogeom.stable.out sql/test/leaks/Tests/temp1_nogeom.stable.out sql/test/leaks/Tests/temp2_nogeom.stable.out sql/test/leaks/Tests/temp3_nogeom.stable.out Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 977 to 300 lines): diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err --- a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err @@ -30,7 +30,7 @@ stderr of test 'predicate_select.Bug-309 # 18:53:13 mclient -lsql -ftest -Eutf-8 -i -e --host=niels --port=32323 # 18:53:13 -MAPI = monetdb@sofia:39129 +MAPI = monetdb@madrid:32839 QUERY = select * from tables where name; ERROR = !conversion from string to type bit failed. diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out --- a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out @@ -57,8 +57,8 @@ Ready. [ 5195,queryhistory, 2000, NULL, 0, true, 0, false, 0 ] [ 5209,callhistory, 2000, NULL, 0, true, 0, false, 0 ] [ 5226,querylog, 2000, create view querylog as\nselect qd.*, ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock, ql.oublock from queryhistory qd, callhistory ql\nwhere qd.id = ql.id;, 1, true, 0, false, 0 ] -[ 5641,systemfunctions, 2000, NULL, 0, true, 0, false, 0 ] -[ 5750,r,2000, NULL, 0, false, 0, false, 0 ] +[ 5632,systemfunctions, 2000, NULL, 0, true, 0, false, 0 ] +[ 5741,r,2000, NULL, 0, false, 0, false, 0 ] # 18:53:13 # 18:53:13 Done. diff --git a/sql/test/Tests/systemfunctions_nogeom.stable.out b/sql/test/Tests/systemfunctions_nogeom.stable.out --- a/sql/test/Tests/systemfunctions_nogeom.stable.out +++ b/sql/test/Tests/systemfunctions_nogeom.stable.out @@ -263,11 +263,6 @@ Ready. [ sys, zorder_encode,0, oid, -- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \License\); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \AS IS\\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Copyright August 2008-2012 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate function zorder_encode(x integer, y integer) returns oid\nexternal name zorder.encode; ] [ sys, zorder_encode,1, int,] [ sys, zorder_encode,2, int,] -[ sys, zorder_slice, 0, table,create function zorder_slice(xb integer, yb integer, xt integer, yt integer) returns table (z oid)\nexternal name zorder.sql_slice; ] -[ sys, zorder_slice, 1, int,] -[ sys, zorder_slice, 2, int,] -[ sys, zorder_slice, 3, int,] -[ sys, zorder_slice, 4, int,] # 16:39:08 # 16:39:08 Done. diff --git a/sql/test/Tests/trace_nogeom.stable.out b/sql/test/Tests/trace_nogeom.stable.out --- a/sql/test/Tests/trace_nogeom.stable.out +++ b/sql/test/Tests/trace_nogeom.stable.out @@ -35,7 +35,7 @@ Ready. % L1 # name % wrd # type % 2 # length -[ 17 ] +[ 15 ] # 11:14:41 # 11:14:41 Done. diff --git
MonetDB: default - Merge with Oct2012 branch.
Changeset: bfadcdbbb07e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfadcdbbb07e Modified Files: clients/Tests/exports.stable.out gdk/gdk_align.c gdk/gdk_bat.c monetdb5/modules/kernel/bat5.c Branch: default Log Message: Merge with Oct2012 branch. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 23ae03961f93 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=23ae03961f93 Modified Files: sql/server/rel_optimizer.c sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out Branch: default Log Message: Merge with Oct2012 branch. diffs (99 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -1332,13 +1332,15 @@ exps_can_push_func(list *exps, sql_rel * static sql_rel * rel_push_func_down(int *changes, mvc *sql, sql_rel *rel) { - if ((is_select(rel-op) || is_join(rel-op) || is_semi(rel-op)) rel-l rel-exps) { - sql_rel *l = rel-l; - sql_rel *r = rel-r; + if ((is_select(rel-op) || is_join(rel-op) || is_semi(rel-op)) rel-l rel-exps !(rel_is_ref(rel))) { list *exps = rel-exps; - node *n; if (exps_can_push_func(exps, rel)) { + sql_rel *nrel; + sql_rel *l = rel-l, *ol = l; + sql_rel *r = rel-r, *or = r; + node *n; + /* we need a full projection, group by's and unions cannot be extended * with more expressions */ if (l-op != op_project) { @@ -1353,6 +1355,7 @@ rel_push_func_down(int *changes, mvc *sq rel-r = r = rel_project(sql-sa, r, rel_projections(sql, r, NULL, 1, 1)); } + nrel = rel_project(sql-sa, rel, rel_projections(sql, rel, NULL, 1, 1)); for(n = exps-h; n; n = n-next) { sql_exp *e = n-data, *ne = NULL; int must = 0, mustl = 0, mustr = 0; @@ -1372,6 +1375,7 @@ rel_push_func_down(int *changes, mvc *sq append(l-exps, e); e = exp_column(sql-sa, exp_relname(e), exp_name(e), exp_subtype(e), e-card, has_nil(e), is_intern(e)); n-data = e; + (*changes)++; } } else { ne = e-l; @@ -1383,6 +1387,7 @@ rel_push_func_down(int *changes, mvc *sq else append(l-exps, ne); ne = exp_column(sql-sa, exp_relname(ne), exp_name(ne), exp_subtype(ne), ne-card, has_nil(ne), is_intern(ne)); + (*changes)++; } e-l = ne; @@ -1396,6 +1401,7 @@ rel_push_func_down(int *changes, mvc *sq else append(l-exps, ne); ne = exp_column(sql-sa, exp_relname(ne), exp_name(ne), exp_subtype(ne), ne-card, has_nil(ne), is_intern(ne)); + (*changes)++; } e-r = ne; @@ -1410,13 +1416,21 @@ rel_push_func_down(int *changes, mvc *sq else append(l-exps, ne); ne = exp_column(sql-sa, exp_relname(ne), exp_name(ne), exp_subtype(ne), ne-card, has_nil(ne), is_intern(ne)); + (*changes)++; } e-f = ne; } } - (*changes)++; } } + if (*changes) { + rel = nrel; + } else { + if (l != ol) + rel-l = ol; + if (is_join(rel-op) r != or) + rel-r = or; + } } } if (rel-op == op_project rel-l rel-exps) { diff --git a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out ---
MonetDB: default - Merge with Oct2012 branch.
Changeset: 5cbb6814d689 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5cbb6814d689 Modified Files: .hgtags MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py configure.ag debian/changelog gdk/libbat.rc libversions monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Oct2012 branch. diffs (57 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -497,3 +497,6 @@ 322e81ffa03687b5be8c37208cdd6808d1347091 e89e4367f1106e7bc85a0a37bbb5bccf655a493d Oct2012_root 4d73d1902798944fddc156f95c0d656d76cfc3d8 Jul2012_9 f21bc494423c56e9cb68bae0b400e1f2a6d0c2bc Jul2012_SP2_release +3350908e3e6786034cea69f151e22f841eb3b49a Jul2012_11 +f21bc494423c56e9cb68bae0b400e1f2a6d0c2bc Jul2012_SP2_release +f8e913e56b99223764b1c22f526087d6bcad2656 Jul2012_SP2_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -695,6 +695,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Mon Sep 17 2012 Sjoerd Mullender sjo...@acm.org - 11.11.11-20120917 +- Rebuilt. + * Tue Sep 11 2012 Sjoerd Mullender sjo...@acm.org - 11.11.9-20120911 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.11.11-20120917) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender sjo...@acm.org Mon, 17 Sep 2012 10:00:19 +0200 + monetdb (11.11.9-20120911) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=7:1:1 +GDK_VERSION=7:2:1 # version of the MAPI library (subdirectory clients/mapilib) -MAPI_VERSION=6:3:0 +MAPI_VERSION=6:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=12:2:0 +MONETDB5_VERSION=12:3:0 # version of the STREAM library (subdirectory common/stream) -STREAM_VERSION=4:4:1 +STREAM_VERSION=4:5:1 ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: ed53d5c80740 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed53d5c80740 Added Files: sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.sql.src sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out sql/test/Tests/systemfunctions_nogeom.sql.src sql/test/Tests/systemfunctions_nogeom.stable.err sql/test/Tests/systemfunctions_nogeom.stable.out sql/test/Tests/trace_nogeom.sql.src sql/test/Tests/trace_nogeom.stable.err sql/test/Tests/trace_nogeom.stable.out sql/test/leaks/Tests/check0_nogeom.sql.src sql/test/leaks/Tests/check0_nogeom.stable.err sql/test/leaks/Tests/check0_nogeom.stable.out sql/test/leaks/Tests/check1_nogeom.sql.src sql/test/leaks/Tests/check1_nogeom.stable.err sql/test/leaks/Tests/check1_nogeom.stable.out sql/test/leaks/Tests/check2_nogeom.sql.src sql/test/leaks/Tests/check2_nogeom.stable.err sql/test/leaks/Tests/check2_nogeom.stable.out sql/test/leaks/Tests/check3_nogeom.sql.src sql/test/leaks/Tests/check3_nogeom.stable.err sql/test/leaks/Tests/check3_nogeom.stable.out sql/test/leaks/Tests/check4_nogeom.sql.src sql/test/leaks/Tests/check4_nogeom.stable.err sql/test/leaks/Tests/check4_nogeom.stable.out sql/test/leaks/Tests/check5_nogeom.sql.src sql/test/leaks/Tests/check5_nogeom.stable.err sql/test/leaks/Tests/check5_nogeom.stable.out sql/test/leaks/Tests/drop3_nogeom.sql.src sql/test/leaks/Tests/drop3_nogeom.stable.err sql/test/leaks/Tests/drop3_nogeom.stable.out sql/test/leaks/Tests/select1_nogeom.sql.src sql/test/leaks/Tests/select1_nogeom.stable.err sql/test/leaks/Tests/select1_nogeom.stable.out sql/test/leaks/Tests/select2_nogeom.sql.src sql/test/leaks/Tests/select2_nogeom.stable.err sql/test/leaks/Tests/select2_nogeom.stable.out sql/test/leaks/Tests/temp1_nogeom.sql.src sql/test/leaks/Tests/temp1_nogeom.stable.err sql/test/leaks/Tests/temp1_nogeom.stable.out sql/test/leaks/Tests/temp2_nogeom.sql.src sql/test/leaks/Tests/temp2_nogeom.stable.err sql/test/leaks/Tests/temp2_nogeom.stable.out sql/test/leaks/Tests/temp3_nogeom.sql.src sql/test/leaks/Tests/temp3_nogeom.stable.err sql/test/leaks/Tests/temp3_nogeom.stable.out sql/test/mapi/Tests/php_monetdb_nogeom.SQL.bat sql/test/mapi/Tests/php_monetdb_nogeom.SQL.sh sql/test/mapi/Tests/php_monetdb_nogeom.stable.err sql/test/mapi/Tests/php_monetdb_nogeom.stable.out Modified Files: sql/test/BugTracker-2012/Tests/All sql/test/Tests/All sql/test/leaks/Tests/All sql/test/mapi/Tests/All sql/test/testdb-upgrade-chain/Tests/All sql/test/testdb-upgrade/Tests/All testing/Mtest.py.in Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 2620 to 300 lines): diff --git a/sql/test/BugTracker-2012/Tests/All b/sql/test/BugTracker-2012/Tests/All --- a/sql/test/BugTracker-2012/Tests/All +++ b/sql/test/BugTracker-2012/Tests/All @@ -40,7 +40,8 @@ bug_large-insert-Bug.2960 any_null.Bug-2594 float-mod.Bug-3086 aggregate_vs_positional_column_crash.Bug-3085 -predicate_select.Bug-3090 +HAVE_GEOM?predicate_select.Bug-3090 +!HAVE_GEOM?predicate_select.Bug-3090_nogeom hash_join_crash.Bug-3089 row-number-nyi.Bug-3087 insert_serial_with_unique_key.Bug-3091 diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.sql.src b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.sql.src new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.sql.src @@ -0,0 +1,1 @@ +$RELSRCDIR/predicate_select.Bug-3090.sql diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.err @@ -0,0 +1,40 @@ +stderr of test 'predicate_select.Bug-3090_nogeom` in directory 'test/BugTracker-2012` itself: + + +# 18:53:13 +# 18:53:13 mserver5 --debug=10 --set gdk_nr_threads=0 --set gdk_dbfarm=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB --set mapi_open=true --set mapi_port=32323 --set monet_prompt= --trace --forcemito --set mal_listing=2 --dbname=mTests_test_BugTracker-2012 --set mal_listing=0 +# 18:53:13 + +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = /home/niels/scratch/rc-clean/Linux-x86_64/var/monetdb5/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_prompt = +# builtin opt
MonetDB: default - Merge with Oct2012 branch.
Changeset: 1d346219126c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d346219126c Modified Files: gdk/gdk_storage.c Branch: default Log Message: Merge with Oct2012 branch. diffs (12 lines): diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -372,7 +372,7 @@ GDKload(const char *nme, const char *ext #endif fputc('\n', fp) = 0 fflush(fp) = 0))) { - if (fclose(fp) = 0) { + if (fp == NULL || fclose(fp) = 0) { int mod = MMAP_READ | MMAP_WRITE | MMAP_SEQUENTIAL | MMAP_SYNC; if (mode == STORE_PRIV) ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 1b1a542569ee for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b1a542569ee Modified Files: clients/python/monetdb/mapi.py gdk/gdk_bat.c monetdb5/modules/mal/iterator.c Branch: default Log Message: Merge with Oct2012 branch. Now for real. I should really pay attention to the error messages. The last changeset does contain the merge, it's just not marked as such. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 70f483dc6d85 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=70f483dc6d85 Modified Files: clients/mapiclient/dump.c clients/mapilib/mapi.c clients/odbc/driver/ODBCConvert.c common/stream/stream.c common/utils/msabaoth.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_heap.c gdk/gdk_logger.c gdk/gdk_posix.c gdk/gdk_storage.c gdk/gdk_utils.c geom/monetdb5/geom.c monetdb5/extras/jaql/Tests/json03.mal monetdb5/extras/jaql/Tests/json03.stable.out monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/json.c monetdb5/extras/jaql/json.h monetdb5/extras/jaql/json.mal monetdb5/mal/mal_dataflow.c monetdb5/modules/atoms/str.c sql/server/sql_scan.c tools/merovingian/utils/control.c Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 840 to 300 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -344,9 +344,6 @@ dump_foreign_keys(Mapi mid, const char * } else if (mapi_error(mid)) mapi_explain(mid, stderr); - if (query != NULL maxquerylen != 0) - free(query); - return 1; } diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -2284,7 +2284,6 @@ connect_to_server(Mapi mid) userver.sun_family = AF_UNIX; strncpy(userver.sun_path, mid-hostname, sizeof(userver.sun_path) - 1); userver.sun_path[sizeof(userver.sun_path) - 1] = 0; - s = socket(PF_UNIX, SOCK_STREAM, 0); if (connect(s, serv, sizeof(struct sockaddr_un)) 0) { closesocket(s); diff --git a/clients/odbc/driver/ODBCConvert.c b/clients/odbc/driver/ODBCConvert.c --- a/clients/odbc/driver/ODBCConvert.c +++ b/clients/odbc/driver/ODBCConvert.c @@ -2802,7 +2802,6 @@ ODBCStore(ODBCStmt *stmt, #ifdef WITH_WCHAR case SQL_C_WCHAR: slen = strlen_or_ind_ptr ? *strlen_or_ind_ptr : SQL_NTS; - sval = (char *) ptr; fixWcharIn((SQLWCHAR *) ptr, slen, char, sval, addStmtError, stmt, return SQL_ERROR); break; #endif @@ -3212,7 +3211,7 @@ ODBCStore(ODBCStmt *stmt, default: /* Restricted data type attribute violation */ addStmtError(stmt, 07006, NULL, 0); - return SQL_ERROR; + goto failure; } break; case SQL_TYPE_DATE: @@ -3238,7 +3237,7 @@ ODBCStore(ODBCStmt *stmt, /* Invalid character value for cast * specification */ addStmtError(stmt, 22018, NULL, 0); - return SQL_ERROR; + goto failure; } /* fall through */ case SQL_C_TYPE_DATE: @@ -3251,7 +3250,7 @@ ODBCStore(ODBCStmt *stmt, default: /* Restricted data type attribute violation */ addStmtError(stmt, 07006, NULL, 0); - return SQL_ERROR; + goto failure; } break; case SQL_TYPE_TIME: @@ -3277,7 +3276,7 @@ ODBCStore(ODBCStmt *stmt, /* Invalid character value for cast * specification */ addStmtError(stmt, 22018, NULL, 0); - return SQL_ERROR; + goto failure; } /* fall through */ case SQL_C_TYPE_TIME: @@ -3290,7 +3289,7 @@ ODBCStore(ODBCStmt *stmt, default: /* Restricted data type attribute violation */ addStmtError(stmt, 07006, NULL, 0); - return SQL_ERROR; + goto failure; } break; case SQL_TYPE_TIMESTAMP: @@ -3337,7 +3336,7 @@ ODBCStore(ODBCStmt *stmt, * value for cast * specification */ addStmtError(stmt, 22018, NULL, 0); - return SQL_ERROR; + goto failure; } } } @@ -3361,7 +3360,7 @@ ODBCStore(ODBCStmt *stmt, default: /* Restricted data type attribute violation */
MonetDB: default - Merge with Oct2012 branch.
Changeset: a378c4bb0529 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a378c4bb0529 Modified Files: sql/server/rel_bin.c sql/server/rel_optimizer.c Branch: default Log Message: Merge with Oct2012 branch. diffs (34 lines): diff --git a/sql/server/rel_bin.c b/sql/server/rel_bin.c --- a/sql/server/rel_bin.c +++ b/sql/server/rel_bin.c @@ -1617,7 +1617,7 @@ rel2bin_semijoin( mvc *sql, sql_rel *rel stmt *s = NULL; /* only handle simple joins here */ - if (list_length(jns) (idx || !e-type == e_cmp || e-flag != cmp_equal)) + if (list_length(jns) (idx || e-type != e_cmp || e-flag != cmp_equal)) break; s = exp_bin(sql, en-data, left, right, NULL, NULL); diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -4842,7 +4842,8 @@ rel_simplify_like_select(int *changes, m rewrite = 0; } if (rewrite) { /* rewrite to cmp_equal ! */ - sql_exp *ne = exp_compare(sql-sa, e-l, e-r, cmp_equal); + list *r = e-r; + sql_exp *ne = exp_compare(sql-sa, e-l, r-h-data, cmp_equal); /* if rewriten don't cache this query */ list_append(exps, ne); sql-caching = 0; @@ -5552,7 +5553,7 @@ _rel_optimizer(mvc *sql, sql_rel *rel, i rel = rewrite(sql, rel, rel_remove_empty_select, e_changes); } - if (gp.cnt[op_select] !sql-emode == m_prepare) + if (gp.cnt[op_select] sql-emode != m_prepare) rel = rewrite(sql, rel, rel_simplify_like_select, changes); if (gp.cnt[op_select]) ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 53afeda2cd61 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53afeda2cd61 Modified Files: .hgtags MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py configure.ag debian/changelog gdk/ChangeLog-Archive gdk/ChangeLog.Jul2012 gdk/libbat.rc java/ChangeLog-Archive java/ChangeLog.Jul2012 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Jul2012 monetdb5/tools/libmonetdb5.rc tools/merovingian/ChangeLog-Archive tools/merovingian/ChangeLog.Jul2012 vertoo.data Branch: default Log Message: Merge with Oct2012 branch. diffs (214 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -495,3 +495,5 @@ e89d2bbb01411ab72a2902d60b364427565d4a44 8d673fe2015149fe44c2ba2d048aae50da6eb48e Jul2012_7 322e81ffa03687b5be8c37208cdd6808d1347091 Jul2012_SP1_release e89e4367f1106e7bc85a0a37bbb5bccf655a493d Oct2012_root +4d73d1902798944fddc156f95c0d656d76cfc3d8 Jul2012_9 +f21bc494423c56e9cb68bae0b400e1f2a6d0c2bc Jul2012_SP2_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -27,7 +27,7 @@ Vendor: MonetDB BV i...@monetdb.org Group: Applications/Databases License: MPL - http://www.monetdb.org/Legal/MonetDBLicense URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Jul2012-SP1/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Jul2012-SP2/%{name}-%{version}.tar.bz2 BuildRequires: bison BuildRequires: bzip2-devel @@ -695,6 +695,26 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Tue Sep 11 2012 Sjoerd Mullender sjo...@acm.org - 11.11.9-20120911 +- Rebuilt. + +* Fri Sep 7 2012 Fabian Groffen fab...@cwi.nl - 11.11.9-20120911 +- monetdb5: Changed the way nclients maximum was calculated to avoid 'out of client + slots' errors way before the maximum was reached. + +* Fri Aug 31 2012 Fabian Groffen fab...@cwi.nl - 11.11.9-20120911 +- merovingian: Resolved a problem where monetdb could fail to start a database with + the message database 'X' started up, but failed to open up a + communication channel. Bug #3134, comment #7. + +* Fri Aug 31 2012 Sjoerd Mullender sjo...@acm.org - 11.11.9-20120911 +- gdk: Fixed a bug in BATantijoin when either side is a singleton BAT. + This fixes bug 3139. + +* Tue Aug 14 2012 Fabian Groffen fab...@cwi.nl - 11.11.9-20120911 +- java: Fixed a bug where DatabaseMetaData.getURL() did return null:0 for + hostname:port. + * Mon Aug 13 2012 Sjoerd Mullender sjo...@acm.org - 11.11.7-20120813 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +monetdb (11.11.9-20120911) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender sjo...@acm.org Tue, 11 Sep 2012 10:33:30 +0200 + +monetdb (11.11.9-20120911) unstable; urgency=low + + * monetdb5: Changed the way nclients maximum was calculated to avoid 'out of client +slots' errors way before the maximum was reached. + + -- Fabian Groffen fab...@cwi.nl Fri, 7 Sep 2012 10:33:29 +0200 + +monetdb (11.11.9-20120911) unstable; urgency=low + + * merovingian: Resolved a problem where monetdb could fail to start a database with +the message database 'X' started up, but failed to open up a +communication channel. Bug #3134, comment #7. + + -- Fabian Groffen fab...@cwi.nl Fri, 31 Aug 2012 10:33:29 +0200 + +monetdb (11.11.9-20120911) unstable; urgency=low + + * gdk: Fixed a bug in BATantijoin when either side is a singleton BAT. +This fixes bug 3139. + + -- Sjoerd Mullender sjo...@acm.org Fri, 31 Aug 2012 10:33:29 +0200 + +monetdb (11.11.9-20120911) unstable; urgency=low + + * java: Fixed a bug where DatabaseMetaData.getURL() did return null:0 for +hostname:port. + + -- Fabian Groffen fab...@cwi.nl Tue, 14 Aug 2012 10:33:29 +0200 + monetdb (11.11.7-20120813) unstable; urgency=low * Rebuilt. diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive --- a/gdk/ChangeLog-Archive +++ b/gdk/ChangeLog-Archive @@ -1,6 +1,10 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Fri Aug 31 2012 Sjoerd Mullender sjo...@acm.org - 11.11.9-20120911 +- Fixed a bug in BATantijoin when either side is a singleton BAT. + This fixes bug 3139. + * Mon Jul 9 2012 Niels Nes ni...@cwi.nl - 11.11.5-20120710 - Fixed intermittent problem that joins and
MonetDB: default - Merge with Oct2012 branch.
Changeset: d796c95ab7fc for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d796c95ab7fc Modified Files: gdk/gdk_relop.mx monetdb5/extras/jaql/jaqlgencode.c monetdb5/mal/Tests/tst034.stable.out monetdb5/mal/Tests/tst274.stable.out.oid64 Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 777 to 300 lines): diff --git a/gdk/gdk_relop.mx b/gdk/gdk_relop.mx --- a/gdk/gdk_relop.mx +++ b/gdk/gdk_relop.mx @@ -895,14 +895,14 @@ batfetchjoin(BAT *l, BAT *r, BUN estimat return bn; @ @c - } else if (hitalways BATtdense(l) BAThdense(r) l-tseqbase == r-hseqbase) { + } else if (BATtdense(l) BAThdense(r) l-tseqbase == r-hseqbase BATcount(l) = BATcount(r)) { /* always hit and tail of left is alligned with head * of right */ ALGODEBUG fprintf(stderr, #BATfetchjoin: BATtdense(l) BAThdense(r)\n); ALGODEBUG fprintf(stderr, #BATfetchjoin: VIEWcreate(l,r)\n); return VIEWcreate(l, r); - } else if (hitalways BAThdense(r) BATtdense(r) r-hseqbase == r-tseqbase) { + } else if (hitalways BAThdense(r) BATtdense(r) r-hseqbase == r-tseqbase BATcount(l) = BATcount(r)) { /* idempotent join: always hit and substitute tail with the same value */ ALGODEBUG fprintf(stderr, #BATfetchjoin: BAThdense(r) BATtdense(r)\n); ALGODEBUG fprintf(stderr, #BATfetchjoin: VIEWcreate(l,l)\n); diff --git a/monetdb5/extras/jaql/jaqlgencode.c b/monetdb5/extras/jaql/jaqlgencode.c --- a/monetdb5/extras/jaql/jaqlgencode.c +++ b/monetdb5/extras/jaql/jaqlgencode.c @@ -3418,15 +3418,6 @@ dumpvariabletransformation(jc *j, Client q = pushArgument(mb, q, h); c = getArg(q, 0); pushInstruction(mb, q); - dumpbatwritable(j, mb, 1); - q = newInstruction(mb, ASSIGNsymbol); - setModuleId(q, batRef); - setFunctionId(q, insertRef); - q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); - q = pushArgument(mb, q, j-j1); - q = pushArgument(mb, q, c); - j-j1 = getArg(q, 0); - pushInstruction(mb, q); /* prepare return, new ids (head) with elem ids (tail) in * original elems order */ @@ -3450,14 +3441,14 @@ dumpvariabletransformation(jc *j, Client setFunctionId(q, mirrorRef); q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); q = pushArgument(mb, q, c); - c = getArg(q, 0); + d = getArg(q, 0); pushInstruction(mb, q); q = newInstruction(mb, ASSIGNsymbol); setModuleId(q, algebraRef); setFunctionId(q, leftjoinRef); q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); q = pushArgument(mb, q, b); - q = pushArgument(mb, q, c); + q = pushArgument(mb, q, d); a = getArg(q, 0); pushInstruction(mb, q); q = newInstruction(mb, ASSIGNsymbol); @@ -3468,6 +3459,32 @@ dumpvariabletransformation(jc *j, Client a = getArg(q, 0); pushInstruction(mb, q); + /* and insert into kinds */ + q = newInstruction(mb, ASSIGNsymbol); + setModuleId(q, batRef); + setFunctionId(q, mirrorRef); + q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); + q = pushArgument(mb, q, a); + b = getArg(q, 0); + pushInstruction(mb, q); + q = newInstruction(mb, ASSIGNsymbol); + setModuleId(q, algebraRef); + setFunctionId(q, leftjoinRef); + q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); + q = pushArgument(mb, q, b); + q = pushArgument(mb, q, c); + b = getArg(q, 0); + pushInstruction(mb, q); + dumpbatwritable(j, mb, 1); + q = newInstruction(mb, ASSIGNsymbol); + setModuleId(q, batRef); + setFunctionId(q, insertRef); + q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); + q = pushArgument(mb, q, j-j1); + q = pushArgument(mb, q, b); + j-j1 = getArg(q, 0); + pushInstruction(mb, q); +
MonetDB: default - Merge with Oct2012 branch.
Changeset: 8c3652e8186f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c3652e8186f Modified Files: clients/mapiclient/dump.c clients/mapilib/mapi.c clients/odbc/driver/ODBCConvert.c clients/odbc/driver/SQLExecute.c Branch: default Log Message: Merge with Oct2012 branch. diffs (178 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -244,8 +244,13 @@ dump_foreign_keys(Mapi mid, const char * ORDER BY \fs\.\name\,\fkt\.\name\, \fkk\.\name\, \nr\; } - if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid)) + hdl = mapi_query(mid, query); + if (query != NULL maxquerylen != 0) + free(query); + maxquerylen = 0; + if (hdl == NULL || mapi_error(mid)) goto bailout; + cnt = mapi_fetch_row(hdl); while (cnt != 0) { char *c_psname = mapi_fetch_field(hdl, 0); @@ -1289,13 +1294,19 @@ dump_external_functions(Mapi mid, const EXTERNAL NAME \%s\.\%s\;\n, prev_f_mod, prev_f_func); free(prev_f_id); + } + if (prev_f_mod) free(prev_f_mod); + if (prev_f_func) free(prev_f_func); + if (prev_a_name) free(prev_a_name); + if (prev_a_type) free(prev_a_type); + if (prev_a_type_digits) free(prev_a_type_digits); + if (prev_a_type_scale) free(prev_a_type_scale); - } mapi_close_handle(hdl); return mnstr_errnr(toConsole) ? 1 : 0; diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -2282,7 +2282,8 @@ connect_to_server(Mapi mid) } memset(userver, 0, sizeof(struct sockaddr_un)); userver.sun_family = AF_UNIX; - strncpy(userver.sun_path, mid-hostname, sizeof(userver.sun_path)); + strncpy(userver.sun_path, mid-hostname, sizeof(userver.sun_path) - 1); + userver.sun_path[sizeof(userver.sun_path) - 1] = 0; s = socket(PF_UNIX, SOCK_STREAM, 0); if (connect(s, serv, sizeof(struct sockaddr_un)) 0) { @@ -4540,7 +4541,7 @@ mapi_quick_response(MapiHdl hdl, FILE *f mapi_hdl_check(hdl, mapi_quick_response); do { - if ((line = mapi_result_error(hdl)) != NULL) + if (mapi_result_error(hdl) != NULL) mapi_explain_result(hdl, fd); while ((line = mapi_fetch_line(hdl)) != NULL) fprintf(fd, %s\n, line); diff --git a/clients/odbc/driver/ODBCConvert.c b/clients/odbc/driver/ODBCConvert.c --- a/clients/odbc/driver/ODBCConvert.c +++ b/clients/odbc/driver/ODBCConvert.c @@ -166,13 +166,16 @@ parsesecondinterval(bignum_t *nval, SQL_ switch (type) { case SQL_INTERVAL_DAY: /* SQL_C_INTERVAL_DAY */ nval-val *= 24; + /* fall through */ case SQL_INTERVAL_HOUR: /* SQL_C_INTERVAL_HOUR */ case SQL_INTERVAL_DAY_TO_HOUR: /* SQL_C_INTERVAL_DAY_TO_HOUR */ nval-val *= 60; + /* fall through */ case SQL_INTERVAL_MINUTE: /* SQL_C_INTERVAL_MINUTE */ case SQL_INTERVAL_HOUR_TO_MINUTE: /* SQL_C_INTERVAL_HOUR_TO_MINUTE */ case SQL_INTERVAL_DAY_TO_MINUTE: /* SQL_C_INTERVAL_DAY_TO_MINUTE */ nval-val *= 60; + /* fall through */ case SQL_INTERVAL_SECOND: /* SQL_C_INTERVAL_SECOND */ case SQL_INTERVAL_MINUTE_TO_SECOND: /* SQL_C_INTERVAL_MINUTE_TO_SECOND */ case SQL_INTERVAL_HOUR_TO_SECOND: /* SQL_C_INTERVAL_HOUR_TO_SECOND */ @@ -2680,12 +2683,14 @@ ODBCFetch(ODBCStmt *stmt, #define assign(buf,bufpos,buflen,value,stmt) \ do {\ if (bufpos = buflen) { \ - buf = realloc(buf, buflen += 1024); \ - if (buf == NULL) { \ + char *b = realloc(buf, buflen += 1024); \ + if (b == NULL) {\ + free(buf); \ /* Memory allocation error */ \ addStmtError(stmt, HY001, NULL, 0); \ return SQL_ERROR; \ } \ + buf = b;\ } \
MonetDB: default - Merge with Oct2012 branch.
Changeset: 038e52b15ecb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=038e52b15ecb Modified Files: clients/mapiclient/Tests/mclient--help.stable.err gdk/gdk_logger.c sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out Branch: default Log Message: Merge with Oct2012 branch. diffs (71 lines): diff --git a/clients/mapiclient/Tests/mclient--help.stable.err b/clients/mapiclient/Tests/mclient--help.stable.err --- a/clients/mapiclient/Tests/mclient--help.stable.err +++ b/clients/mapiclient/Tests/mclient--help.stable.err @@ -16,7 +16,7 @@ Options are: -h hostname | --host=hostnamehost or UNIX domain socket to connect to -p portnr | --port=portnr port to connect to -u user | --user=useruser id - -d database | --database=database database to connect to + -d database | --database=database database to connect to (may be URI) -e | --echoecho the query -E charset | --encoding=charset specify encoding (character set) of the terminal -f kind | --format=kind specify output format {csv,tab,raw,sql,xml} diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1120,14 +1120,18 @@ logger_new(int debug, char *fn, char *lo b = BATdescriptor(bid); lg-snapshots_bid = logbat_new(TYPE_void, TYPE_int, 1); - BATappend(lg-snapshots_bid, BATmirror(b), FALSE); + v = BATmark(b, 0); + BATappend(lg-snapshots_bid, BATmirror(v), FALSE); + BBPunfix(v-batCacheid); BATmode(lg-snapshots_bid, PERSISTENT); snprintf(bak, BUFSIZ, %s_snapshots_bid, fn); BBPrename(lg-snapshots_bid-batCacheid, bak); logger_add_bat(lg, lg-snapshots_bid, snapshots_bid); lg-snapshots_tid = logbat_new(TYPE_void, TYPE_int, 1); - BATappend(lg-snapshots_tid, b, FALSE); + v = BATmark(BATmirror(b), 0); + BATappend(lg-snapshots_tid, BATmirror(v), FALSE); + BBPunfix(v-batCacheid); BATmode(lg-snapshots_tid, PERSISTENT); snprintf(bak, BUFSIZ, %s_snapshots_tid, fn); BBPrename(lg-snapshots_tid-batCacheid, bak); @@ -1140,7 +1144,9 @@ logger_new(int debug, char *fn, char *lo b = BATdescriptor(bid); lg-seqs_id = logbat_new(TYPE_void, TYPE_int, 1); - BATappend(lg-seqs_id, BATmirror(b), FALSE); + v = BATmark(b, 0); + BATappend(lg-seqs_id, BATmirror(v), FALSE); + BBPunfix(v-batCacheid); BATmode(lg-seqs_id, PERSISTENT); snprintf(bak, BUFSIZ, %s_seqs_id, fn); BBPrename(lg-seqs_id-batCacheid, bak); diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out @@ -19,6 +19,8 @@ stdout of test 'upgrade` in directory 't # MonetDB/SQL module loaded Ready. +Running database upgrade commands: +drop function sys.zorder_slice; # 15:17:06 # 15:17:06 /usr/bin/python upgrade.SQL.py upgrade diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out b/sql/test/testdb-upgrade/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out @@ -19,6 +19,8 @@ stdout of test 'upgrade` in directory 't # MonetDB/SQL module loaded Ready. +Running database upgrade commands: +drop function sys.zorder_slice; # 14:40:54 # 14:40:54 /usr/bin/python upgrade.SQL.py upgrade ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 24e766144658 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24e766144658 Modified Files: clients/ChangeLog.Oct2012 clients/mapiclient/mclient.1 clients/mapiclient/mclient.c monetdb5/extras/jaql/jaql.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/optimizer/opt_wrapper.c Branch: default Log Message: Merge with Oct2012 branch. diffs (269 lines): diff --git a/clients/ChangeLog.Oct2012 b/clients/ChangeLog.Oct2012 --- a/clients/ChangeLog.Oct2012 +++ b/clients/ChangeLog.Oct2012 @@ -1,6 +1,9 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Tue Sep 4 2012 Fabian Groffen fab...@cwi.nl +- mclient now accepts URIs as database to connect to. + * Thu Jul 19 2012 Gijs Molenaar g.j.molen...@uva.nl - all strings returned by python2 are unicode, removed use_unicode option - python2 and 3 type convertion speed improvements diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -114,10 +114,12 @@ option is omitted, the default of is assumed. .TP \fB\-\-database=\fP\fIdatabase\fP (\fB\-d\fP \fIdatabase\fP) -Specify the name of the database to connect to. The \fB-d\fP can be +Specify the name or URI of the database to connect to. The \fB-d\fP can be omitted if an equally named file does not exist in the current directory. As such, the first non-option argument will be interpreted as database to connect to if the argument does not exist as file. +Valid URIs are as returned by +.RB `monetdb discover`, see monetdb (1), and look like mapi:monetdb://hostname:port/database . .TP \fB\-\-host=\fP\fIhostname\fP (\fB\-h\fP \fIhostname\fP) Specify the name of the host on which the server runs (default: diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -2595,7 +2595,7 @@ usage(const char *prog, int xit) #endif fprintf(stderr, -p portnr | --port=portnr port to connect to\n); fprintf(stderr, -u user | --user=useruser id\n); - fprintf(stderr, -d database | --database=database database to connect to\n); + fprintf(stderr, -d database | --database=database database to connect to (may be URI)\n); fprintf(stderr, -e | --echo echo the query\n); #ifdef HAVE_ICONV @@ -3003,7 +3003,13 @@ main(int argc, char **argv) has_fileargs = optind != argc; } - mid = mapi_connect(host, port, user, passwd, language, dbname); + if (dbname != NULL strncmp(dbname, mapi:monetdb://, 15) == 0) { + mid = mapi_mapiuri(dbname, user, passwd, language); + } else { + mid = mapi_mapi(host, port, user, passwd, language, dbname); + } + if (mid mapi_error(mid) == MOK) + mapi_reconnect(mid);/* actually, initial connect */ if (mid == NULL) { fprintf(stderr, failed to allocate Mapi structure\n); diff --git a/monetdb5/extras/jaql/jaql.mal b/monetdb5/extras/jaql/jaql.mal --- a/monetdb5/extras/jaql/jaql.mal +++ b/monetdb5/extras/jaql/jaql.mal @@ -37,22 +37,6 @@ pattern cast(b:bat[:oid,:any], t:any_1): address JAQLcast comment Return BAT b as BAT with tail type of t, if the BAT tail in reality is of that type; -# select wrappers that preserve order -function select(b:bat[:oid,:any_1], v:any_1):bat[:oid,:any_1]; - j := algebra.markT(b, 0@0); - a := algebra.markH(b, 0@0); - q := algebra.select(a, v); - l := algebra.leftjoin(j, q); - return l; -end select -function uselect(b:bat[:oid,:any_1], v:any_1):bat[:oid,:void]; - l := algebra.markT(b, 0@0); - r := algebra.markH(b, 0@0); - e := algebra.uselect(r, v); - s := algebra.leftjoin(l, e); - return s; -end uselect - # scenario functions and init call command prelude() address JAQLprelude; diff --git a/monetdb5/extras/jaql/jaqlgencode.c b/monetdb5/extras/jaql/jaqlgencode.c --- a/monetdb5/extras/jaql/jaqlgencode.c +++ b/monetdb5/extras/jaql/jaqlgencode.c @@ -159,7 +159,7 @@ dumparrrefvar(MalBlkPtr mb, tree *t, int /* array indirection, entries must be arrays */ q = newInstruction(mb, ASSIGNsymbol); - setModuleId(q, putName(jaql, 4)); + setModuleId(q, algebraRef); setFunctionId(q, uselectRef); q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); q = pushArgument(mb, q, elems); @@ -270,7 +270,7 @@ dumparrrefvar(MalBlkPtr mb, tree *t, int pushInstruction(mb, q); q = newInstruction(mb, ASSIGNsymbol); - setModuleId(q, putName(jaql, 4)); + setModuleId(q, algebraRef); setFunctionId(q, selectRef); q = pushReturn(mb, q, newTmpVariable(mb, TYPE_any)); q = pushArgument(mb, q, b); @@ -370,7 +370,7
MonetDB: default - Merge with Oct2012 branch.
Changeset: 1732409fb8fb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1732409fb8fb Modified Files: monetdb5/extras/jaql/jaql.c monetdb5/extras/jaql/jaqlfunc.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/jaqlscenario.c monetdb5/extras/jaql/jaqltree.h monetdb5/extras/jaql/parser/jaql.l monetdb5/extras/jaql/parser/jaql.y Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 339 to 300 lines): diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c --- a/monetdb5/extras/jaql/jaql.c +++ b/monetdb5/extras/jaql/jaql.c @@ -1910,49 +1910,43 @@ JAQLexecute(Client cntxt, MalBlkPtr mb, if (j-err[0] != '\0') break; - if (j-p == NULL) - j-explain = 99; /* jump over switch below */ + if (j-p == NULL) { + /* do nothing */ + } else if (j-plan || j-planf) { + printtree(cntxt-fdout, j-p, 0, j-planf); + mnstr_printf(cntxt-fdout, \n); + } else { + str err; + Symbol prg = newFunction(putName(user, 4), putName(jaql, 4), + FUNCTIONsymbol); + /* we do not return anything */ + setVarType(prg-def, 0, TYPE_void); + setVarUDFtype(prg-def, 0); + (void)dumptree(j, cntxt, prg-def, j-p); + pushEndInstruction(prg-def); + /* codegen could report an error */ + if (j-err[0] != '\0') + break; - switch (j-explain) { - case 0: /* normal (execution) mode */ - case 1: /* explain: show MAL-plan */ { - str err; - Symbol prg = newFunction(putName(user, 4), putName(jaql, 4), - FUNCTIONsymbol); - /* we do not return anything */ - setVarType(prg-def, 0, TYPE_void); - setVarUDFtype(prg-def, 0); - (void)dumptree(j, cntxt, prg-def, j-p); - pushEndInstruction(prg-def); - /* codegen could report an error */ - if (j-err[0] != '\0') + chkProgram(cntxt-fdout, cntxt-nspace, prg-def); + if (j-explain) { + printFunction(cntxt-fdout, prg-def, 0, + LIST_MAL_STMT | LIST_MAPI); + } else { + err = (str)runMAL(cntxt, prg-def, 1, 0, 0, 0); + freeMalBlk(prg-def); + if (err != MAL_SUCCEED) { + snprintf(j-err, sizeof(j-err), %s, err); + GDKfree(err); break; - - chkProgram(cntxt-fdout, cntxt-nspace, prg-def); - if (j-explain == 1) { - printFunction(cntxt-fdout, prg-def, 0, - LIST_MAL_STMT | LIST_MAPI); - } else { - err = (str)runMAL(cntxt, prg-def, 1, 0, 0, 0); - freeMalBlk(prg-def); - if (err != MAL_SUCCEED) { - snprintf(j-err, sizeof(j-err), %s, err); - GDKfree(err); - break; - } } - } break; - case 2: /* plan */ - case 3: /* planf */ - printtree(cntxt-fdout, j-p, 0, j-explain == 3); - mnstr_printf(cntxt-fdout, \n); - break; + } } freetree(j-p); /* reset */ j-p = NULL; j-esc_depth = 0; - j-explain = 0; + j-explain = j-plan = j-planf = j-debug = j-trace = j-mapimode = 0; } while (j-buf[j-pos + (j-tokstart - j-scanbuf)] != '\0' j-err[0] == '\0'); jaqllex_destroy(j-scanner); diff --git a/monetdb5/extras/jaql/jaqlfunc.mal b/monetdb5/extras/jaql/jaqlfunc.mal --- a/monetdb5/extras/jaql/jaqlfunc.mal +++ b/monetdb5/extras/jaql/jaqlfunc.mal @@ -83,7 +83,54 @@ function
MonetDB: default - Merge with Oct2012 branch.
Changeset: fc40a3d4e730 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc40a3d4e730 Modified Files: clients/Tests/exports.stable.out configure.ag monetdb5/mal/mal_properties.c monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/mtime.h monetdb5/modules/mal/batmtime.mal monetdb5/modules/mal/batmtime.mal.sh sql/rel.txt sql/server/rel_optimizer.c sql/server/rel_psm.c sql/server/rel_select.c sql/server/sql_mvc.c sql/storage/bat/bat_storage.c sql/storage/restrict/restrict_storage.c sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out sql/test/BugTracker/Tests/cardinality_violation.SF-1240701.stable.err Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 380 to 300 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -1731,6 +1731,7 @@ str MTIMEdate_addyears(date *ret, date * str MTIMEdate_create(date *ret, int *year, int *month, int *day); str MTIMEdate_date(date *d, date *s); str MTIMEdate_diff(int *ret, date *v1, date *v2); +str MTIMEdate_diff_bulk(bat *ret, bat *bid1, bat *bid2); str MTIMEdate_extract_day(int *ret, date *v); str MTIMEdate_extract_day_bulk(int *ret, int *bid); str MTIMEdate_extract_dayofweek(int *ret, date *v); @@ -1811,6 +1812,7 @@ str MTIMEtimestamp_create_default(timest str MTIMEtimestamp_create_from_date(timestamp *ret, date *d); str MTIMEtimestamp_day(int *ret, timestamp *t); str MTIMEtimestamp_diff(lng *ret, timestamp *v1, timestamp *v2); +str MTIMEtimestamp_diff_bulk(bat *ret, bat *bid1, bat *bid2); str MTIMEtimestamp_extract_date(date *ret, timestamp *t, tzone *z); str MTIMEtimestamp_extract_date_default(date *ret, timestamp *t); str MTIMEtimestamp_extract_daytime(daytime *ret, timestamp *t, tzone *z); diff --git a/monetdb5/mal/mal_properties.c b/monetdb5/mal/mal_properties.c --- a/monetdb5/mal/mal_properties.c +++ b/monetdb5/mal/mal_properties.c @@ -303,7 +303,7 @@ PropertyIndex(str name) return i; } MT_lock_set(mal_contextLock, propertyIndex); - /* small change its allready added */ + /* small change its already added */ for (i=0; inr_properties; i++) { if (strcmp(properties[i], name) == 0) { MT_lock_unset(mal_contextLock, propertyIndex); 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 @@ -1533,18 +1533,6 @@ MTIMEtimestamp_add(timestamp *ret, times return MAL_SUCCEED; } -/* returns the number of milliseconds between 'val1' and 'val2'. */ -static str -timestamp_diff(lng *ret, timestamp *v1, timestamp *v2) -{ - if (ts_isnil(*v1) || ts_isnil(*v2)) { - *ret = lng_nil; - } else { - *ret = ((lng) (v1-days - v2-days)) * ((lng) 24 * 60 * 60 * 1000) + ((lng) (v1-msecs - v2-msecs)); - } - return MAL_SUCCEED; -} - /* create a DST start/end date rule. */ static str rule_create(rule *ret, int *month, int *day, int *weekday, int *minutes) @@ -2076,9 +2064,125 @@ MTIMEdate_diff(int *ret, date *v1, date } str +MTIMEdate_diff_bulk(bat *ret, bat *bid1, bat *bid2) +{ + BAT *b1, *b2, *bn; + date *t1, *t2; + int *tn; + BUN i, n; + + b1 = BATdescriptor(*bid1); + b2 = BATdescriptor(*bid2); + if (b1 == NULL || b2 == NULL) { + if (b1) + BBPreleaseref(b1-batCacheid); + if (b2) + BBPreleaseref(b2-batCacheid); + throw(MAL, batmtime.diff, RUNTIME_OBJECT_MISSING); + } + n = BATcount(b1); + if (n != BATcount(b2)) { + BBPreleaseref(b1-batCacheid); + BBPreleaseref(b2-batCacheid); + throw(MAL, batmtime.diff, inputs not the same size); + } + bn = BATnew(TYPE_void, TYPE_int, BATcount(b1)); + if (bn == NULL) { + BBPreleaseref(b1-batCacheid); + BBPreleaseref(b2-batCacheid); + throw(MAL, batmtime.diff, MAL_MALLOC_FAIL); + } + t1 = (date *) Tloc(b1, BUNfirst(b1)); + t2 = (date *) Tloc(b2, BUNfirst(b2)); + tn = (int *) Tloc(bn, BUNfirst(bn)); + for (i = 0; i n; i++) { + if (*t1 == date_nil || *t2 == date_nil) { + *tn = int_nil; + } else { + *tn = (int) (*t1 - *t2); + } + t1++; + t2++; + tn++; + } + BBPreleaseref(b2-batCacheid); + if (b1-htype != bn-htype) { + /* temporarily reuse b2 */ +
MonetDB: default - Merge with Oct2012 branch.
Changeset: 0804919b6b69 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0804919b6b69 Modified Files: MonetDB.spec NT/rules.msc buildtools/autogen/autogen/am.py buildtools/autogen/autogen/msc.py clients/Makefile.ag clients/python3/Makefile.ag configure.ag Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 332 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -43,7 +43,8 @@ BuildRequires: libxml2-devel BuildRequires: openssl-devel BuildRequires: pcre-devel = 4.5 BuildRequires: perl -BuildRequires: python +BuildRequires: python-devel +BuildRequires: python3-devel # BuildRequires: raptor-devel = 1.4.16 BuildRequires: readline-devel BuildRequires: ruby @@ -57,7 +58,9 @@ BuildRequires: zlib-devel Obsoletes: %{name}-devel %define perl_libdir %(perl -MConfig -e '$x=$Config{installvendorarch}; $x =~ s|$Config{vendorprefix}/||; print $x;') -%if ! (0%{?fedora} 12 || 0%{?rhel} 5) +# need to define python_sitelib on RHEL 5 and older +# no need to define python3_sitelib: it's defined by python3-devel +%if 0%{?rhel} 0%{?rhel} = 5 %{!?python_sitelib: %global python_sitelib %(%{__python} -c from distutils.sysconfig import get_python_lib; print(get_python_lib()))} %endif %{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2/dev/null)} @@ -475,10 +478,8 @@ fi Summary: MonetDB5 SQL server modules Group: Applications/Databases Requires: MonetDB5-server = %{version}-%{release} -%if (0%{?fedora} 14) # for systemd-tmpfiles Requires: systemd-units -%endif Obsoletes: MonetDB-SQL-devel Obsoletes: %{name}-SQL @@ -491,24 +492,16 @@ accelerators. It also has an SQL fronte This package contains the SQL frontend for MonetDB5. If you want to use SQL with MonetDB, you will need to install this package. -%if (0%{?fedora} 14) %post SQL-server5 systemd-tmpfiles --create %{_sysconfdir}/tmpfiles.d/monetdbd.conf -%endif %files SQL-server5 %defattr(-,root,root) %{_bindir}/monetdb %{_bindir}/monetdbd %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb -%if (0%{?fedora} 14) # Fedora 15 and newer %{_sysconfdir}/tmpfiles.d/monetdbd.conf -%else -# Fedora 14 and older -%dir %attr(775,monetdb,monetdb) %{_localstatedir}/run/monetdb -%exclude %{_sysconfdir}/tmpfiles.d/monetdbd.conf -%endif %config(noreplace) %{_localstatedir}/monetdb5/dbfarm/.merovingian_properties %{_libdir}/monetdb5/autoload/*_sql.mal %{_libdir}/monetdb5/lib_sql.so @@ -548,6 +541,28 @@ program. %{python_sitelib}/python_monetdb-*.egg-info %doc clients/python/README.rst +%package -n python3-monetdb +Summary: Native MonetDB client Python3 API +Group: Applications/Databases +Requires: python3 +BuildArch: noarch + +%description -n python3-monetdb +MonetDB is a database management system that is developed from a +main-memory perspective with use of a fully decomposed storage model, +automatic index management, extensibility of data types and search +accelerators. It also has an SQL frontend. + +This package contains the files needed to use MonetDB from a Python3 +program. + +%files -n python3-monetdb +%defattr(-,root,root) +%dir %{python3_sitelib}/monetdb +%{python3_sitelib}/monetdb/* +%{python3_sitelib}/python_monetdb-*.egg-info +%doc clients/python3/README.rst + %package testing Summary: MonetDB - Monet Database Management System Group: Applications/Databases @@ -637,6 +652,7 @@ developer, but if you do want to test, t --with-perl=yes \ --with-pthread=yes \ --with-python=yes \ + --with-python3=yes \ --with-readline=yes \ --with-rubygem=yes \ --with-rubygem-dir=%{gem_dir} \ diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -82,6 +82,14 @@ PYTHONLIB=python27.lib !ENDIF PYTHON_LIBDIR=share\MonetDB\python +!IFNDEF PYTHON3BASE +PYTHON3BASE=C:\Python32 +!ENDIF +!IFNDEF PYTHON3LIB +PYTHON3LIB=python32.lib +!ENDIF +PYTHON3_LIBDIR=share\MonetDB\python3 + !IFDEF HAVE_PERL !IFNDEF LIBPERL !IF $(bits) == 32 @@ -362,6 +370,11 @@ create_winconfig_conds_new_py: !ELSE $(ECHO) HAVE_PYTHON_FALSE='' $(TOPDIR)\winconfig_conds_new.py !ENDIF +!IFDEF HAVE_PYTHON3 + $(ECHO) HAVE_PYTHON3_FALSE='#' $(TOPDIR)\winconfig_conds_new.py +!ELSE + $(ECHO) HAVE_PYTHON3_FALSE='' $(TOPDIR)\winconfig_conds_new.py +!ENDIF !IFDEF HAVE_RAPTOR $(ECHO) HAVE_RAPTOR_FALSE='#' $(TOPDIR)\winconfig_conds_new.py !ELSE @@ -424,6 +437,8 @@ CONFIGURE=$(PYTHON) $(CONFIGURE_PY) \ PERL_LIBDIR=$(PERL_LIBDIR) \ PYTHON=$(PYTHON) \ PYTHON_LIBDIR=$(PYTHON_LIBDIR) \ + PYTHON3=$(PYTHON3) \ + PYTHON3_LIBDIR=$(PYTHON3_LIBDIR) \ RUBY_DIR=$(RUBY_DIR) \ TOPDIR=$(TOPDIR) \ VERSION=$(VERSION) \ diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py --- a/buildtools/autogen/autogen/am.py +++
MonetDB: default - Merge with Oct2012 branch.
Changeset: 7496cba6f143 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7496cba6f143 Modified Files: common/options/monet_options.c monetdb5/optimizer/opt_groups.c tools/mserver/mserver5.1 Branch: default Log Message: Merge with Oct2012 branch. diffs (82 lines): diff --git a/common/options/monet_options.c b/common/options/monet_options.c --- a/common/options/monet_options.c +++ b/common/options/monet_options.c @@ -232,7 +232,7 @@ mo_builtin_settings(opt **Set) if (Set == NULL) return 0; -#define N_OPTIONS 12 /*MUST MATCH # OPTIONS BELOW */ +#define N_OPTIONS 11 /*MUST MATCH # OPTIONS BELOW */ set = malloc(sizeof(opt) * N_OPTIONS); if (set == NULL) return 0; @@ -252,10 +252,6 @@ mo_builtin_settings(opt **Set) set[i].value = strdup(0); i++; set[i].kind = opt_builtin; - set[i].name = strdup(gdk_alloc_map); - set[i].value = strdup(no); - i++; - set[i].kind = opt_builtin; set[i].name = strdup(gdk_vmtrim); set[i].value = strdup(yes); i++; diff --git a/monetdb5/optimizer/opt_groups.c b/monetdb5/optimizer/opt_groups.c --- a/monetdb5/optimizer/opt_groups.c +++ b/monetdb5/optimizer/opt_groups.c @@ -28,22 +28,16 @@ OPTgroupsImplementation(Client cntxt, Ma InstrPtr q; InstrPtr *old; int limit,slimit; - Lifespan span; (void) cntxt; (void) stk; - span= setLifespan(mb); - if( span == NULL) - return 0; if (varGetProp(mb, getArg(mb-stmt[0], 0), inlineProp) != NULL) { - GDKfree(span); return 0; } /* beware, new variables and instructions are introduced */ pc= (int*) GDKzalloc(sizeof(int)* mb-vtop * 2); /* to find last assignment */ if ( pc == NULL) { - GDKfree(span); return 0; } @@ -51,7 +45,6 @@ OPTgroupsImplementation(Client cntxt, Ma limit= mb-stop; slimit= mb-ssize; if ( newMalBlkStmt(mb,mb-ssize) 0) { - GDKfree(span); GDKfree(pc); return 0; } @@ -96,7 +89,6 @@ OPTgroupsImplementation(Client cntxt, Ma freeInstruction(old[i]); GDKfree(old); GDKfree(pc); - GDKfree(span); DEBUGoptimizers mnstr_printf(cntxt-fdout,#opt_groups: %d statements glued\n,actions); return actions; diff --git a/tools/mserver/mserver5.1 b/tools/mserver/mserver5.1 --- a/tools/mserver/mserver5.1 +++ b/tools/mserver/mserver5.1 @@ -78,13 +78,6 @@ anonymously. Default: 120 == 1024576 .IP gdk_vmtrim Enable or disable the vmtrim thread which tries to unload memory that is not in use. Default: yes -.IP gdk_alloc_map -This parameter is mainly for debugging with valgrind. -.\ For 32-bit systems, GDK tries claim 3G of (virtual) memory. -.\ set the alloc map to no to run mserver with valgrind; -Also, you need to tell valgrind to use 8-byte alignment, hence: -\(dq\valgrind --alignment=8 mserver5 --set gdk_alloc_map=no ...\(dq\ -This feature should better be disabled for normal use. Default: no .IP gdk_debug You can enable debug output for specific kernel operations. By default debug is switched off for obvious reasons. The value of gdk_debug is an ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 4ff3805aef86 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ff3805aef86 Modified Files: monetdb5/mal/mal_runtime.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_user.c sql/server/sql_env.c Branch: default Log Message: Merge with Oct2012 branch. diffs (84 lines): diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c --- a/monetdb5/mal/mal_runtime.c +++ b/monetdb5/mal/mal_runtime.c @@ -102,7 +102,7 @@ void runtimeTiming(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, int tid, MT_Lock *lock, RuntimeProfile prof) { str line; - if (cntxt-flags stk-cmd != 't' stk-cmd != 'C') { + if (cntxt-flags stk-cmd != '\0' stk-cmd != 't' stk-cmd != 'C') { if (lock) MT_lock_set(*lock, timing); mnstr_printf(cntxt-fdout, = );/* single column rendering */ diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -271,6 +271,7 @@ global_variables(mvc *sql, char *user, c bit T = TRUE; bit F = FALSE; ValRecord src; + str opt; typename = int; sql_find_subtype(ctype, typename, 0, 0); @@ -282,7 +283,9 @@ global_variables(mvc *sql, char *user, c SQLglobal(current_user, user); SQLglobal(current_role, user); /* inherit the optimizer from the server */ - SQLglobal(optimizer, initSQLoptimizer()); + opt = initSQLoptimizer(); + SQLglobal(optimizer, opt); + GDKfree(opt); SQLglobal(trace,show,ticks,stmt); typename = sec_interval; @@ -829,13 +832,16 @@ SQLstatementIntern(Client c, str *expr, } /* -* @- * We have dealt with the first parsing step and advanced the input reader * to the next statement (if any). * Now is the time to also perform the semantic analysis, * optimize and produce code. * We don;t search the cache for a previous incarnation yet. */ + if (c-glb) { + /* MSinitClientPrg clears c-glb, so free it here */ + _DELETE(c-glb); + } MSinitClientPrg(c,user,nme); oldvtop = c-curprg-def-vtop; oldstop = c-curprg-def-stop; diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -213,6 +213,8 @@ monet5_create_privileges(ptr _mvc, sql_s /* following funcion returns a table (single column) of user names with the approriate scenario (sql) */ mvc_create_func(m, NULL, s, db_users, l, tpe, F_FUNC, sql, db_users, CREATE FUNCTION db_users () RETURNS TABLE( name varchar(2048)) EXTERNAL NAME sql.db_users;); + if (m-sa == NULL) + _DELETE(l); t = mvc_create_view(m, s, users, SQL_PERSIST, SELECT u.\name\ AS \name\, diff --git a/sql/server/sql_env.c b/sql/server/sql_env.c --- a/sql/server/sql_env.c +++ b/sql/server/sql_env.c @@ -126,6 +126,8 @@ sql_create_env(mvc *m, sql_schema *s) /* add function */ l = sa_list(m-sa); mvc_create_func(m, NULL, s, env, l, tpe, F_FUNC, sql, sql_environment, CREATE FUNCTION env () RETURNS TABLE( name varchar(1024), value varchar(2048)) EXTERNAL NAME sql.sql_environment;); + if (m-sa == NULL) + _DELETE(l); t = mvc_create_generated(m, s, #var, NULL, 1); mvc_create_column_(m, t, name, varchar, 1024); @@ -137,5 +139,7 @@ sql_create_env(mvc *m, sql_schema *s) /* add function */ l = sa_list(m-sa); mvc_create_func(m, NULL, s, var, l, tpe, F_FUNC, sql, sql_variables, CREATE FUNCTION var() RETURNS TABLE( name varchar(1024)) EXTERNAL NAME sql.sql_variables;); + if (m-sa == NULL) + _DELETE(l); return 0; } ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 3c9067f5937f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c9067f5937f Removed Files: clients/RunMapprove.bat.in clients/RunMapprove.in clients/RunMtest.bat.in clients/RunMtest.in clients/Runmclient.bat.in geom/RunMapprove.bat.in geom/RunMapprove.in geom/RunMserver.bat.in geom/RunMtest.bat.in geom/RunMtest.in monetdb5/RunMapprove.bat.in monetdb5/RunMapprove.in monetdb5/RunMserver.bat.in monetdb5/RunMserver.in monetdb5/RunMtest.bat.in monetdb5/RunMtest.in sql/RunMapprove.bat.in sql/RunMapprove.in sql/RunMserver.bat.in sql/RunMserver.in sql/RunMtest.bat.in sql/RunMtest.in Modified Files: clients/Makefile.ag geom/Makefile.ag java/Makefile.ag java/build.properties java/pom.xml java/release.txt monetdb5/Makefile.ag monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/json.c sql/Makefile.ag Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 1434 to 300 lines): diff --git a/clients/Makefile.ag b/clients/Makefile.ag --- a/clients/Makefile.ag +++ b/clients/Makefile.ag @@ -17,25 +17,4 @@ SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php HAVE_RUBYGEM?ruby examples HAVE_PYTHON?python HAVE_PYTHON?python3 NATIVE_WIN32?NT -EXTRA_DIST = RunMtest.in RunMtest.bat.in \ - RunMapprove.in \ - Runmclient.bat.in - EXTRA_DIST_DIR = Tests - -TESTS = RunMtest -TESTS_ENVIRONMENT = $(SHELL) - -scripts_sh = { - EXT = - COND = NOT_WIN32 - NOINST - SOURCES = RunMapprove.in RunMtest.in -} - -scripts_bat = { - EXT = bat - COND = NATIVE_WIN32 - NOINST - SOURCES = RunMapprove.bat.in Runmclient.bat.in RunMtest.bat.in -} diff --git a/clients/RunMapprove.bat.in b/clients/RunMapprove.bat.in deleted file mode 100644 --- a/clients/RunMapprove.bat.in +++ /dev/null @@ -1,26 +0,0 @@ -@echo off - -if not %1== goto skip -call %0 -r -goto end - -:skip - -setlocal - -set pkg=clients -set buildbase=@XBUILD@ -set builddir=%buildbase%\clients -set srcdir=@XSOURCE@\clients - -set PYTHONPATH=%buildbase%\testing;%srcdir%\..\testing;%PYTHONPATH% - -REM execute Mapprove.py in the source directory -pushd %srcdir% - -call %buildbase%\testing\Mapprove.py --package=%pkg% --TSTTRGBASE=%builddir% %* - -popd -endlocal - -:end diff --git a/clients/RunMapprove.in b/clients/RunMapprove.in deleted file mode 100755 --- a/clients/RunMapprove.in +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the License); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.monetdb.org/Legal/MonetDBLicense -# -# Software distributed under the License is distributed on an AS IS -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2012 MonetDB B.V. -# All Rights Reserved. - -pkg=clients -buildbase=@QBUILD@ -builddir=${buildbase}/clients -# make sure srcdir contains absolute path name -srcdir=`cd '@srcdir@'; pwd` - -PYTHONPATH=${buildbase}/testing:${srcdir}/../testing:${PYTHONPATH} -export PYTHONPATH - -# execute Mapprove.py in the source directory -cd $srcdir - -# execute the script. -# if no arguments, do a recursive approve (Mapprove.py -r), else pass -# on the arguments -exec python ${buildbase}/testing/Mapprove.py --package=${pkg} --TSTTRGBASE=${builddir} ${@--r} diff --git a/clients/RunMtest.bat.in b/clients/RunMtest.bat.in deleted file mode 100644 --- a/clients/RunMtest.bat.in +++ /dev/null @@ -1,41 +0,0 @@ -@echo off - -if not %1== goto skip -call %0 -rq -goto :EOF - -:skip - -setlocal - -set pkg=clients -set buildbase=@XBUILD@ -set srcdir=@XSOURCE@ - -rem binaries (.exe) -set PATH=%buildbase%\clients\examples\C;%PATH% -set PATH=%buildbase%\clients\mapiclient;%PATH% -set PATH=%buildbase%\clients\odbc\samples;%PATH% -set PATH=%buildbase%\testing;%PATH% - -rem libraries (.dll) -set PATH=%buildbase%\clients\mapilib;%PATH% -set PATH=%buildbase%\clients\perl\Cimpl;%PATH% -set PATH=%buildbase%\common\stream;%PATH% - -set PYTHONPATH=%buildbase%\clients\python\build\lib;%buildbase%\testing;%srcdir%\testing;%PYTHONPATH% - -set CLASSPATH=%buildbase%\java;%buildbase%\java\tests;%CLASSPATH% - -set perlib=%buildbase%\clients\perl;%srcdir%\clients\perl -set PERLLIB=%perlib%;%PERLLIB% -set PERL5LIB=%perlib%;%PERL5LIB% - -rem execute Mtest.py in the source directory -pushd %srcdir% - -call %buildbase%\testing\Mtest.py
MonetDB: default - Merge with Oct2012 branch.
Changeset: 981769327e10 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=981769327e10 Branch: default Log Message: Merge with Oct2012 branch. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2012 branch.
Changeset: 6be7362eb489 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6be7362eb489 Modified Files: README common/stream/stream.c monetdb5/extras/jaql/json.c testing/Mtest.py.in Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 451 to 300 lines): diff --git a/README b/README --- a/README +++ b/README @@ -35,3 +35,4 @@ The Initial Developer of the Original Co Portions created by CWI are Copyright (C) 1997-July 2008 CWI. Copyright August 2008-2012 MonetDB B.V. All Rights Reserved. + diff --git a/common/stream/stream.c b/common/stream/stream.c --- a/common/stream/stream.c +++ b/common/stream/stream.c @@ -799,14 +799,57 @@ stream *open_gzwastream(const char *file /* streams working on a bzip2-compressed disk file */ #ifdef HAVE_LIBBZ2 +struct bz { + BZFILE *b; + FILE *f; +}; + +static void +stream_bzclose(stream *s) +{ + int err = BZ_OK; + + if (s-stream_data.p) { + if (s-access == ST_READ) + BZ2_bzReadClose(err, ((struct bz *) s-stream_data.p)-b); + else + BZ2_bzWriteClose(err, ((struct bz *) s-stream_data.p)-b, 0, NULL, NULL); + fclose(((struct bz *) s-stream_data.p)-f); + free(s-stream_data.p); + } + s-stream_data.p = NULL; +} + static ssize_t stream_bzread(stream *s, void *buf, size_t elmsize, size_t cnt) { int size = (int) (elmsize * cnt); - - size = BZ2_bzread((BZFILE *) s-stream_data.p, buf, size); - if (size) - return size / elmsize; + int err; + void *punused; + int nunused; + char unused[BZ_MAX_UNUSED]; + + if (s-stream_data.p) { + size = BZ2_bzRead(err, ((struct bz *) s-stream_data.p)-b, buf, size); + if (err == BZ_STREAM_END) { + /* end of stream, but not necessarily end of +* file: get unused bits, close stream, and +* open again with the saved unused bits */ + BZ2_bzReadGetUnused(err, ((struct bz *) s-stream_data.p)-b, punused, nunused); + if (err == BZ_OK + (nunused 0 || +!feof(((struct bz *) s-stream_data.p)-f))) { + if (nunused 0) + memcpy(unused, punused, nunused); + BZ2_bzReadClose(err, ((struct bz *) s-stream_data.p)-b); + ((struct bz *) s-stream_data.p)-b = BZ2_bzReadOpen(err, ((struct bz *) s-stream_data.p)-f, 0, 0, unused, nunused); + } else { + stream_bzclose(s); + } + } + if (err == BZ_OK) + return size / elmsize; + } return 0; } @@ -814,27 +857,13 @@ static ssize_t stream_bzwrite(stream *s, const void *buf, size_t elmsize, size_t cnt) { int size = (int) (elmsize * cnt); + int err; if (size) { - size = BZ2_bzwrite((BZFILE *) s-stream_data.p, (void *) buf, size); - return size / elmsize; + BZ2_bzWrite(err, ((struct bz *) s-stream_data.p)-b, (void *) buf, size); + if (err == BZ_OK) + return cnt; } - return cnt; -} - -static void -stream_bzclose(stream *s) -{ - if (s-stream_data.p) - BZ2_bzclose((BZFILE *) s-stream_data.p); - s-stream_data.p = NULL; -} - -static int -stream_bzflush(stream *s) -{ - if (s-access == ST_WRITE) - BZ2_bzflush((BZFILE *) s-stream_data.p); return 0; } @@ -842,17 +871,35 @@ static stream * open_bzstream(const char *filename, const char *flags) { stream *s; - BZFILE *fp; - - if ((s = create_stream(filename)) == NULL) + int err; + struct bz *bzp; + + if ((bzp = malloc(sizeof(struct bz))) == NULL) return NULL; - if ((fp = BZ2_bzopen(filename, flags)) == NULL) + if ((s = create_stream(filename)) == NULL) { + free(bzp); + return NULL; + } + if ((bzp-f = fopen(filename, flags)) == NULL) + s-errnr = MNSTR_OPEN_ERROR; + if (strchr(flags, 'r') != NULL) { + bzp-b = BZ2_bzReadOpen(err, bzp-f, 0, 0, NULL, 0); + s-access = ST_READ; + if (err == BZ_STREAM_END) { + BZ2_bzReadClose(err, bzp-b); + bzp-b = NULL; + } + } else { + bzp-b = BZ2_bzWriteOpen(err, bzp-f, 9, 0, 30); + s-access = ST_WRITE; + } + if (err != BZ_OK) s-errnr = MNSTR_OPEN_ERROR; s-read = stream_bzread; s-write = stream_bzwrite; s-close = stream_bzclose; - s-flush =
MonetDB: default - Merge with Oct2012 branch.
Changeset: 88d85bc9f41a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=88d85bc9f41a Added Files: sql/test/testdb-upgrade-chain/Tests/All sql/test/testdb-upgrade-chain/Tests/dump.SQL.py sql/test/testdb-upgrade-chain/Tests/dump.reqtests sql/test/testdb-upgrade-chain/Tests/dump.stable.err sql/test/testdb-upgrade-chain/Tests/dump.stable.out sql/test/testdb-upgrade-chain/Tests/dump.stable.out.Windows sql/test/testdb-upgrade-chain/Tests/dump.timeout sql/test/testdb-upgrade-chain/Tests/package.py sql/test/testdb-upgrade-chain/Tests/package.reqtests sql/test/testdb-upgrade-chain/Tests/package.stable.err sql/test/testdb-upgrade-chain/Tests/package.stable.out sql/test/testdb-upgrade-chain/Tests/unpackage.py sql/test/testdb-upgrade-chain/Tests/unpackage.stable.err sql/test/testdb-upgrade-chain/Tests/unpackage.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.SQL.py sql/test/testdb-upgrade-chain/Tests/upgrade.reqtests sql/test/testdb-upgrade-chain/Tests/upgrade.stable.err sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/All sql/test/testdb-upgrade/Tests/dump.SQL.py sql/test/testdb-upgrade/Tests/dump.reqtests sql/test/testdb-upgrade/Tests/dump.stable.err sql/test/testdb-upgrade/Tests/dump.stable.out sql/test/testdb-upgrade/Tests/dump.stable.out.Windows sql/test/testdb-upgrade/Tests/dump.timeout sql/test/testdb-upgrade/Tests/unpackage.py sql/test/testdb-upgrade/Tests/unpackage.stable.err sql/test/testdb-upgrade/Tests/unpackage.stable.out sql/test/testdb-upgrade/Tests/upgrade.SQL.py sql/test/testdb-upgrade/Tests/upgrade.reqtests sql/test/testdb-upgrade/Tests/upgrade.stable.err sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb/Tests/testdb-package.py sql/test/testdb/Tests/testdb-package.reqtests sql/test/testdb/Tests/testdb-package.stable.err sql/test/testdb/Tests/testdb-package.stable.out Modified Files: java/ChangeLog.Jul2012 java/src/nl/cwi/monetdb/jdbc/MonetConnection.java java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java monetdb5/extras/jaql/json.c sql/test/testdb/Tests/All testing/Mtest.py.in Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 405906 to 300 lines): diff --git a/java/ChangeLog.Jul2012 b/java/ChangeLog.Jul2012 --- a/java/ChangeLog.Jul2012 +++ b/java/ChangeLog.Jul2012 @@ -1,3 +1,7 @@ # ChangeLog file for java # This file is updated with Maddlog +* Tue Aug 14 2012 Fabian Groffen fab...@cwi.nl +- Fixed a bug where DatabaseMetaData.getURL() did return null:0 for + hostname:port. + diff --git a/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java b/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java --- a/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java +++ b/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java @@ -1249,10 +1249,7 @@ public class MonetConnection extends Mon * @return a String representing this Object */ public String toString() { - String language = ; - if (lang == LANG_MAL) language = ?language=mal; - return MonetDB Connection (jdbc:monetdb:// + hostname + - : + port + / + database + language + ) + + return MonetDB Connection ( + getJDBCURL() + ) + (closed ? connected : disconnected); } @@ -1379,6 +1376,14 @@ public class MonetConnection extends Mon //== end methods of interface Connection + public String getJDBCURL() { + String language = ; + if (lang == LANG_MAL) + language = ?language=mal; + return jdbc:monetdb:// + hostname + : + port + / + + database + language; + } + /** * Returns whether the BLOB type should be mapped to BINARY type. */ diff --git a/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java b/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java --- a/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -54,8 +54,6 @@ public class MonetDatabaseMetaData exten * value is read, it is kept in a Map for reuse. */ private synchronized String getEnv(String key) { - - // if due to concurrency on this Class envs is assigned twice, I // just don't care here MapString,String menvs = envs.get(con); @@ -132,9 +130,7 @@ public class MonetDatabaseMetaData exten * @throws SQLException if a database access error occurs */ public String getURL() throws SQLException { -
MonetDB: default - Merge with Oct2012 branch.
Changeset: 5547f451a834 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5547f451a834 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py clients/python3/setup.py configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.config vertoo.data Branch: default Log Message: Merge with Oct2012 branch. diffs (truncated from 397 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1,5 +1,5 @@ %define name MonetDB -%define version 11.12.0 +%define version 11.13.0 %{!?buildno: %define buildno %(date +%Y%m%d)} # groups of related archs diff --git a/NT/installer32/MonetDB-ODBC-Installer.vdproj b/NT/installer32/MonetDB-ODBC-Installer.vdproj --- a/NT/installer32/MonetDB-ODBC-Installer.vdproj +++ b/NT/installer32/MonetDB-ODBC-Installer.vdproj @@ -574,7 +574,7 @@ RemovePreviousVersions = 11:TRUE DetectNewerInstalledVersion = 11:TRUE InstallAllUsers = 11:TRUE -ProductVersion = 8:11.12.0 +ProductVersion = 8:11.13.0 Manufacturer = 8:MonetDB ARPHELPTELEPHONE = 8: ARPHELPLINK = 8:http://www.monetdb.org/; diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj b/NT/installer32/MonetDB5-Geom-Module.vdproj --- a/NT/installer32/MonetDB5-Geom-Module.vdproj +++ b/NT/installer32/MonetDB5-Geom-Module.vdproj @@ -432,7 +432,7 @@ RemovePreviousVersions = 11:TRUE DetectNewerInstalledVersion = 11:TRUE InstallAllUsers = 11:TRUE -ProductVersion = 8:11.12.0 +ProductVersion = 8:11.13.0 Manufacturer = 8:MonetDB ARPHELPTELEPHONE = 8: ARPHELPLINK = 8:http://www.monetdb.org/; diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj b/NT/installer32/MonetDB5-SQL-Installer.vdproj --- a/NT/installer32/MonetDB5-SQL-Installer.vdproj +++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj @@ -2073,7 +2073,7 @@ } {1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_667BD650736E43C9A8B6899179FA0CAA { -SourcePath = 8:share\\doc\\MonetDB-SQL-11.12.0\\dump-restore.txt +SourcePath = 8:share\\doc\\MonetDB-SQL-11.13.0\\dump-restore.txt TargetName = 8:dump-restore.txt Tag = 8: Folder = 8:_6C21CE578F0941D09FDD9951A229FF37 @@ -2633,7 +2633,7 @@ } {1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A9DB6CF8297A4BEEAF7A6D4958A4B0D6 { -SourcePath = 8:share\\doc\\MonetDB-SQL-11.12.0\\dump-restore.html +SourcePath = 8:share\\doc\\MonetDB-SQL-11.13.0\\dump-restore.html TargetName = 8:dump-restore.html Tag = 8: Folder = 8:_6C21CE578F0941D09FDD9951A229FF37 @@ -3757,7 +3757,7 @@ { {9EF0B969-E518-4E46-987F-47570745A589}:_6C21CE578F0941D09FDD9951A229FF37 { -Name = 8:MonetDB-SQL-11.12.0 +Name = 8:MonetDB-SQL-11.13.0 AlwaysCreate = 11:FALSE Condition = 8: Transitive = 11:FALSE @@ -3807,7 +3807,7 @@ RemovePreviousVersions = 11:TRUE DetectNewerInstalledVersion = 11:TRUE InstallAllUsers = 11:TRUE -ProductVersion = 8:11.12.0 +ProductVersion = 8:11.13.0 Manufacturer = 8:MonetDB ARPHELPTELEPHONE = 8: ARPHELPLINK = 8:http://www.monetdb.org/; diff --git a/NT/installer64/MonetDB-ODBC-Installer.vdproj b/NT/installer64/MonetDB-ODBC-Installer.vdproj --- a/NT/installer64/MonetDB-ODBC-Installer.vdproj +++ b/NT/installer64/MonetDB-ODBC-Installer.vdproj @@ -574,7 +574,7 @@ RemovePreviousVersions = 11:TRUE DetectNewerInstalledVersion = 11:TRUE InstallAllUsers = 11:TRUE -ProductVersion = 8:11.12.0 +ProductVersion = 8:11.13.0 Manufacturer = 8:MonetDB ARPHELPTELEPHONE = 8: ARPHELPLINK = 8:http://www.monetdb.org/; diff --git a/NT/installer64/MonetDB5-Geom-Module.vdproj b/NT/installer64/MonetDB5-Geom-Module.vdproj --- a/NT/installer64/MonetDB5-Geom-Module.vdproj +++ b/NT/installer64/MonetDB5-Geom-Module.vdproj @@ -432,7 +432,7 @@ RemovePreviousVersions = 11:TRUE DetectNewerInstalledVersion = 11:TRUE InstallAllUsers =
MonetDB: default - Merge from Oct2012 branch.
Changeset: 4b2335640db7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4b2335640db7 Added Files: sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.sql sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.err sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.out Modified Files: sql/test/BugTracker-2012/Tests/All sql/test/Tests/setoptimizer.stable.out Branch: default Log Message: Merge from Oct2012 branch. diffs (131 lines): diff --git a/sql/test/BugTracker-2012/Tests/All b/sql/test/BugTracker-2012/Tests/All --- a/sql/test/BugTracker-2012/Tests/All +++ b/sql/test/BugTracker-2012/Tests/All @@ -47,3 +47,4 @@ insert_serial_with_unique_key.Bug-3091 with_and_exists.Bug-3099 index_column_crash.Bug-3113 foreign_key.Bug-3114 +cast-tinyint-Bug-3137 diff --git a/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.sql b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.sql @@ -0,0 +1,1 @@ +select cast('10' as tinyint) as not_ok_tinyint, cast('10' as int) as ok_int, cast('10' as smallint) as ok_smallint; diff --git a/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.err b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.err @@ -0,0 +1,37 @@ +stderr of test 'cast-tinyint-Bug-3137` in directory 'test/BugTracker-2012` itself: + + +# 16:45:44 +# 16:45:44 mserver5 --debug=10 --set gdk_nr_threads=0 --set gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB --set mapi_open=true --set mapi_port=34229 --set monet_prompt= --trace --forcemito --set mal_listing=2 --dbname=mTests_test_BugTracker-2012 --set mal_listing=0 +# 16:45:44 + +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_prompt = +# builtin opt monet_daemon = no +# builtin opt mapi_port = 5 +# 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 gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 34229 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_test_BugTracker-2012 +# cmdline opt mal_listing = 0 + +# 16:45:44 +# 16:45:44 mclient -lsql -ftest -Eutf-8 -i -e --host=madrid --port=34229 +# 16:45:44 + + +# 16:45:44 +# 16:45:44 Done. +# 16:45:44 + diff --git a/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.out b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.out @@ -0,0 +1,59 @@ +stdout of test 'cast-tinyint-Bug-3137` in directory 'test/BugTracker-2012` itself: + + +# 16:45:44 +# 16:45:44 mserver5 --debug=10 --set gdk_nr_threads=0 --set gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB --set mapi_open=true --set mapi_port=34229 --set monet_prompt= --trace --forcemito --set mal_listing=2 --dbname=mTests_test_BugTracker-2012 --set mal_listing=0 +# 16:45:44 + +# MonetDB 5 server v11.11.8 (hg id: 087fd3ac9177) +# This is an unreleased version +# Serving database 'mTests_test_BugTracker-2012', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.629 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:34229/ +# MonetDB/GIS module loaded +# MonetDB/JAQL module loaded +# MonetDB/SQL module loaded + +Ready. +# SQL catalog created, loading sql scripts once +# loading sql script: 09_like.sql +# loading sql script: 10_math.sql +# loading sql script: 11_times.sql +# loading sql script: 12_url.sql +# loading sql script: 13_date.sql +# loading sql script: 14_inet.sql +# loading sql script: 15_history.sql +# loading sql script: 16_tracelog.sql +# loading sql script: 17_compress.sql +# loading sql script: 18_dictionary.sql +# loading sql script: 19_cluster.sql +# loading sql script: 20_vacuum.sql +# loading sql script: 21_dependency_functions.sql +# loading sql script: 22_clients.sql +# loading sql script: 23_skyserver.sql +# loading sql script: 24_zorder.sql +# loading sql script: 25_debug.sql +# loading sql script: 39_analytics.sql +# loading sql script: 40_geom.sql +# loading sql script: 80_udf.sql +# loading sql script: 99_system.sql + +# 16:45:44 +# 16:45:44 mclient -lsql -ftest -Eutf-8 -i -e