Changeset: 52a17b3f4f72 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=52a17b3f4f72 Modified Files: monetdb5/modules/kernel/batstr.c sql/test/Dependencies/Tests/Dependencies.stable.out sql/test/Dependencies/Tests/Dependencies.stable.out.int128 sql/test/Dependencies/Tests/dependency_loop.stable.out sql/test/Dependencies/Tests/dependency_loop.stable.out.int128 sql/test/Dependencies/dependency_DBobjects.sql sql/test/Dependencies/dependency_owner_schema_3.sql testing/difflib.c Branch: default Log Message:
Merge with Mar2018 branch. diffs (truncated from 2141 to 300 lines): diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c --- a/monetdb5/modules/kernel/batstr.c +++ b/monetdb5/modules/kernel/batstr.c @@ -773,13 +773,13 @@ str STRbatPrefix(bat *ret, const bat *l, BUN p,q; bit v, *vp= &v; - prepareOperand2(left,l,right,r,"batstr.prefix"); + prepareOperand2(left,l,right,r,"batstr.startsWith"); if(BATcount(left) != BATcount(right)) { BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); throw(MAL, "batstr.startsWith", ILLEGAL_ARGUMENT " Requires bats of identical size"); } - prepareResult2(bn,left,right,TYPE_bit,"batstr.prefix"); + prepareResult2(bn,left,right,TYPE_bit,"batstr.startsWith"); lefti = bat_iterator(left); righti = bat_iterator(right); @@ -799,7 +799,7 @@ bunins_failed: BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr." "prefix", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.startsWith", OPERATION_FAILED " During bulk operation"); } str STRbatPrefixcst(bat *ret, const bat *l, const str *cst) @@ -809,8 +809,8 @@ str STRbatPrefixcst(bat *ret, const bat BUN p,q; bit v, *vp= &v; - prepareOperand(left,l,"batstr.prefix"); - prepareResult(bn,left,TYPE_bit,"batstr.prefix"); + prepareOperand(left,l,"batstr.startsWith"); + prepareResult(bn,left,TYPE_bit,"batstr.startsWith"); lefti = bat_iterator(left); @@ -826,7 +826,7 @@ str STRbatPrefixcst(bat *ret, const bat bunins_failed: BBPunfix(left->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr""prefix", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.startsWith", OPERATION_FAILED " During bulk operation"); } str STRbatSuffix(bat *ret, const bat *l, const bat *r) @@ -836,13 +836,13 @@ str STRbatSuffix(bat *ret, const bat *l, BUN p,q; bit v, *vp= &v; - prepareOperand2(left,l,right,r,"batstr.suffix"); + prepareOperand2(left,l,right,r,"batstr.endsWith"); if(BATcount(left) != BATcount(right)) { BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); throw(MAL, "batstr.endsWith", ILLEGAL_ARGUMENT " Requires bats of identical size"); } - prepareResult2(bn,left,right,TYPE_bit,"batstr.suffix"); + prepareResult2(bn,left,right,TYPE_bit,"batstr.endsWith"); lefti = bat_iterator(left); righti = bat_iterator(right); @@ -862,7 +862,7 @@ bunins_failed: BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr." "suffix", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.endsWith", OPERATION_FAILED " During bulk operation"); } str STRbatSuffixcst(bat *ret, const bat *l, const str *cst) @@ -872,8 +872,8 @@ str STRbatSuffixcst(bat *ret, const bat BUN p,q; bit v, *vp= &v; - prepareOperand(left,l,"batstr.suffix"); - prepareResult(bn,left,TYPE_bit,"batstr.suffix"); + prepareOperand(left,l,"batstr.endsWith"); + prepareResult(bn,left,TYPE_bit,"batstr.endsWith"); lefti = bat_iterator(left); @@ -889,7 +889,7 @@ str STRbatSuffixcst(bat *ret, const bat bunins_failed: BBPunfix(left->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr""suffix", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.endsWith", OPERATION_FAILED " During bulk operation"); } str STRbatstrSearch(bat *ret, const bat *l, const bat *r) @@ -925,7 +925,7 @@ bunins_failed: BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr." "search", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.search", OPERATION_FAILED " During bulk operation"); } str STRbatstrSearchcst(bat *ret, const bat *l, const str *cst) @@ -952,7 +952,7 @@ str STRbatstrSearchcst(bat *ret, const b bunins_failed: BBPunfix(left->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr""search", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.search", OPERATION_FAILED " During bulk operation"); } str STRbatRstrSearch(bat *ret, const bat *l, const bat *r) @@ -968,7 +968,7 @@ str STRbatRstrSearch(bat *ret, const bat BBPunfix(right->batCacheid); throw(MAL, "batstr.r_search", ILLEGAL_ARGUMENT " Requires bats of identical size"); } - prepareResult2(bn,left,right,TYPE_bit,"batstr.r_search"); + prepareResult2(bn,left,right,TYPE_int,"batstr.r_search"); lefti = bat_iterator(left); righti = bat_iterator(right); @@ -988,7 +988,7 @@ bunins_failed: BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr." "r_search", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.r_search", OPERATION_FAILED " During bulk operation"); } str STRbatRstrSearchcst(bat *ret, const bat *l, const str *cst) @@ -999,7 +999,7 @@ str STRbatRstrSearchcst(bat *ret, const int v, *vp= &v; prepareOperand(left,l,"batstr.r_search"); - prepareResult(bn,left,TYPE_bit,"batstr.r_search"); + prepareResult(bn,left,TYPE_int,"batstr.r_search"); lefti = bat_iterator(left); @@ -1015,7 +1015,7 @@ str STRbatRstrSearchcst(bat *ret, const bunins_failed: BBPunfix(left->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr""r_search", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.r_search", OPERATION_FAILED " During bulk operation"); } str STRbatTail(bat *ret, const bat *l, const bat *r) @@ -1100,13 +1100,13 @@ str STRbatWChrAt(bat *ret, const bat *l, BUN p,q; int v, *vp= &v; - prepareOperand2(left,l,right,r,"batstr.+"); + prepareOperand2(left,l,right,r,"batstr.unicodeAt"); if(BATcount(left) != BATcount(right)) { BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); throw(MAL, "batstr.unicodeAt", ILLEGAL_ARGUMENT " Requires bats of identical size"); } - prepareResult2(bn,left,right,TYPE_bit,"batstr.+"); + prepareResult2(bn,left,right,TYPE_int,"batstr.unicodeAt"); lefti = bat_iterator(left); righti = bat_iterator(right); @@ -1126,7 +1126,7 @@ bunins_failed: BBPunfix(left->batCacheid); BBPunfix(right->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr." "+", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.unicodeAt", OPERATION_FAILED " During bulk operation"); } str STRbatWChrAtcst(bat *ret, const bat *l, const int *cst) @@ -1136,8 +1136,8 @@ str STRbatWChrAtcst(bat *ret, const bat BUN p,q; int v, *vp= &v; - prepareOperand(left,l,"batstr.+"); - prepareResult(bn,left,TYPE_bit,"batstr.+"); + prepareOperand(left,l,"batstr.unicodeAt"); + prepareResult(bn,left,TYPE_int,"batstr.unicodeAt"); lefti = bat_iterator(left); @@ -1153,7 +1153,7 @@ str STRbatWChrAtcst(bat *ret, const bat bunins_failed: BBPunfix(left->batCacheid); BBPunfix(*ret); - throw(MAL, "batstr""+", OPERATION_FAILED " During bulk operation"); + throw(MAL, "batstr.unicodeAt", OPERATION_FAILED " During bulk operation"); } str diff --git a/sql/test/Dependencies/Tests/Dependencies.stable.out b/sql/test/Dependencies/Tests/Dependencies.stable.out --- a/sql/test/Dependencies/Tests/Dependencies.stable.out +++ b/sql/test/Dependencies/Tests/Dependencies.stable.out @@ -87,13 +87,13 @@ Dependencies between database objects % name, name, L4 # name % varchar, varchar, char # type % 7, 8, 10 # length -[ "monetdb", "sys", "DEP_SCHEMA" ] -[ "monetdb", "tmp", "DEP_SCHEMA" ] +[ "monetdb", "bam", "DEP_SCHEMA" ] [ "monetdb", "json", "DEP_SCHEMA" ] [ "monetdb", "profiler", "DEP_SCHEMA" ] -[ "monetdb", "bam", "DEP_SCHEMA" ] +[ "monetdb", "sys", "DEP_SCHEMA" ] [ "monetdb", "test", "DEP_SCHEMA" ] -#SELECT t.name, v.name, 'DEP_VIEW' from tables as t, tables as v, dependencies as dep where t.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type = 1; +[ "monetdb", "tmp", "DEP_SCHEMA" ] +#SELECT t.name, v.name, 'DEP_VIEW' from tables as t, tables as v, dependencies as dep where t.id = dep.id AND v.id = dep.depend_id AND dep.depend_type = 5 AND v.type = 1 order by t.name, v.name; % .t, .v, .L100 # table_name % name, name, L100 # name % varchar, varchar, char # type @@ -111,8 +111,8 @@ Dependencies between database objects % name, trigname, L44 # name % varchar, varchar, char # type % 7, 21, 11 # length +[ "_tables", "system_update_tables", "DEP_TRIGGER" ] [ "schemas", "system_update_schemas", "DEP_TRIGGER" ] -[ "_tables", "system_update_tables", "DEP_TRIGGER" ] [ "t1", "trigger_test", "DEP_TRIGGER" ] [ "t1", "trigger_test_4", "DEP_TRIGGER" ] [ "t2", "trigger_test", "DEP_TRIGGER" ] @@ -122,9 +122,9 @@ Dependencies between database objects % name, name, L42 # name % varchar, varchar, char # type % 5, 15, 8 # length -[ "files", "sq_fkey_file_id", "DEP_FKEY" ] +[ "files", "pg_fkey_file_id", "DEP_FKEY" ] [ "files", "rg_fkey_file_id", "DEP_FKEY" ] -[ "files", "pg_fkey_file_id", "DEP_FKEY" ] +[ "files", "sq_fkey_file_id", "DEP_FKEY" ] [ "t1", "t2_id_t1_fkey", "DEP_FKEY" ] #SELECT t.name, f.name, 'DEP_FUNC' from functions as f, tables as t, dependencies as dep where t.id = dep.id AND f.id = dep.depend_id AND dep.depend_type = 7 AND t.type IN (0, 10) ORDER BY t.name, f.name; % .t, .f, .L42 # table_name @@ -170,40 +170,40 @@ Dependencies between database objects % name, name, L55 # name % varchar, varchar, char # type % 4, 2, 8 # length +[ "age", "v1", "DEP_VIEW" ] [ "id", "v1", "DEP_VIEW" ] [ "name", "v1", "DEP_VIEW" ] -[ "age", "v1", "DEP_VIEW" ] -#SELECT c.name, k.name, 'DEP_KEY' from columns as c, objects as kc, keys as k where kc."name" = c.name AND kc.id = k.id AND k.table_id = c.table_id AND k.rkey = -1; +#SELECT c.name, k.name, 'DEP_KEY' from columns as c, objects as kc, keys as k where kc."name" = c.name AND kc.id = k.id AND k.table_id = c.table_id AND k.rkey = -1 order by c.name, k.name; % .c, .k, .L17 # table_name % name, name, L17 # name % varchar, varchar, char # type % 20, 44, 7 # length -[ "id", "comments_id_pkey", "DEP_KEY" ] [ "dependency_type_id", "dependency_types_dependency_type_id_pkey", "DEP_KEY" ] [ "dependency_type_name", "dependency_types_dependency_type_name_unique", "DEP_KEY" ] -[ "srid", "spatial_ref_sys_srid_pkey", "DEP_KEY" ] -[ "keyword", "keywords_keyword_pkey", "DEP_KEY" ] -[ "table_type_id", "table_types_table_type_id_pkey", "DEP_KEY" ] -[ "table_type_name", "table_types_table_type_name_unique", "DEP_KEY" ] +[ "file_id", "files_pkey_file_id", "DEP_KEY" ] +[ "file_id", "pg_pkey_id_file_id", "DEP_KEY" ] +[ "file_id", "rg_pkey_id_file_id", "DEP_KEY" ] +[ "file_id", "sq_pkey_sn_file_id", "DEP_KEY" ] [ "function_type_id", "function_types_function_type_id_pkey", "DEP_KEY" ] [ "function_type_name", "function_types_function_type_name_unique", "DEP_KEY" ] -[ "language_id", "function_languages_language_id_pkey", "DEP_KEY" ] -[ "language_name", "function_languages_language_name_unique", "DEP_KEY" ] +[ "id", "comments_id_pkey", "DEP_KEY" ] +[ "id", "pg_pkey_id_file_id", "DEP_KEY" ] +[ "id", "rg_pkey_id_file_id", "DEP_KEY" ] +[ "id", "t1_id_pkey", "DEP_KEY" ] +[ "index_type_id", "index_types_index_type_id_pkey", "DEP_KEY" ] +[ "index_type_name", "index_types_index_type_name_unique", "DEP_KEY" ] [ "key_type_id", "key_types_key_type_id_pkey", "DEP_KEY" ] [ "key_type_name", "key_types_key_type_name_unique", "DEP_KEY" ] -[ "index_type_id", "index_types_index_type_id_pkey", "DEP_KEY" ] -[ "index_type_name", "index_types_index_type_name_unique", "DEP_KEY" ] +[ "keyword", "keywords_keyword_pkey", "DEP_KEY" ] +[ "language_id", "function_languages_language_id_pkey", "DEP_KEY" ] +[ "language_name", "function_languages_language_name_unique", "DEP_KEY" ] [ "privilege_code_id", "privilege_codes_privilege_code_id_pkey", "DEP_KEY" ] [ "privilege_code_name", "privilege_codes_privilege_code_name_unique", "DEP_KEY" ] -[ "file_id", "files_pkey_file_id", "DEP_KEY" ] [ "sn", "sq_pkey_sn_file_id", "DEP_KEY" ] -[ "file_id", "sq_pkey_sn_file_id", "DEP_KEY" ] -[ "id", "rg_pkey_id_file_id", "DEP_KEY" ] -[ "file_id", "rg_pkey_id_file_id", "DEP_KEY" ] -[ "id", "pg_pkey_id_file_id", "DEP_KEY" ] -[ "file_id", "pg_pkey_id_file_id", "DEP_KEY" ] -[ "id", "t1_id_pkey", "DEP_KEY" ] -#SELECT c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc."name" = c.name AND kc.id = i.id AND c.table_id = i.table_id AND i.name not in (select name from keys); +[ "srid", "spatial_ref_sys_srid_pkey", "DEP_KEY" ] +[ "table_type_id", "table_types_table_type_id_pkey", "DEP_KEY" ] +[ "table_type_name", "table_types_table_type_name_unique", "DEP_KEY" ] +#SELECT c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc."name" = c.name AND kc.id = i.id AND c.table_id = i.table_id AND i.name not in (select name from keys) order by c.name, i.name; % .c, .i, .L21 # table_name % name, name, L21 # name % varchar, varchar, char # type @@ -417,12 +417,12 @@ Dependencies between database objects % name, name, L17 # name % varchar, varchar, char # type % 6, 14, 11 # length -[ "id_t1", "trigger_test", "DEP_TRIGGER" ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list