mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-14012 - sql_mode=Oracle: substr(): treat position 0 as position 1
This commit is contained in:
@ -7182,6 +7182,22 @@ bool LEX::add_grant_command(THD *thd, enum_sql_command sql_command_arg,
|
||||
}
|
||||
|
||||
|
||||
Item *LEX::make_item_func_substr(THD *thd, Item *a, Item *b, Item *c)
|
||||
{
|
||||
return (thd->variables.sql_mode & MODE_ORACLE) ?
|
||||
new (thd->mem_root) Item_func_substr_oracle(thd, a, b, c) :
|
||||
new (thd->mem_root) Item_func_substr(thd, a, b, c);
|
||||
}
|
||||
|
||||
|
||||
Item *LEX::make_item_func_substr(THD *thd, Item *a, Item *b)
|
||||
{
|
||||
return (thd->variables.sql_mode & MODE_ORACLE) ?
|
||||
new (thd->mem_root) Item_func_substr_oracle(thd, a, b) :
|
||||
new (thd->mem_root) Item_func_substr(thd, a, b);
|
||||
}
|
||||
|
||||
|
||||
Item *LEX::make_item_func_replace(THD *thd,
|
||||
Item *org,
|
||||
Item *find,
|
||||
|
Reference in New Issue
Block a user