diff options
Diffstat (limited to 'sql/sql_select.cc')
| -rw-r--r-- | sql/sql_select.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 278839442e3..cfc7b2824ee 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8948,28 +8948,28 @@ void st_select_lex::print(THD *thd, String *str) if (!thd) thd= current_thd; - str->append("select "); + str->append("select ", 7); //options if (options & SELECT_STRAIGHT_JOIN) - str->append("straight_join "); + str->append("straight_join ", 14); if ((thd->lex.lock_option & TL_READ_HIGH_PRIORITY) && (this == &thd->lex.select_lex)) - str->append("high_priority "); + str->append("high_priority ", 14); if (options & SELECT_DISTINCT) - str->append("distinct "); + str->append("distinct ", 9); if (options & SELECT_SMALL_RESULT) - str->append("small_result "); + str->append("small_result ", 13); if (options & SELECT_BIG_RESULT) - str->append("big_result "); + str->append("big_result ", 11); if (options & OPTION_BUFFER_RESULT) - str->append("buffer_result "); + str->append("buffer_result ", 14); if (options & OPTION_FOUND_ROWS) - str->append("calc_found_rows "); + str->append("calc_found_rows ", 16); if (!thd->lex.safe_to_cache_query) - str->append("no_cache "); + str->append("no_cache ", 9); if (options & OPTION_TO_QUERY_CACHE) - str->append("cache "); + str->append("cache ", 6); //Item List bool first= 1; @@ -8990,7 +8990,7 @@ void st_select_lex::print(THD *thd, String *str) */ if (table_list.elements) { - str->append(" from "); + str->append(" from ", 6); Item *next_on= 0; for (TABLE_LIST *table= (TABLE_LIST *) table_list.first; table; @@ -9021,7 +9021,7 @@ void st_select_lex::print(THD *thd, String *str) if (next_on) { - str->append(" on("); + str->append(" on(", 4); next_on->print(str); str->append(')'); next_on= 0; @@ -9032,17 +9032,17 @@ void st_select_lex::print(THD *thd, String *str) { if (table->outer_join & JOIN_TYPE_RIGHT) { - str->append(" right join "); + str->append(" right join ", 12); if (!(table->outer_join & JOIN_TYPE_LEFT) && table->on_expr) next_on= table->on_expr; } else if (next->straight) - str->append(" straight_join "); + str->append(" straight_join ", 15); else if (next->outer_join & JOIN_TYPE_LEFT) - str->append(" left join "); + str->append(" left join ", 11); else - str->append(" join "); + str->append(" join ", 6); } } } @@ -9053,22 +9053,22 @@ void st_select_lex::print(THD *thd, String *str) where= join->conds; if (where) { - str->append(" where "); + str->append(" where ", 7); where->print(str); } //group by & olap if (group_list.elements) { - str->append(" group by "); + str->append(" group by ", 10); print_order(str, (ORDER *) group_list.first); switch (olap) { case CUBE_TYPE: - str->append(" with cube"); + str->append(" with cube", 10); break; case ROLLUP_TYPE: - str->append(" with rollup"); + str->append(" with rollup", 12); break; default: ; //satisfy compiler @@ -9082,13 +9082,13 @@ void st_select_lex::print(THD *thd, String *str) if (having) { - str->append(" having "); + str->append(" having ", 8); having->print(str); } if (order_list.elements) { - str->append(" order by "); + str->append(" order by ", 10); print_order(str, (ORDER *) order_list.first); } |
