mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Print value of Item_param if it has a value (when debugging)
libmysql/libmysql.c: More debug sql/item.h: Print value of param if it has a value (when debugging) sql/log.cc: Better variable name sql/sql_insert.cc: Fix bug casused by merge sql/sql_parse.cc: Added missing command names (caused crash when running with --debug) sql/sql_select.cc: More debugging sql/sql_yacc.yy: Fixed typo tests/client_test.c: More debugging
This commit is contained in:
@ -543,6 +543,7 @@ JOIN::optimize()
|
||||
if (cond_value == Item::COND_FALSE ||
|
||||
(!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))
|
||||
{ /* Impossible cond */
|
||||
DBUG_PRINT("info", ("Impossible WHERE"));
|
||||
zero_result_cause= "Impossible WHERE";
|
||||
error= 0;
|
||||
DBUG_RETURN(0);
|
||||
@ -560,20 +561,24 @@ JOIN::optimize()
|
||||
{
|
||||
if (res > 1)
|
||||
{
|
||||
DBUG_PRINT("error",("Error from opt_sum_query"));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
if (res < 0)
|
||||
{
|
||||
DBUG_PRINT("info",("No matching min/max row"));
|
||||
zero_result_cause= "No matching min/max row";
|
||||
error=0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
DBUG_PRINT("info",("Select tables optimized away"));
|
||||
zero_result_cause= "Select tables optimized away";
|
||||
tables_list= 0; // All tables resolved
|
||||
}
|
||||
}
|
||||
if (!tables_list)
|
||||
{
|
||||
DBUG_PRINT("info",("No tables"));
|
||||
error= 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@ -11641,7 +11646,6 @@ void st_table_list::print(THD *thd, String *str)
|
||||
}
|
||||
if (my_strcasecmp(table_alias_charset, cmp_name, alias))
|
||||
{
|
||||
{
|
||||
str->append(' ');
|
||||
append_identifier(thd, str, alias, strlen(alias));
|
||||
}
|
||||
@ -11649,7 +11653,6 @@ void st_table_list::print(THD *thd, String *str)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void st_select_lex::print(THD *thd, String *str)
|
||||
{
|
||||
if (!thd)
|
||||
@ -11657,7 +11660,7 @@ void st_select_lex::print(THD *thd, String *str)
|
||||
|
||||
str->append("select ", 7);
|
||||
|
||||
//options
|
||||
/* First add options */
|
||||
if (options & SELECT_STRAIGHT_JOIN)
|
||||
str->append("straight_join ", 14);
|
||||
if ((thd->lex->lock_option == TL_READ_HIGH_PRIORITY) &&
|
||||
|
Reference in New Issue
Block a user