mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26545 Spider does not correctly handle UDF and stored function in where conds
- Handle stored function conditions correctly, with the same logic as with UDFs. - When running queries on Spider SE, by default, we do not push down WHERE conditions containing usage of UDFs/stored functions to remote data nodes, unless the user demands (by setting spider_use_pushdown_udf). - Disable direct update/delete when a udf condition is skipped.
This commit is contained in:
@@ -4985,10 +4985,16 @@ int spider_db_mbase_util::open_item_func(
|
||||
separator_str_length = SPIDER_SQL_AND_LEN;
|
||||
}
|
||||
break;
|
||||
case Item_func::FUNC_SP:
|
||||
case Item_func::UDF_FUNC:
|
||||
use_pushdown_udf = spider_param_use_pushdown_udf(spider->trx->thd,
|
||||
spider->share->use_pushdown_udf);
|
||||
if (!use_pushdown_udf)
|
||||
/*
|
||||
This is the default behavior because the remote nodes may deal with
|
||||
the function in an unexpected way (e.g. not having the same
|
||||
definition). Users can turn it on if they know what they are doing.
|
||||
*/
|
||||
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
|
||||
if (str)
|
||||
{
|
||||
|
Reference in New Issue
Block a user