WL#1722: Falcon: streamline/simplify @@variable creation process

Affects: Server-6.0   —   Status: Complete

now to add a new system variable one needs to
1. create an instance of a appropriate sys_var_xxx class (or write a new class
if there is no one)
2. add it to a list of variables visible in SELECT @@xxx
3. add it to the list of mysqld --command-line-options
4. add it to the list for SHOW VARIABLES

steps 2,3,4 should be eliminated.

one of the possible approaches - in a constructor each variable adds itself to
the above mentioned lists.

See also WL#1160

See WL#2936 as it provides a mechanism for a plugin to declare system 
variables which are accessible from the command line, as @@ variables and SHOW 
VARIABLES.

In order to implement this feature, the existing Falcon command line options 
(declared within sql/mysqld.cc) and system variables (sql/set_var.cc) should 
be removed and be redeclared within the Falcon code 
(storage/falcon/ha_falcon.cc)
1. Remove Falcon specific options, option processing and global variable 
declarations from sql/mysqld.cc
2. Insert declarations for system variables into storage/falcon/ha_falcon.cpp 
using the structures created in WL#2936


Currently Falcon declares 7 system variables/command line options:

  falcon-debug-server         boolean
  falcon-log-dir              string
  falcon-log-mask             integer
  falcon-max-record-memory    long long
  falcon-min-record-memory    long long
  falcon-page-cache-size      long long
  falcon-page-size            integer
Possible declarations for Falcon system variables are as follows:

static MYSQL_SYSVAR_BOOL(debug_server, falcon_debug_server,
  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
  "Enable Falcon debug code.",
  NULL, NULL, FALSE);

static MYSQL_SYSVAR_STR(log_dir, falcon_log_dir,
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
  "Falcon log file directory.",
  NULL, NULL, NULL);

static MYSQL_SYSVAR_INT(log_mask, falcon_log_mask,
  PLUGIN_VAR_RQCMDARG,
  "Falcon message type mask for logged messages.",
  NULL, NULL, 8191, 0, INT_MAX, 0);

static MYSQL_SYSVAR_ULONGLONG(max_record_memory, falcon_max_record_memory,
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
  "The amount of record memory that will trigger record scavenging.",
  NULL, NULL, LL(20)<<20, LL(4)<<20, (ulonglong) ~0, LL(1)<<20);

static MYSQL_SYSVAR_ULONGLONG(min_record_memory, falcon_min_record_memory,
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
  "The target amount of active record memory after record scavenging.",
  NULL, NULL, 0, 0, (ulonglong) ~0, LL(1)<<20);

static MYSQL_SYSVAR_ULONGLONG(page_cache_size, falcon_page_cache_size,
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
  "The amount of memory to be used for the database page cache.",
  NULL, NULL, LL(4)<<20, LL(2)<<20, (ulonglong) ~0, LL(1)<<20);

static MYSQL_SYSVAR_UINT(page_size, falcon_page_size,
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
  "The page size used when creating a Falcon tablespace.",
  NULL, NULL, 4096, 1024, 32768, 1024);

The variables page_cache_size, min_record_memory and max_record_memory should 
be declared as 'unsigned long long' to avoid compiler casting errors.