mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
added code covarage for functions convert(), nullif(), crc32(), is_used_lock(), char_lengtrh(), bit_xor()
added string length for more speed made code covarage for print() method of Item fixed printability of some items (SCRUM) (WL#1274)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user