• Yuchen Pei's avatar
    MDEV-28856 Add remaining Spider table options · 12615706
    Yuchen Pei authored
    MDEV-27106 added REMOTE_TABLE, REMOTE_DATABASE, REMOTE_SERVER spider
    table options. In this commit, we add all remaining options for table
    params that are not marked to be deprecated.
    
    All these options are parsed as strings from sql statements and have
    string values at the sql level, so that we can determine whether it is
    specified by checking its nullness.
    
    The string values are further parsed by Spider into their actual types
    in the SPIDER_SHARE, including string list, bounded nonnegative int,
    bounded nonnegative int list, nonnegative longlong, boolean, and key
    hints. Except for string lists, all other types are validated during
    this parsing process.
    
    Most of the options are backward compatible, i.e. they accept any
    values that is accepted by there corresponding param parser. The only
    exception is the index hint IDX which corresponds to the idxNNN param
    name. For example,
    
    'idx000 "f PRIMARY", idx001 "u k1"'
    
    translates to
    
    IDX="f PRIMARY u k1".
    
    We include a test with all options specified, and tests involving
    spider table options of all actual types.
    
    Any table options, if present, will cause comments to be ignored with
    a warning. The warning can be disabled by setting a new spider
    global/session system variable spider_suppress_comment_ignored_warning
    to 1.
    
    Another global/session variable introduced is spider_ignore_comments,
    which if set to 1, will cause COMMENT and CONNECTION strings to be
    ignored unconditionally, whether or not table options are specified.
    12615706
spd_param.h 7.54 KB