• Alexander Barkov's avatar
    MDEV-29095 REGEXP_REPLACE treats empty strings different than REPLACE in ORACLE mode · f738cc98
    Alexander Barkov authored
    Turning REGEXP_REPLACE into two schema-qualified functions:
    - mariadb_schema.regexp_replace()
    - oracle_schema.regexp_replace()
    
    Fixing oracle_schema.regexp_replace(subj,pattern,replacement) to treat
    NULL in "replacement" as an empty string.
    
    Adding new classes implementing oracle_schema.regexp_replace():
    - Item_func_regexp_replace_oracle
    - Create_func_regexp_replace_oracle
    
    Adding helper methods:
    - String *Item::val_str_null_to_empty(String *to)
    - String *Item::val_str_null_to_empty(String *to, bool null_to_empty)
    
    and reusing these methods in both Item_func_replace and
    Item_func_regexp_replace.
    f738cc98
item_strfunc.cc 145 KB