• unknown's avatar
    1. sys_variables[] array is removed. · b642bb1f
    unknown authored
    2. All have_xxx variables are now selectable.
    
    
    sql/set_var.cc:
      1. sys_have_xxx variables added.
      2. Removed sys_var *sys_variables[] array as we don't need it any more.
      3. void set_var_init() changed to use sys_var_xxx chain insted of sys_variables[] array.
    sql/set_var.h:
      1. add_sys_var() method added to the sys_var class. It's called from constructors
      to chain all successor objects. The first one is stored in the 'static sys_var *first'.
      The total number of variables is in the 'static uint sys_vars'. Each sys_var successor object
      has the 'sys_var *next' pointer to the next one in the chain. 
      2. sys_var_have_variable class introduced to make all have_xxx variables selectable.
    sql/sql_lex.cc:
      trg_new_row_fake_var(0, 0) replaced with '(sys_var*) 0x01' as we don't want to have such fake variables in the sys_var_xxx chain.
    sql/sql_lex.h:
      Proper use of the changed trg_new_row_fake_var.
    sql/sql_yacc.yy:
      Proper use of the changed trg_new_row_fake_var.
    b642bb1f
sql_yacc.yy 249 KB