Changeset: 4c2ca5099b85 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c2ca5099b85
Added Files:
sql/test/BugTracker-2013/Tests/avg_needs_abort_on_error.Bug-3329.sql
sql/test/BugTracker-2013/Tests/avg_needs_abort_on_error.Bug-3329.stable.err
sql/test/BugTracker-2013/Tests/avg_needs_abort_on_error.Bug-3329.stable.out
sql/test/BugTracker-2013/Tests/incorrect_subquery_delete.Bug-3315.sql
sql/test/BugTracker-2013/Tests/incorrect_subquery_delete.Bug-3315.stable.err
sql/test/BugTracker-2013/Tests/incorrect_subquery_delete.Bug-3315.stable.out
sql/test/BugTracker-2013/Tests/mitosis-floor.Bug-3330.sql
sql/test/BugTracker-2013/Tests/mitosis-floor.Bug-3330.stable.err
sql/test/BugTracker-2013/Tests/mitosis-floor.Bug-3330.stable.out
sql/test/BugTracker-2013/Tests/unique_constraint_on_declared_table.Bug-3319.sql
sql/test/BugTracker-2013/Tests/unique_constraint_on_declared_table.Bug-3319.stable.err
sql/test/BugTracker-2013/Tests/unique_constraint_on_declared_table.Bug-3319.stable.out
sql/test/BugTracker-2013/Tests/update_on_declared_table.Bug-3318.sql
sql/test/BugTracker-2013/Tests/update_on_declared_table.Bug-3318.stable.err
sql/test/BugTracker-2013/Tests/update_on_declared_table.Bug-3318.stable.out
Modified Files:
NT/monetdb_config.h.in
gdk/gdk_bbp.c
gdk/gdk_group.c
gdk/gdk_heap.c
gdk/gdk_posix.c
geom/sql/Tests/basic.stable.out
geom/sql/Tests/relation.stable.out
geom/sql/Tests/spatial.stable.out
monetdb5/modules/atoms/Tests/xml00.mal
monetdb5/modules/atoms/Tests/xml00.stable.out
monetdb5/modules/atoms/Tests/xml01.mal
monetdb5/modules/atoms/Tests/xml01.stable.out
monetdb5/modules/atoms/Tests/xml02.mal
monetdb5/modules/atoms/Tests/xml02.stable.out
monetdb5/modules/atoms/Tests/xml03.mal
monetdb5/modules/atoms/Tests/xml03.stable.out
monetdb5/modules/atoms/Tests/xml04.mal
monetdb5/modules/atoms/Tests/xml04.stable.out
monetdb5/modules/atoms/Tests/xml05.mal
monetdb5/modules/atoms/Tests/xml05.stable.out
monetdb5/modules/atoms/Tests/xml10.mal
monetdb5/modules/atoms/Tests/xml10.stable.out
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/batxml.mal
monetdb5/modules/atoms/xml.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_pushselect.c
monetdb5/optimizer/opt_support.c
sql/backends/monet5/Tests/optimizers.stable.err
sql/backends/monet5/Tests/optimizers.stable.out
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_gencode.c
sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
sql/benchmarks/tpch/LOCKED/Tests/02.stable.out
sql/benchmarks/tpch/LOCKED/Tests/04.stable.out
sql/benchmarks/tpch/Tests/01-22.stable.out
sql/benchmarks/tpch/Tests/02.stable.out
sql/benchmarks/tpch/Tests/04.stable.out
sql/common/sql_types.c
sql/include/sql_catalog.h
sql/include/sql_relation.h
sql/rel.txt
sql/server/rel_distribute.c
sql/server/rel_dump.c
sql/server/rel_exp.c
sql/server/rel_exp.h
sql/server/rel_optimizer.c
sql/server/rel_psm.c
sql/server/rel_schema.c
sql/server/rel_select.c
sql/server/rel_select.h
sql/server/rel_updates.c
sql/server/sql_semantic.h
sql/storage/sql_catalog.c
sql/test/BugDay_2005-10-06_2.9.3/Tests/var_char_cast_truncate.SF-1150907.stable.out
sql/test/BugDay_2005-12-19_2.9.3/Tests/timestamp_fraction.SF-1357342.stable.out
sql/test/BugTracker-2008/Tests/OOM_query.SF-2457195.stable.out
sql/test/BugTracker-2008/Tests/groupby_with_NULL.SF-2155606.stable.out
sql/test/BugTracker-2009/Tests/correlated-selection-bug.stable.out
sql/test/BugTracker-2009/Tests/count_bug.SF-2604583.stable.out
sql/test/BugTracker-2009/Tests/double_count_limit_bug.SF-2862146.stable.out
sql/test/BugTracker-2010/Tests/join_problem.Bug-2694.stable.out
sql/test/BugTracker-2011/Tests/aggregate-in-subquery.Bug-2739.stable.out
sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out
sql/test/BugTracker-2011/Tests/exists-select.Bug-2933.stable.out
sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out
sql/test/BugTracker-2011/Tests/rand-with-seed.Bug-2900.stable.out
sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.stable.out
sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.out
sql/test/BugTracker-2012/Tests/simple_select.Bug-2988.stable.out
sql/test/BugTracker-2012/Tests/table_function_with_column_subselects.Bug-3172.stable.err
sql/test/BugTracker-2013/Tests/All
sql/test/BugTracker-2013/Tests/correlated_select.Bug-3250.stable.out
sql/test/BugTracker-2013/Tests/php-size-limit-bug.SQL.bat
sql/test/BugTracker-2013/Tests/php-size-limit-bug.SQL.sh
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.out
sql/test/Tests/order_by_complex_exp.stable.out
sql/test/Tests/round.stable.out
sql/test/Tests/string.stable.out
sql/test/VOC/Tests/VOC.stable.out
sql/test/bugs/Tests/case_substring.stable.out
sql/test/bugs/Tests/crash_order_by.stable.err
sql/test/bugs/Tests/create_insert_select_aggr-bug-00001.stable.out
sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out
sql/test/bugs/Tests/polymorphism.stable.out
sql/test/bugs/Tests/selectlist_subquery-sf-1208599.stable.out
sql/test/bugs/Tests/subselect_single_value-bug-sf-962099.stable.out
sql/test/bugs/Tests/zero_or_one_bug.stable.out
sql/test/mapi/Tests/php_monetdb.SQL.bat
sql/test/mapi/Tests/php_monetdb.SQL.sh
sql/test/mapi/Tests/php_monetdb_nogeom.SQL.bat
sql/test/mapi/Tests/php_monetdb_nogeom.SQL.sh
sql/test/sql_xml/Tests/xml.stable.out
sql/test/sql_xml/Tests/xmlelement_segfault.SF-2812767.stable.out
tools/merovingian/ChangeLog.Feb2013
tools/merovingian/client/monetdb.c
Branch: ssdb
Log Message:
merged with Feb2013
diffs (truncated from 6727 to 300 lines):
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -45,6 +45,9 @@
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
+/* location where binaries are installed */
+/* #undef BINDIR */
+
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
@@ -117,6 +120,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
+/* Define to 1 if you have the <execinfo.h> header file. */
+/* #undef HAVE_EXECINFO_H */
+
/* Define to 1 if you have the `fcntl' function. */
/* #undef HAVE_FCNTL */
@@ -156,6 +162,9 @@
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
+/* Define to 1 if you have the `getexecname' function. */
+/* #undef HAVE_GETEXECNAME */
+
/* Define to 1 if you have the `getlogin' function. */
/* #undef HAVE_GETLOGIN */
@@ -171,6 +180,9 @@
/* Define to 1 if you have the `getrlimit' function. */
/* #undef HAVE_GETRLIMIT */
+/* Define to 1 if you have the `GetSystemInfo' function. */
+/* #undef HAVE_GETSYSTEMINFO */
+
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
@@ -207,6 +219,9 @@
/* Define to 1 if you have the `kill' function. */
/* #undef HAVE_KILL */
+/* Define to 1 if you have the <kvm.h> header file. */
+/* #undef HAVE_KVM_H */
+
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
@@ -286,6 +301,15 @@
#endif
#endif
+/* Define to 1 if you have the <mach/mach_init.h> header file. */
+/* #undef HAVE_MACH_MACH_INIT_H */
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+/* #undef HAVE_MACH_O_DYLD_H */
+
+/* Define to 1 if you have the <mach/task.h> header file. */
+/* #undef HAVE_MACH_TASK_H */
+
/* Define to 1 if you have the `madvise' function. */
/* #undef HAVE_MADVISE */
@@ -313,9 +337,15 @@
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
+/* Define to 1 if you have the <netinet/in.h> header file. */
+/* #undef HAVE_NETINET_IN_H */
+
/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */
+/* Define to 1 if you have the `_NSGetExecutablePath' function. */
+/* #undef HAVE__NSGETEXECUTABLEPATH */
+
/* Define to 1 if you have the <odbcinst.h> header file. */
#define HAVE_ODBCINST_H 1
@@ -563,6 +593,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
+/* Define to 1 if you have the <sys/uio.h> header file. */
+/* #undef HAVE_SYS_UIO_H */
+
/* Define to 1 if you have the <sys/un.h> header file. */
/* #undef HAVE_SYS_UN_H */
@@ -572,6 +605,9 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
+/* Define to 1 if you have the `task_info' function. */
+/* #undef HAVE_TASK_INFO */
+
/* Define to 1 if you have the <termios.h> header file. */
/* #undef HAVE_TERMIOS_H */
@@ -602,6 +638,9 @@
/* Define to 1 if you have the <uuid/uuid.h> header file. */
/* #undef HAVE_UUID_UUID_H */
+/* Define if you have valgrind installed and want to use it */
+/* #undef HAVE_VALGRIND */
+
/* Define to 1 if you have the <winsock2.h> header file. */
#define HAVE_WINSOCK2_H 1
@@ -708,6 +747,9 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "11.15.12"
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
/* Path separator */
#define PATH_SEP ';'
@@ -922,43 +964,6 @@ typedef unsigned char uint8_t;
#endif
#endif
-/* if nothing defined, ALGEBRA is default.
- if ALGEBRA_IS_DEFAULT is defined to 0, SQL is default.
- if both ALGEBRA_IS_DEFAULT and SQL_IS_DEFAULT are defined to 0, we
- fallback to MPS */
-/* Use algebra back-end by default? */
-#ifndef ALGEBRA_IS_DEFAULT
-#if defined(MILPRINT_SUMMER_IS_DEFAULT) && MILPRINT_SUMMER_IS_DEFAULT
-#define ALGEBRA_IS_DEFAULT 0
-#elif defined(SQL_IS_DEFAULT) && SQL_IS_DEFAULT
-#define ALGEBRA_IS_DEFAULT 0
-#else
-#define ALGEBRA_IS_DEFAULT 1
-#endif
-#endif
-
-/* Use milprint_summer back-end by default? */
-#ifndef MILPRINT_SUMMER_IS_DEFAULT
-#if defined(SQL_IS_DEFAULT) && !SQL_IS_DEFAULT && !ALGEBRA_IS_DEFAULT
-#define MILPRINT_SUMMER_IS_DEFAULT 1
-#else
-#define MILPRINT_SUMMER_IS_DEFAULT 0
-#endif
-#endif
-
-/* Use sql back-end by default? */
-#ifndef SQL_IS_DEFAULT
-#if ALGEBRA_IS_DEFAULT || MILPRINT_SUMMER_IS_DEFAULT
-#define SQL_IS_DEFAULT 0
-#else
-#define SQL_IS_DEFAULT 1
-#endif
-#endif
-
-#if (ALGEBRA_IS_DEFAULT + MILPRINT_SUMMER_IS_DEFAULT + SQL_IS_DEFAULT) != 1
-#error "Only one of ALGEBRA_IS_DEFAULT, MILPRINT_SUMMER_IS_DEFAULT,
SQL_IS_DEFAULT can be set to 1"
-#endif
-
#ifndef _SEEN_MONETDB_CONFIG_H
#define _SEEN_MONETDB_CONFIG_H 1
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2624,7 +2624,7 @@ BBPtrim_scan(bat bbppos, bat bbplim)
GDKqsort(lastused, bbptrim, NULL, bbptrimlast,
sizeof(lastused[0]), sizeof(bbptrim[0]), TYPE_int);
for (i = bbptrimfirst = 0; i < bbptrimlast; i++) {
- MEMDEBUG THRprintf(GDKstdout, "#TRIMSCAN: %11d%c
%9d=%s\t(#" BUNFMT ")\n", BBPLASTUSED(lastused[i]), (lastused[i] & 0x80000000)
? '*' : ' ', i, BBPname(bbptrim[i].bid), bbptrim[i].cnt);
+ MEMDEBUG THRprintf(GDKstdout, "#TRIMSCAN: %11d%c
%9d=%s\t(#" BUNFMT ")\n", BBPLASTUSED(lastused[i]), (lastused[i] & (1 << 31)) ?
'*' : ' ', i, BBPname(bbptrim[i].bid), bbptrim[i].cnt);
bbptrim[i].next = i + 1;
}
@@ -2863,7 +2863,7 @@ BBPtrim(size_t target)
}
MEMDEBUG THRprintf(GDKstdout, "#BBPTRIM: %8d%c %7d
%s\n",
BBPLASTUSED(lastused[i]),
- lastused[i] & 0x80000000 ? '*' : ' ',
+ lastused[i] & (1 << 31) ? '*' : ' ',
(int) bbptrim[i].bid,
BBPname(bbptrim[i].bid));
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -70,6 +70,7 @@
* At the MAL level, the multigroup function would perform the dynamic
* optimization.
*/
+
#define GRPnotfound() \
do { \
/* no equal found: start new group */ \
@@ -96,11 +97,184 @@
ngrp++; \
} while (0)
-#define GRPhashloop(TYPE) \
+
+#define GRP_compare_consecutive_values(INIT_0,INIT_1,COMP,KEEP)
\
do { \
- TYPE *w = (TYPE *) Tloc(b, 0); \
- for (r = BUNfirst(b), p = r, q = r + BATcount(b); p < q; p++) {
\
- prb = hash_##TYPE(hs, &w[p]); \
+ INIT_0; \
+ for (r = BUNfirst(b), p = r + 1, q = r + BATcount(b); \
+ p < q; \
+ p++) { \
+ INIT_1; \
+ if ((grps && *grps != prev) || COMP) { \
+ GRPnotfound(); \
+ } else { \
+ ngrps[p - r] = ngrp - 1; \
+ if (histo) \
+ cnts[ngrp - 1]++; \
+ } \
+ KEEP; \
+ if (grps) \
+ prev = *grps++; \
+ } \
+ } while(0)
+
+#define GRP_compare_consecutive_values_tpe(TYPE) \
+ GRP_compare_consecutive_values( \
+ /* INIT_0 */ TYPE *w = (TYPE *) Tloc(b, 0); \
+ TYPE pw = w[BUNfirst(b)] , \
+ /* INIT_1 */ , \
+ /* COMP */ w[p] != pw , \
+ /* KEEP */ pw = w[p] \
+ )
+
+#define GRP_compare_consecutive_values_any() \
+ GRP_compare_consecutive_values( \
+ /* INIT_0 */ pv = BUNtail(bi, BUNfirst(b)) , \
+ /* INIT_1 */ v = BUNtail(bi, p) , \
+ /* COMP */ cmp(v, pv) != 0 , \
+ /* KEEP */ pv = v \
+ )
+
+
+#define GRP_subscan_old_groups(INIT_0,INIT_1,COMP,KEEP)
\
+ do { \
+ INIT_0; \
+ pgrp[grps[0]] = BUNfirst(b); \
+ for (j = r = BUNfirst(b), p = r + 1, q = r + BATcount(b); \
+ p < q; \
+ p++) { \
+ INIT_1; \
+ if (COMP) { \
+ /* range [j, p) is all same value */ \
+ /* i is position where we saw p's old \
+ * group last */ \
+ i = pgrp[grps[p - r]]; \
+ /* p is new position where we saw this \
+ * group */ \
+ pgrp[grps[p - r]] = p; \
+ if (j <= i && i < p) { \
+ /* i is position of equal \
+ * value in same old group as \
+ * p, so p gets same new group \
+ * as i */ \
+ oid grp = ngrps[i - r]; \
+ ngrps[p - r] = grp; \
+ if (histo) \
+ cnts[grp]++; \
+ if (gn->tsorted && \
+ grp != ngrp - 1) \
+ gn->tsorted = 0; \
+ /* we found the value/group \
+ * combination, go to next \
+ * value */ \
+ continue; \
+ } \
+ } else { \
+ /* value differs from previous value */ \
+ j = p; \
+ KEEP; \
+ pgrp[grps[p - r]] = p; \
+ } \
+ /* start a new group */ \
+ GRPnotfound(); \
+ } \
+ } while(0)
+
+#define GRP_subscan_old_groups_tpe(TYPE) \
+ GRP_subscan_old_groups( \
+ /* INIT_0 */ TYPE *w = (TYPE *) Tloc(b, 0); \
+ TYPE pw = w[BUNfirst(b)] , \
+ /* INIT_1 */ , \
+ /* COMP */ w[p] == pw , \
+ /* KEEP */ pw = w[p] \
+ )
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list