Always add a U suffix to an unsigned constant

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Various index count and aggregate fixes

Remove projects from count(keyed-limit(project(index)))
  A missing case from a switch statement meant projects weren't
  stripped when there was a keyed limit on the index read.

Reduce the generated code size for an index count/exists
  The numValid(size, ptr) member was never called for an index, so default
  it to throwing an exception in the base class, and clean up numValid(ptr)
  code.

CHOOSEN(LIMIT(index-read))
  The choosen was not being combined within the compound indexread if there
  was a limit.  It is however valid to do so since the choosen is done last.
  (A limit cannot be combined when there is an existing choosen.)
  This was unfortunate because it was frustrating  another optimization.
  count(index-read) > n being converted to count(choosen(index-read,n+1)) > n
  (This is temporarily retained, but will be removed in a subsequent commit).

IF(count(x) > 0, x, y) optimization
  Currently the intention is to perform a count-index on x before reading x.
  However if x contains a limit,skip it is going to need to read the entire
  result, so don't perform the count separately.

Don't generate count(index) if there is a skip limit

Optimize count(x) > 0 to exists(x)
  Instead of (count(x) > 0) becoming count(choosen(x, 1)) > 0 it is now
  transformed to exists(x) - which is either as efficient, or more
  efficient as the count representation.

Remove no_notexists since never created

Terminate hthor exists aggregate activity early

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
ISSUE:#1714 Restrict special chars from comp names

configgen will indicate and error when encountering
special characters in component names.

configmgr will pop-up an error when users attempt
to enter special characters for component names

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
gh-1997 Fix usability issues for User Permission view

Existing user permission page has two usability issues.
(1) multiple permission tables are displayed in one page
which makes the page difficult to read. (2) for each
permission table (permission group), there is an Add
button which allows to add more permission to that group.
The page shows the Add button and the reource list even
though no more permission can be added for some resources.
This fix only shows the first permission table and the
expend links for other tables. This fix also filters out
the resources from the resource list if no more permission
can be added. If the resource list is empty, the Add
button will not be displayed for that permission table.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
ISSUE:1190 envgen error checking for integer params

Add integer validation for command line
parameters.

Add meaningful error messages when integer
validation fails.

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
cannotRemove refactoring

Renamed cannotModify to canModify, same with remove,
and moving the logic inside the file, since it didn't
belong to directories anyway. Instead of using flags,
now using what the methods mean and one call the other
when need.

There is a kludge in Dir::cannotRemove() that will be
cleaned in a subsequent patch, as soon as doRemoveEntry
gets a file as argument, not a filename.

If I manage to finish this second step before this pull
request is pulled, I'll merge them two.
Add superfile name to error
Fix regressions in recent inline table code

- Wrong type was used in a comparison expression creating an assert

- Temp row was creating the wrong TAK kind - which meant it crashed
  at runtime.

- TempRow should have been changed to inlinerow (probably part of the
  cause of the TAKkind issue).

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
This commit only reformats the code.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
gh-1776 EclWatch pauses/clears queues for Roxie/HThor

A drop down menu is added for Roxie/HThor cluster to
pauses/clears queues. I also improved the index.xslt:
better confirmation messages; removed old code lines
which are no longer used; changed some function names
and variable names for better read.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Revised based on review

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Emergency fixes to Installing_and_RunningTheHPCCPlatform/hpcc_ldap.xml doc and images
Pagination issues for the Ldap document sections
Fix #2090 Rename ECL macro args and enhance descriptions

Renamed the pipe macro arguments and comments to better reflect their meaning

Signed-off-by: russ <russ@russ-VirtualBox.(none)>
Roxie generated filenames for index parts were incorrect

Roxie generating file names for index parts other than the top-level
key incorrectly. This would lead to some confusion, and possibly additional
copying of files, but no other ill effect as far as I can see.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Roxie file cache was not checking timestamps

The code for checking and comparing filestamps when deciding if Roxie's
cached copy of a file was up to date seems to have been lost in the
big refactoring of package files, meaning that file mismatches would only
be detected when the size changed.

This had a few unfortunate effects:

1. Index changes are likely to be only detected by slaves but not by server
   nodes. This leads to 'partially suspended' queries which were are not
   giving helpful error messages.
2. If data is refreshed on thor, Roxie might continue to read a previously
   cached version of the data, even if Roxie was restarted.

See gh-2096. This is not a complete fix for all the issues there, since Roxie
is still falsely reporting that two versions of a data file are required
at the same time when all queries using the previous version have been
unloaded.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Roxie assert error on partially suspended queries

If a Roxie slave thinks that a query is suspended, but the server does not
(this can happen when a file part is missing, for example), then the error
reported if the query is executed wille be an internal assert failure
rather than something more helpful.

See issue gh-2096.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Roxie caching local files too long

Roxie was nto clearing the local file cache when the last query
that referenced a file was released. This means that it was not
possible to load a new query that referenced an updated version
of a file without restarting roxie

Fixes gh-2096.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2099 from richardkchapman/roxie-filenames

Roxie generated filenames for index parts were incorrect

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merge pull request #2100 from richardkchapman/roxie-filedates

Roxie filedates

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>