• Sergei Golubchik's avatar
    session-state dependent functions in DEFAULT/CHECK/vcols · 73a220aa
    Sergei Golubchik authored
    * revert part of the db7edfed that moved calculations from
      fix_fields to val_str for Item_func_sysconst and descendants
    * mark session state dependent functions in check_vcol_func_processor()
    * re-run fix_fields for all such functions for every statement
    * fix CURRENT_USER/CURRENT_ROLE not to use Name_resolution_context
      (that is allocated on the stack in unpack_vcol_info_from_frm())
    
    Note that NOW(), CURDATE(), etc use lazy initialization and do *not*
    force fix_fields to be re-run. The rule is:
    * lazy initialization is *not* allowed, if it changes metadata (so,
       e.g. DAYNAME() cannot use it)
    * lazy initialization is *preferrable* if it has side effects (e.g.
      NOW() sets thd->time_zone_used=1, so it's better to do it when
      the value of NOW is actually needed, not when NOW is simply prepared)
    73a220aa
table.cc 234 KB