Skip to content

Commit

Permalink
feat(tianmu):delta store,Modify the tianmu handler namespace name
Browse files Browse the repository at this point in the history
  • Loading branch information
konghaiya committed Mar 7, 2023
1 parent 375398d commit ca806c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions sql/log_event_push_cond.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,20 @@ static bool checklist_have_number_or_time(Field **field, uint field_num)
}
default:
break;
}
}
}
return false;
}


bool Rows_log_event::column_information_to_conditions(std::string &sql_statemens,
bool Rows_log_event::column_information_to_conditions(std::string &sql_statemens,
std::string &prefix)
{
sql_statemens += prefix;
Field **field = m_table->field;
if(!field) return false;
/*
If there is a unique constraint,
If there is a unique constraint,
use the field of the unique constraint as the push down condition
*/
std::string key_field_name;
Expand All @@ -210,7 +210,7 @@ bool Rows_log_event::column_information_to_conditions(std::string &sql_statemens
int cond_num = 0;
bool unwanted_str = false;
/*
If there is a number or time type in the table,
If there is a number or time type in the table,
the string type value is not used as the push down condition.
*/
if(checklist_have_number_or_time(field, m_table->s->fields)) unwanted_str = true;
Expand All @@ -222,7 +222,7 @@ bool Rows_log_event::column_information_to_conditions(std::string &sql_statemens
std::string str_cond;

if(!key_field_name.empty()) {

if(key_field_name.compare(f->field_name) != 0) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_load.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
}

if (!Tianmu::handler::ha_my_tianmu_load(thd, ex, table_list,
if (!Tianmu::DBHandler::ha_my_tianmu_load(thd, ex, table_list,
(void *)&lf_info)) {
DBUG_RETURN(FALSE);
}
Expand Down
10 changes: 5 additions & 5 deletions sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3282,8 +3282,8 @@ case SQLCOM_PREPARE:
// Tianmu hook added

int tianmu_res, free_join_from_tianmu, is_optimize_after_tianmu;
if (Tianmu::handler::QueryRouteTo::kToMySQL ==
Tianmu::handler::ha_my_tianmu_query(thd, lex, result, 0, tianmu_res, is_optimize_after_tianmu, free_join_from_tianmu, (int)true))
if (Tianmu::DBHandler::QueryRouteTo::kToMySQL ==
Tianmu::DBHandler::ha_my_tianmu_query(thd, lex, result, 0, tianmu_res, is_optimize_after_tianmu, free_join_from_tianmu, (int)true))
res = handle_query(thd, lex, result, SELECT_NO_UNLOCK, (ulong)0, is_optimize_after_tianmu, free_join_from_tianmu);
else
res = tianmu_res;
Expand Down Expand Up @@ -3748,7 +3748,7 @@ case SQLCOM_PREPARE:
if ((check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE)
|| open_and_lock_tables(thd, all_tables, 0)))
goto error;
if (!Tianmu::handler::ha_my_tianmu_set_statement_allowed(thd, lex)) {
if (!Tianmu::DBHandler::ha_my_tianmu_set_statement_allowed(thd, lex)) {
goto error;
}
if (!(res= sql_set_variables(thd, lex_var_list)))
Expand Down Expand Up @@ -5204,8 +5204,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
//res= handle_query(thd, lex, result, 0, 0, 0, 0);

int tianmu_res, free_join_from_tianmu, is_optimize_after_tianmu;
if (Tianmu::handler::QueryRouteTo::kToMySQL ==
Tianmu::handler::ha_my_tianmu_query(thd, lex, result, (ulong)0, tianmu_res, is_optimize_after_tianmu, free_join_from_tianmu)) {
if (Tianmu::DBHandler::QueryRouteTo::kToMySQL ==
Tianmu::DBHandler::ha_my_tianmu_query(thd, lex, result, (ulong)0, tianmu_res, is_optimize_after_tianmu, free_join_from_tianmu)) {
res = handle_query(thd, lex, result, (ulonglong)0, (ulonglong)0, is_optimize_after_tianmu, free_join_from_tianmu);
}
else
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_show.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5535,7 +5535,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
table->field[IS_COLUMNS_GENERATION_EXPRESSION]->set_null();
//table->field[IS_COLUMNS_COLUMN_COMMENT]->store(field->comment.str,
// field->comment.length, cs);
Tianmu::handler::ha_my_tianmu_update_and_store_col_comment(table, IS_COLUMNS_COLUMN_COMMENT, field, count - 1, cs);//TIANMU UPGRADE
Tianmu::DBHandler::ha_my_tianmu_update_and_store_col_comment(table, IS_COLUMNS_COLUMN_COMMENT, field, count - 1, cs);//TIANMU UPGRADE
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
}
Expand Down

0 comments on commit ca806c6

Please sign in to comment.