Default inline is GCC only
Introduce extra hash dedup helper functions

Introduce extra hash-dedup helper functions to enable thor to optimize
the implementation.  Also indicate whether the entire row is being
deduped - to avoid conversion to a key.

See Issue #2700.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Provide a function for estimating allocated row capacity

For hash dedup if the dedup criteria are much smaller than the full row
then it is worth saving just the dedup fields.  However this may cause
extra work, may use more memory if the deduped rows are held in memory
(e.g., by a sort), or if there is little difference in the shrunk size.

To help this last criteria, this function allows thor to determine
whether or not removing some fields is likely to reduce the memory
usage.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
gh-2748 Minor memory leak

Some components, including standalone Roxie programs and possibly others,
have a one-off leak in getConfigurationDirectory. Other than creating
noise in memory leak reports this would have no other impact.

Fixes gh-2748.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Allow RIGHT ONLY joins against indexes

Previously JOIN(ds,index,condition,RIGHT ONLY); generated an error
because keyed joins didn't support right only joins.  It also meant
that in some situations (see examples) the error was missed, and an
invalid keyed join was generated.

This change allows that join to occur - but still generates an error
if KEYED() is used in the join condition, or as an attribute of the
join.

Addresses bugzilla #100824

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #2754 from ghalliday/bug100824

Allow RIGHT ONLY joins against indexes

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2750 from richardkchapman/memleak-gh-2748

gh-2748 Minor memory leak

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Fix crash on linux generating a field usage report

The code was passing parameters field.getClear() and field->queryName(),
but the execution order isn't defined, leading to an invalid access of
field->

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
gh-2764 Core dumps possible if mix debug/release .so's

The unicodelib plugin compiled in debug mode can core if used with a jlib
compiled in release mode (and probably the reverse). This is caused by
the different definition of the Atom class in the two modes, which causes
chaos if inline calls to the constructor are made in both modes.

Modern debuggers are capable of displaying the value in an Atom without
the 'DbgReadable' field, so remove it.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
gh-2763 Fix valgrind error running compiler test suite

Make sure that log handler is cleared before closing the log file.

Fixes gh-2763.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2770 from richardkchapman/valgrind-gh2763

gh-2763 Fix valgrind error running compiler test suite

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merge pull request #2769 from richardkchapman/atom-debug-gh2764

gh-2764 Core dumps possible if mix debug/release .so's

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merge pull request #2766 from ghalliday/fieldusagebug

Fix crash on linux generating a field usage report

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2743 from ghalliday/hashhelpers

Introduce hash dedup helper functions 

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2687 from rengolin/warnings

Default inline is GCC only

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>