diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-05-11 08:59:51 +0300 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-05-11 08:59:51 +0300 |
| commit | 7d44e2e7ffc8df4e6936aa56439c569e1dd92edd (patch) | |
| tree | 0455af3d15f142f1cc14389b36b83deb13e50ef1 /sql/sql_schema.cc | |
| parent | f288d42cdbc98460e097f771a4ad015667e355fb (diff) | |
| parent | 2668d596d1b4da99206146e4a2a25fc2d5dabeff (diff) | |
| download | mariadb-git-7d44e2e7ffc8df4e6936aa56439c569e1dd92edd.tar.gz | |
Merge mariadb-10.8.8 into 10.8
Diffstat (limited to 'sql/sql_schema.cc')
| -rw-r--r-- | sql/sql_schema.cc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sql/sql_schema.cc b/sql/sql_schema.cc index 0bf4a63c2f8..f08204d272d 100644 --- a/sql/sql_schema.cc +++ b/sql/sql_schema.cc @@ -32,6 +32,14 @@ public: return thd->type_handler_for_datetime(); return src; } + + Item *make_item_func_replace(THD *thd, + Item *subj, + Item *find, + Item *replace) const; + Item *make_item_func_substr(THD *thd, + const Lex_substring_spec_st &spec) const; + Item *make_item_func_trim(THD *thd, const Lex_trim_st &spec) const; }; @@ -78,3 +86,56 @@ Schema *Schema::find_implied(THD *thd) return &maxdb_schema; return &mariadb_schema; } + + +Item *Schema::make_item_func_replace(THD *thd, + Item *subj, + Item *find, + Item *replace) const +{ + return new (thd->mem_root) Item_func_replace(thd, subj, find, replace); +} + + +Item *Schema::make_item_func_substr(THD *thd, + const Lex_substring_spec_st &spec) const +{ + return spec.m_for ? + new (thd->mem_root) Item_func_substr(thd, spec.m_subject, spec.m_from, + spec.m_for) : + new (thd->mem_root) Item_func_substr(thd, spec.m_subject, spec.m_from); +} + + +Item *Schema::make_item_func_trim(THD *thd, const Lex_trim_st &spec) const +{ + return spec.make_item_func_trim_std(thd); +} + + +Item *Schema_oracle::make_item_func_replace(THD *thd, + Item *subj, + Item *find, + Item *replace) const +{ + return new (thd->mem_root) Item_func_replace_oracle(thd, subj, find, replace); +} + + +Item *Schema_oracle::make_item_func_substr(THD *thd, + const Lex_substring_spec_st &spec) const +{ + return spec.m_for ? + new (thd->mem_root) Item_func_substr_oracle(thd, spec.m_subject, + spec.m_from, + spec.m_for) : + new (thd->mem_root) Item_func_substr_oracle(thd, spec.m_subject, + spec.m_from); +} + + +Item *Schema_oracle::make_item_func_trim(THD *thd, + const Lex_trim_st &spec) const +{ + return spec.make_item_func_trim_oracle(thd); +} |
