You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-1482 Future repetition reduction
This commit is contained in:
@ -2367,10 +2367,7 @@ int ha_mcs_impl_rnd_next(uchar* buf, TABLE* table)
|
||||
thd->lex->sql_command == SQLCOM_LOAD))
|
||||
return HA_ERR_END_OF_FILE;
|
||||
|
||||
if ((thd->lex->sql_command == SQLCOM_UPDATE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE_MULTI) ||
|
||||
((thd->lex->sql_command == SQLCOM_UPDATE_MULTI) && !isForeignTableUpdate(thd)))
|
||||
if (isUpdateOrDeleteStatement(thd->lex->sql_command, !isForeignTableUpdate(thd)))
|
||||
return HA_ERR_END_OF_FILE;
|
||||
|
||||
// @bug 2547
|
||||
@ -2463,10 +2460,7 @@ int ha_mcs_impl_rnd_end(TABLE* table, bool is_pushdown_hand)
|
||||
if ( (thd->lex)->sql_command == SQLCOM_ALTER_TABLE )
|
||||
return rc;
|
||||
|
||||
if ((thd->lex->sql_command == SQLCOM_UPDATE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE_MULTI) ||
|
||||
((thd->lex->sql_command == SQLCOM_UPDATE_MULTI) && !isForeignTableUpdate(thd)))
|
||||
if (isUpdateOrDeleteStatement(thd->lex->sql_command, !isForeignTableUpdate(thd)))
|
||||
return rc;
|
||||
|
||||
if (!ci)
|
||||
@ -4312,10 +4306,7 @@ int ha_mcs_impl_group_by_next(TABLE* table)
|
||||
{
|
||||
THD* thd = current_thd;
|
||||
|
||||
if ((thd->lex->sql_command == SQLCOM_UPDATE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE) ||
|
||||
(thd->lex->sql_command == SQLCOM_DELETE_MULTI) ||
|
||||
(thd->lex->sql_command == SQLCOM_UPDATE_MULTI && !isForeignTableUpdate(thd)))
|
||||
if (isUpdateOrDeleteStatement(thd->lex->sql_command, !isForeignTableUpdate(thd)))
|
||||
return HA_ERR_END_OF_FILE;
|
||||
|
||||
if (get_fe_conn_info_ptr() == nullptr)
|
||||
|
@ -411,10 +411,10 @@ bool buildEqualityPredicate(execplan::ReturnedColumn* lhs,
|
||||
const std::vector<Item*>& itemList,
|
||||
bool isInSubs = false);
|
||||
|
||||
inline bool isUpdateStatement(const enum_sql_command& command)
|
||||
inline bool isUpdateStatement(const enum_sql_command& command, const bool isMCSTableUpdate = true)
|
||||
{
|
||||
return (command == SQLCOM_UPDATE) ||
|
||||
(command == SQLCOM_UPDATE_MULTI);
|
||||
(command == SQLCOM_UPDATE_MULTI && isMCSTableUpdate);
|
||||
}
|
||||
|
||||
inline bool isDeleteStatement(const enum_sql_command& command)
|
||||
@ -423,9 +423,9 @@ inline bool isDeleteStatement(const enum_sql_command& command)
|
||||
(command == SQLCOM_DELETE_MULTI);
|
||||
}
|
||||
|
||||
inline bool isUpdateOrDeleteStatement(const enum_sql_command& command)
|
||||
inline bool isUpdateOrDeleteStatement(const enum_sql_command& command, const bool isMCSTableUpdate = true)
|
||||
{
|
||||
return isUpdateStatement(command) ||
|
||||
return isUpdateStatement(command, isMCSTableUpdate) ||
|
||||
isDeleteStatement(command);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user