• unknown's avatar
    stop evaluation constant functions in WHERE (BUG#4663) · 03f1ae0b
    unknown authored
    correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)
    
    
    BitKeeper/etc/config:
      switch off open logging
    mysql-test/r/sp-security.result:
      correct value from current_user() in function run from "security definer"
    mysql-test/r/view.result:
      evaluation constant functions in WHERE (BUG#4663)
    mysql-test/t/sp-security.test:
      correct value from current_user() in function run from "security definer"
    mysql-test/t/view.test:
      evaluation constant functions in WHERE (BUG#4663)
    sql/item.cc:
      Item_static_string_func creation if it is need
    sql/item.h:
      support of Item_static_string_func creation
    sql/item_cmpfunc.cc:
      do not evaluate items during view creation
    sql/item_create.cc:
      create Item_func_user
    sql/item_strfunc.cc:
      Item_func_sysconst in case of converting value still have to correctly print itself
      => use Item_static_string_func instead of Item_string
          Item_func_user return USER() or CURRENT_USER()
    sql/item_strfunc.h:
      support of correct charset conversion procedure in Item_func_sysconst
    sql/sql_class.h:
      new method
    sql/sql_yacc.yy:
      Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
    03f1ae0b
item_strfunc.h 20.3 KB