summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 5c849d1278a..e7e821dd4ae 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1434,8 +1434,8 @@ static bool mysql_test_set_fields(Prepared_statement *stmt,
THD *thd= stmt->thd;
set_var_base *var;
- if (tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE) ||
- open_normal_and_derived_tables(thd, tables, 0))
+ if ((tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE))
+ || open_normal_and_derived_tables(thd, tables, 0))
goto error;
while ((var= it++))
@@ -1470,13 +1470,13 @@ static bool mysql_test_call_fields(Prepared_statement *stmt,
THD *thd= stmt->thd;
Item *item;
- if (tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE) ||
+ if ((tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE)) ||
open_normal_and_derived_tables(thd, tables, 0))
goto err;
while ((item= it++))
{
- if (!item->fixed && item->fix_fields(thd, it.ref()) ||
+ if ((!item->fixed && item->fix_fields(thd, it.ref())) ||
item->check_cols(1))
goto err;
}
@@ -2227,9 +2227,8 @@ void mysql_sql_stmt_prepare(THD *thd)
LEX_STRING *name= &lex->prepared_stmt_name;
Prepared_statement *stmt;
const char *query;
- uint query_len;
+ uint query_len= 0;
DBUG_ENTER("mysql_sql_stmt_prepare");
- LINT_INIT(query_len);
DBUG_ASSERT(thd->protocol == &thd->protocol_text);
if ((stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
@@ -2846,7 +2845,7 @@ void Prepared_statement::setup_set_params()
Decide if we have to expand the query (because we must write it to logs or
because we want to look it up in the query cache) or not.
*/
- if (mysql_bin_log.is_open() && is_update_query(lex->sql_command) ||
+ if ((mysql_bin_log.is_open() && is_update_query(lex->sql_command)) ||
opt_log || opt_slow_log ||
query_cache_is_cacheable_query(lex))
{
@@ -3297,7 +3296,7 @@ Prepared_statement::reprepare()
&cur_db_changed))
return TRUE;
- error= (name.str && copy.set_name(&name) ||
+ error= ((name.str && copy.set_name(&name)) ||
copy.prepare(query, query_length) ||
validate_metadata(&copy));