struct = { 'Advanced': { 'General': { 'default_week_format': 'server',
                             'enable-pstack': 'server',
                             'flush': 'server',
                             'flush_time': 'server',
                             'gdb': 'server',
                             'low-priority-updates': 'server',
                             'max_error_count': 'server',
                             'max_prepared_stmt_count': 'server',
                             'max_sp_recursion_depth': 'server',
                             'memlock': 'server',
                             'old-alter-table': 'server',
                             'old-style-user-limits': 'server',
                             'open-files-limit': 'server',
                             'skip-event-scheduler': 'server',
                             'skip-external-locking': 'server',
                             'skip-safemalloc': 'server',
                             'skip-stack-trace': 'server',
                             'sync_frm': 'server',
                             'sysdate-is-now': 'server',
                             'tc-heuristic-recover': 'server',
                             'updatable_views_with_limit': 'server',
                             'use-symbolic-links': 'server'},
                'Insert delayed settings': { 'delayed_insert_limit': 'server',
                                             'delayed_insert_timeout': 'server',
                                             'delayed_queue_size': 'server',
                                             'max_delayed_threads': 'server'},
                'Localization': { 'default-character-set': 'server',
                                  'default-collation': 'server',
                                  'default-time-zone': 'server',
                                  'language': 'server'},
                'Thread specific settings': { 'one-thread': 'server',
                                              'skip-thread-priority': 'server',
                                              'slow_launch_time': 'server',
                                              'thread_cache_size': 'server',
                                              'thread_concurrency': 'server',
                                              'thread_handling': 'server',
                                              'thread_stack': 'server',
                                              'thread_pool_size': 'server'},
                'Various': { 'ansi': 'server',
                             'back_log': 'server',
                             'big-tables': 'server',
                             'bind-address': 'server',
                             'binlog_cache_size': 'binlog',
                             'binlog_stmt_cache_size': 'binlog',
                             'max_binlog_stmt_cache_size': 'binlog',
                             'binlog_direct_non_transactional_updates': 'binlog',
                             'bulk_insert_buffer_size': 'myisam',
                             'chroot': 'security',
                             'core-file': 'server',
                             'delay-key-write': 'myisam',
                             'group_concat_max_len': 'server',
                             'join_buffer_size': 'server',
                             'key_cache_block_size': 'server',
                             'key_cache_division_limit': 'server',
                             'lower_case_table_names': 'server',
                             'max_binlog_cache_size': 'binlog',
                             'max_heap_table_size': 'server',
                             'max_join_size': 'server',
                             'max_length_for_sort_data': 'server',
                             'max_seeks_for_key': 'server',
                             'max_sort_length': 'server',
                             'max_tmp_tables': 'server',
                             'max_write_lock_count': 'server',
                             'merge':'server',
                             'skip-merge':'server',
                             'new': 'server',
                             'pid-file': 'server',
                             'preload_buffer_size': 'server',
                             'query_alloc_block_size': 'server',
                             'query_prealloc_size': 'server',
                             'range_alloc_block_size': 'server',
                             'read_buffer_size': 'server',
                             'read_rnd_buffer_size': 'server',
                             'sql-mode': 'server',
                             'symbolic-links': 'server',
                             'table_cache': 'server',
                             'temp-pool': 'server',
                             'tmp_table_size': 'myisam',
                             'transaction-isolation': 'server',
                             'transaction_alloc_block_size': 'server',
                             'transaction_prealloc_size': 'server',
                             'user': 'server',
                             'skip-bdb': 'server',
                             'skip-isam': 'server',
                             'skip-new': 'server',
                             'skip-partition': 'server',
                             'skip-symlink': 'server',
                             'skip-sync-bdb-logs': 'server'
                             }},
  'General': { 'Directories': { 'basedir': 'server',
                                'datadir': 'server',
                                'tmpdir': 'server'},
               'General': {
                            'console': 'server',
                            #'datetime_format': 'server',  it seem the option was removed from cnf
                            'debug-sync-timeout': 'server',
                            'default-storage-engine': 'server',
                            'default-table-type': 'server',
                            'lower_case_file_system': 'server',
                            'old': 'server',
                            'partition': 'server',
                            'plugin-load': 'server',
                            'plugin_dir': 'server',
                            'port-open-timeout': 'server',
                            'skip-character-set-client-handshake': 'server',
                            'standalone': 'server',
                            #'time_format': 'server', it seems the option was removed from cnf
                            'verbose': 'server',
                            'character-set-client-handshake': 'server',
                            'character-set-filesystem': 'server',
                            'character-set-server': 'server',
                            'character-sets-dir': 'server',
                            'collation-server': 'server',
                            'init-file' : 'misc'
                            },
               'Memory usage': { 'sort_buffer_size': 'server'},
               'Networking': { 'enable-named-pipe': 'server',
                               'port': 'server',
                               'skip-networking': 'security'}},
  'InnoDB': { 'Activate InnoDB': { 'innodb': 'innodb'
                                            },
                         'Datafiles': { 'innodb_data_file_path': 'innodb',
                                        'innodb_data_home_dir': 'innodb',
                                        'innodb_file_per_table': 'innodb'},
                         'General': { 'autocommit': 'server',
                                      'ignore-builtin-innodb': 'server',
                                      'innodb_adaptive_flushing': 'innodb',
                                      'innodb_adaptive_hash_index': 'innodb',
                                      'innodb_autoextend_increment': 'innodb',
                                      'innodb_autoinc_lock_mode': 'innodb',
                                      'innodb_change_buffering': 'innodb',
                                      'innodb_checksums': 'innodb',
                                      'innodb_commit_concurrency': 'innodb',
                                      'innodb_concurrency_tickets': 'innodb',
                                      'innodb_doublewrite': 'innodb',
                                      'innodb_file_format': 'innodb',
                                      'innodb_file_format_check': 'innodb',
                                      'innodb_io_capacity': 'innodb',
                                      'innodb_locks_unsafe_for_binlog': 'innodb',
                                      'innodb_max_purge_lag': 'innodb',
                                      'innodb_old_blocks_pct': 'innodb',
                                      'innodb_old_blocks_time': 'innodb',
                                      'innodb_read_ahead_threshold': 'innodb',
                                      'innodb_read_io_threads': 'innodb',
                                      'innodb_replication_delay': 'innodb',
                                      'innodb_rollback_on_timeout': 'innodb',
                                      'innodb_spin_wait_delay': 'innodb',
                                      'innodb_stats_on_metadata': 'innodb',
                                      'innodb_stats_sample_pages': 'innodb',
                                      'innodb-status-file': 'innodb',
                                      'innodb_strict_mode': 'innodb',
                                      'innodb_support_xa': 'innodb',
                                      'innodb_sync_spin_loops': 'innodb',
                                      'innodb_table_locks': 'innodb',
                                      'innodb_thread_sleep_delay': 'innodb',
                                      'innodb_use_legacy_cardinality_algorithm': 'innodb',
                                      'innodb_use_sys_malloc': 'innodb',
                                      'innodb_write_io_threads': 'innodb',
                                      'timed_mutexes': 'innodb'

                                      },
                         'Logfiles': { 'innodb_flush_log_at_trx_commit': 'innodb',
                                       'innodb_flush_method': 'innodb',
                                       'innodb_log_arch_dir': 'innodb',
                                       'innodb_log_archive': 'innodb',
                                       'innodb_log_buffer_size': 'innodb',
                                       'innodb_log_file_size': 'innodb',
                                       'innodb_log_files_in_group': 'innodb',
                                       'innodb_log_group_home_dir': 'innodb',
                                       'innodb_mirrored_log_groups': 'innodb',
                                       'innodb-safe-binlog': 'innodb'
                                       },
                         'Memory': { 'innodb_additional_mem_pool_size': 'innodb',
                                     'innodb_buffer_pool_awe_mem_mb': 'innodb',
                                     'innodb_buffer_pool_size': 'innodb',
                                     'innodb_buffer_pool_instances': 'innodb'
                                     },
                         'Various': { 'innodb_fast_shutdown': 'innodb',
                                      'innodb_file_io_threads': 'innodb',
                                      'innodb_force_recovery': 'innodb',
                                      'innodb_lock_wait_timeout': 'innodb',
                                      'innodb_max_dirty_pages_pct': 'innodb',
                                      'innodb_open_files': 'innodb',
                                      'innodb_thread_concurrency': 'innodb',
                                      'innodb_extra_dirty_writes': 'innodb',
                                      'innodb_file_format_max': 'innodb',
                                      'innodb_max_merged_io': 'innodb',
                                      'innodb_purge_batch_size': 'innodb',
                                      'innodb_thread_concurrency_timer_based': 'innodb',
                                      'innodb_purge_threads': 'innodb',
                                      'innodb_use_native_aio': 'innodb'
                                    }},
  'Log Files': { 'Activate Logging': { 'general-log': 'server',
                                       'log': 'server',
                                       'log-bin': 'server',
                                       'log-error': 'server',
                                       'log-isam': 'myisam',
                                       'log-slow-queries': 'server'},
                 'Advanced log options': { 'expire_logs_days': 'server',
                                           'general_log_file': 'server',
                                           'log-output': 'server',
                                           'log-queries-not-using-indexes': 'server',
                                           'log-short-format': 'server',
                                           'log-tc': 'server',
                                           'log-tc-size': 'server',
                                           'log-warnings': 'server',
                                           'min-examined-row-limit': 'server'},
                 'Binlog Options': { 'binlog-do-db': 'binlog',
                                     'binlog-format': 'binlog',
                                     'binlog-ignore-db': 'binlog',
                                     'binlog-row-event-max-size': 'binlog',
                                     'log-bin-index': 'server',
                                     'log-bin-trust-function-creators': 'server',
                                     'log-bin-trust-routine-creators': 'server',
                                     'max-binlog-dump-events': 'binlog',
                                     'max_binlog_size': 'binlog',
                                     'sporadic-binlog-dump-fail': 'binlog',
                                     'sync_binlog': 'server'},
                 'Slow query log options': { 'log-slow-admin-statements': 'server',
                                             'log-slow-slave-statements': 'server',
                                             'long_query_time': 'server',
                                             'slow-query-log': 'server',
                                             'slow_query_log_file': 'server'}},
  'MyISAM': { 'Advanced Settings': { 'myisam-block-size': 'myisam',
                                                'myisam-recover': 'myisam',
                                                'myisam_data_pointer_size': 'myisam',
                                                'myisam_max_extra_sort_file_size': 'myisam',
                                                'myisam_max_sort_file_size': 'myisam',
                                                'myisam_repair_threads': 'myisam',
                                                'myisam_sort_buffer_size': 'myisam',
                                                'myisam_stats_method': 'myisam',
                                                'myisam_use_mmap': 'myisam',
                                                'skip-concurrent-insert': 'myisam',
                                                'myisam-recover-options': 'myisam',
                                                'myisam_mmap_size': 'myisam'},
                         'Fulltext search': { 'ft_max_word_len': 'server',
                                              'ft_min_word_len': 'server',
                                              'ft_query_expansion_limit': 'server',
                                              'ft_stopword_file': 'server',
                                              'ft_boolean_syntax':  'server'},
                         'General': { 'concurrent_insert': 'myisam',
                                      'external-locking': 'server',
                                      'keep_files_on_create': 'server',
                                      'key_buffer_size': 'myisam',
                                      'key_cache_age_threshold': 'server',
                                      'skip-locking': 'server'}},
  'NDB': { 'General': { 'ndb-batch-size': 'ndb',
                                   'ndb-cluster-connection-pool': 'ndb',
                                   'ndb-connectstring': 'ndb',
                                   'ndb-log-update-as-write': 'ndb',
                                   'ndb-mgmd-host': 'ndb',
                                   'ndb-nodeid': 'ndb',
                                   'ndb-wait-setup': 'ndb',
                                   'ndb_autoincrement_prefetch_sz': 'ndb',
                                   'ndb_cache_check_time': 'ndb',
                                   'ndb_extra_logging': 'ndb',
                                   'ndb_force_send': 'ndb',
                                   'ndb_index_stat_cache_entries': 'ndb',
                                   'ndb_index_stat_enable': 'ndb',
                                   'ndb_index_stat_update_freq': 'ndb',
                                   'ndb_log_empty_epochs': 'ndb',
                                   'ndb_log_updated_only': 'ndb',
                                   'ndb_optimized_node_selection': 'ndb',
                                   'ndb_report_thresh_binlog_epoch_slip': 'ndb',
                                   'ndb_report_thresh_binlog_mem_usage': 'ndb',
                                   'ndb_use_transactions': 'ndb',
                                   'ndb-wait-connected': 'ndb',
                                   'ndbcluster': 'ndb',
                                   'skip-ndbcluster': 'ndb'}},
  'Networking': { 'Advanced': { 'max_connect_errors': 'server',
                                'max_connections': 'server',
                                'max_user_connections': 'server',
                                'net_retry_count': 'server'},
                  'Data / Memory size': { 'max_allowed_packet': 'server',
                                          'net_buffer_length': 'server'},
                  'General': { 'socket': 'server'},
                  'Naming': { 'skip-host-cache': 'server',
                              'skip-name-resolve': 'security'},
                  'Timeout Settings': { 'connect_timeout': 'server',
                                        'interactive_timeout': 'server',
                                        'net_read_timeout': 'server',
                                        'net_write_timeout': 'server',
                                        'wait_timeout': 'server'}},
  'Performance': { 'General': { 'safe-mode': 'server',
                                'table_definition_cache': 'server',
                                'table_open_cache': 'server'},
                   'Optimize': { 'optimizer_prune_level': 'server',
                                 'optimizer_search_depth': 'server',
                                 'optimizer_switch': 'server'},
                   'Query cache': { 'query_cache_limit': 'server',
                                    'query_cache_min_res_unit': 'server',
                                    'query_cache_size': 'server',
                                    'query_cache_type': 'server',
                                    'query_cache_wlock_invalidate': 'server',
                                    'replicate-same-server-id': 'replication'},
                   'Performance Schema' : {
                                            'performance_schema' : 'perfschema',
                                            'performance_schema_events_waits_history_long_size' : 'perfschema',
                                            'performance_schema_events_waits_history_size' : 'perfschema',
                                            'performance_schema_max_cond_classes' : 'perfschema',
                                            'performance_schema_max_cond_instances' : 'perfschema',
                                            'performance_schema_max_file_classes' : 'perfschema',
                                            'performance_schema_max_file_handles' : 'perfschema',
                                            'performance_schema_max_file_instances' : 'perfschema',
                                            'performance_schema_max_mutex_classes' : 'perfschema',
                                            'performance_schema_max_mutex_instances' : 'perfschema',
                                            'performance_schema_max_rwlock_classes' : 'perfschema',
                                            'performance_schema_max_rwlock_instances' : 'perfschema',
                                            'performance_schema_max_table_handles' : 'perfschema',
                                            'performance_schema_max_table_instances' : 'perfschema',
                                            'performance_schema_max_thread_classes' : 'perfschema',
                                            'performance_schema_max_thread_instances' : 'perfschema',
                                            'performance_schema_setup_actors_size': 'perfschema',
                                            'performance_schema_setup_objects_size': 'perfschema'
                                          }
                 },
  'Replication': { 'General': { 'server-id': 'server',
                                'init-rpl-role': 'server'
                              },
                   'General slave': { 'abort-slave-event-count': 'replication',
                                      'disconnect-slave-event-count': 'replication',
                                      'log-slave-updates': 'replication',
                                      'skip-slave-start': 'replication',
                                      'slave_allow_batching': 'replication',
                                      'slave-load-tmpdir': 'replication',
                                      'slave-net-timeout': 'replication',
                                      'slave-skip-errors': 'replication',
                                      'slave_compressed_protocol': 'replication',
                                      'slave_transaction_retries': 'replication'},
                   'Master': { 'auto_increment_increment': 'server',
                               'auto_increment_offset': 'server',
                               'master-bind': 'replication',
                               'show-slave-auth-info': 'replication'},
                   'Relay Log': { 'max_relay_log_size': 'server',
                                  'relay-log': 'replication',
                                  'relay-log-index': 'replication',
                                  'relay_log_info_file': 'server',
                                  'relay_log_purge': 'replication',
                                  'relay_log_space_limit': 'server'},
                   'Slave Identification': { 'report-host': 'replication',
                                             'report-password': 'replication',
                                             'report-port': 'replication',
                                             'report-user': 'replication'},
                   'Slave default connection values': { 'master-connect-retry': 'replication',
                                                        'master-host': 'replication',
                                                        'master-info-file': 'replication',
                                                        'master-password': 'replication',
                                                        'master-port': 'replication',
                                                        'master-retry-count': 'replication',
                                                        'master-ssl': 'replication',
                                                        'master-ssl-ca': 'replication',
                                                        'master-ssl-capath': 'replication',
                                                        'master-ssl-cert': 'replication',
                                                        'master-ssl-cipher': 'replication',
                                                        'master-ssl-key': 'replication',
                                                        'master-user': 'replication'},
                   'Slave replication objects': { 'replicate-do-db': 'replication',
                                                  'replicate-do-table': 'replication',
                                                  'replicate-ignore-db': 'replication',
                                                  'replicate-ignore-table': 'replication',
                                                  'replicate-rewrite-db': 'replication',
                                                  'replicate-wild-do-table': 'replication',
                                                  'replicate-wild-ignore-table': 'replication'}},
  'Security': { 'SSL': { 'skip-ssl': 'ssl',
                         'ssl': 'ssl',
                         'ssl-ca': 'ssl',
                         'ssl-capath': 'ssl',
                         'ssl-cert': 'ssl',
                         'ssl-cipher': 'ssl',
                         'ssl-key': 'ssl',
                         'ssl-verify-server-cert': 'ssl'},
                'Security': { 'allow-suspicious-udfs': 'security',
                              'des-key-file': 'security',
                              'local-infile': 'security',
                              'old-passwords': 'security',
                              'read_only': 'server',
                              'safe-show-database': 'security',
                              'safe-user-create': 'security',
                              'safemalloc-mem-limit': 'server',
                              'secure-auth': 'security',
                              'secure-file-priv': 'security',
                              'skip-grant-tables': 'security',
                              'skip-show-database': 'security'}},
  'Transactions': { 'Misc': { 'completion_type': 'server'}},
  'Engines Parameters' : { 'Maria' : {
                                        'maria' : 'maria',
                                        'maria-block-size' : 'maria',
                                        'maria-checkpoint-interval' : 'maria',
                                        'maria-log-dir-path' : 'maria',
                                        'maria-log-file-size' : 'maria',
                                        'maria-log-purge-type' : 'maria',
                                        'maria-max-sort-file-size' : 'maria',
                                        'maria-page-checksum' : 'maria',
                                        'maria-pagecache-age-threshold' : 'maria',
                                        'maria-pagecache-buffer-size' : 'maria',
                                        'maria-pagecache-division-limit' : 'maria',
                                        'maria-repair-threads' : 'maria',
                                        'maria-sort-buffer-size' : 'maria',
                                        'maria-stats-method' : 'maria',
                                        'maria-sync-log-dir' : 'maria',
                                        'maria-force-start-after-recovery-failures' : 'maria',
                                        'maria-recover' : 'maria'
                                     },
                            'Falcon' : {
                                'falcon' : 'falcon',
                                'skip-falcon' : 'falcon',
                                'falcon_checkpoint_schedule' : 'falcon',
                                'falcon_checksums' : 'falcon',
                                'falcon_consistent_read' : 'falcon',
                                'falcon_debug_mask' : 'falcon',
                                'falcon_debug_server' : 'falcon',
                                'falcon_disable_fsync' : 'falcon',
                                'falcon_gopher_threads' : 'falcon',
                                'falcon_index_chill_threshold' : 'falcon',
                                'falcon_initial_allocation' : 'falcon',
                                'falcon_io_threads' : 'falcon',
                                'falcon_large_blob_threshold' : 'falcon',
                                'falcon_lock_wait_timeout' : 'falcon',
                                'falcon_max_transaction_backlog' : 'falcon',
                                'falcon_page_cache_size' : 'falcon',
                                'falcon_page_size' : 'falcon',
                                'falcon_record_chill_threshold' : 'falcon',
                                'falcon_record_memory_max' : 'falcon',
                                'falcon_record_scavenge_floor' : 'falcon',
                                'falcon_record_scavenge_threshold' : 'falcon',
                                'falcon_scavenge_schedule' : 'falcon',
                                'falcon_serial_log_buffers' : 'falcon',
                                'falcon_serial_log_dir' : 'falcon',
                                'falcon_serial_log_priority' : 'falcon',
                                'falcon_support_xa' : 'falcon',
                                'falcon_use_deferred_index_hash' : 'falcon',
                                'falcon_use_sectorcache' : 'falcon',
                                'falcon_use_supernodes' : 'falcon'
                            },
                            'BDB' : {
                                 'bdb-home' : 'bdb',
                                 'bdb-lock-detect' : 'bdb',
                                 'bdb-logdir' : 'bdb',
                                 'bdb-no-recover' : 'bdb',
                                 'bdb-no-sync' : 'bdb',
                                 'bdb-shared-data' : 'bdb',
                                 'bdb-tmpdir' : 'bdb',
                                 'bdb_cache_size' : 'bdb',
                                 'bdb_log_buffer_size' : 'bdb',
                                 'bdb_max_lock' : 'bdb'
                            }
    },
    'Misc' : {'Unsorted': {
                                 'backup_elevation' : 'misc',
                                 'backup_history_log' : 'misc',
                                 'backup_history_log_file' : 'misc',
                                 'backup_progress_log' : 'misc',
                                 'backup_progress_log_file' : 'misc',
                                 'backupdir' : 'misc',
                                 'bootstrap' : 'misc',
                                 'debug' : 'misc',
                                 'div_precision_increment' : 'misc',
                                 'enable-locking' : 'misc',
                                 'engine-condition-pushdown' : 'misc',
                                 'event-scheduler' : 'misc',
                                 'exit-info' : 'misc',
                                 'init_connect' : 'misc',
                                 'init_slave' : 'misc',
                                 'join_cache_level' : 'misc',
                                 'large-pages' : 'misc',
                                 'lc-messages' : 'misc',
                                 'lc-messages-dir' : 'misc',
                                 'lock_wait_timeout' : 'misc',
                                 'log-backup-output' : 'misc',
                                 'log-long-format' : 'misc',
                                 'multi_range_count' : 'misc',
                                 'mutex-deadlock-detector' : 'misc',
                                 'mysql-backup' : 'misc',
                                 'old-protocol' : 'misc',
                                 'optimizer_join_cache_level' : 'misc',
                                 'record_buffer' : 'misc',
                                 'relay_log_recovery' : 'misc',
                                 'restore_disables_events' : 'misc',
                                 'restore_elevation' : 'misc',
                                 'restore_precheck' : 'misc',
                                 'secure-backup-file-priv' : 'misc',
                                 'server-id-bits' : 'misc',
                                 'set-variable' : 'misc',
                                 'slave_type_conversions' : 'misc',
                                 'sql-bin-update-same' : 'misc',
                                 'sync-bdb-logs' : 'misc',
                                 'sync_master_info' : 'misc',
                                 'sync_relay_log' : 'misc',
                                 'sync_relay_log_info' : 'misc',
                                 'table_lock_wait_timeout' : 'misc',
                                 'time_zone' : 'misc',
                                 'warnings' : 'misc'
                          }
             }
  }
