summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 4affca4434d..bf45bb648bd 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -473,8 +473,8 @@ static TABLE_SHARE
@todo Rework alternative ways to deal with ER_NO_SUCH TABLE.
*/
- if (share || thd->is_error() && thd->main_da.sql_errno() != ER_NO_SUCH_TABLE)
-
+ if (share ||
+ (thd->is_error() && thd->main_da.sql_errno() != ER_NO_SUCH_TABLE))
DBUG_RETURN(share);
/* Table didn't exist. Check if some engine can provide it */
@@ -2625,8 +2625,8 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
distance > 0 - we have lock mode higher then we require
distance == 0 - we have lock mode exactly which we need
*/
- if (best_distance < 0 && distance > best_distance ||
- distance >= 0 && distance < best_distance)
+ if ((best_distance < 0 && distance > best_distance) ||
+ (distance >= 0 && distance < best_distance))
{
best_distance= distance;
best_table= table;
@@ -7409,7 +7409,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
thd->lex->current_select->cur_pos_in_select_list= 0;
while ((item= it++))
{
- if (!item->fixed && item->fix_fields(thd, it.ref()) ||
+ if ((!item->fixed && item->fix_fields(thd, it.ref())) ||
(item= *(it.ref()))->check_cols(1))
{
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
@@ -7723,8 +7723,8 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
DBUG_ASSERT(tables->is_leaf_for_name_resolution());
- if (table_name && my_strcasecmp(table_alias_charset, table_name,
- tables->alias) ||
+ if ((table_name && my_strcasecmp(table_alias_charset, table_name,
+ tables->alias)) ||
(db_name && strcmp(tables->db,db_name)))
continue;
@@ -7755,8 +7755,8 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
information_schema table, or a nested table reference. See the comment
for TABLE_LIST.
*/
- if (!(table && !tables->view && (table->grant.privilege & SELECT_ACL) ||
- tables->view && (tables->grant.privilege & SELECT_ACL)) &&
+ if (!((table && !tables->view && (table->grant.privilege & SELECT_ACL)) ||
+ (tables->view && (tables->grant.privilege & SELECT_ACL))) &&
!any_privileges)
{
field_iterator.set(tables);
@@ -7810,7 +7810,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
*/
if (any_privileges)
{
- DBUG_ASSERT(tables->field_translation == NULL && table ||
+ DBUG_ASSERT((tables->field_translation == NULL && table) ||
tables->is_natural_join);
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *fld= (Item_field*) item;
@@ -7949,7 +7949,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
if (*conds)
{
thd->where="where clause";
- if (!(*conds)->fixed && (*conds)->fix_fields(thd, conds) ||
+ if ((!(*conds)->fixed && (*conds)->fix_fields(thd, conds)) ||
(*conds)->check_cols(1))
goto err_no_arena;
}
@@ -7969,8 +7969,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
{
/* Make a join an a expression */
thd->where="on clause";
- if (!embedded->on_expr->fixed &&
- embedded->on_expr->fix_fields(thd, &embedded->on_expr) ||
+ if ((!embedded->on_expr->fixed &&
+ embedded->on_expr->fix_fields(thd, &embedded->on_expr)) ||
embedded->on_expr->check_cols(1))
goto err_no_arena;
select_lex->cond_count++;
@@ -8125,8 +8125,8 @@ fill_record_n_invoke_before_triggers(THD *thd, List<Item> &fields,
enum trg_event_type event)
{
return (fill_record(thd, fields, values, ignore_errors) ||
- triggers && triggers->process_triggers(thd, event,
- TRG_ACTION_BEFORE, TRUE));
+ (triggers && triggers->process_triggers(thd, event,
+ TRG_ACTION_BEFORE, TRUE)));
}
@@ -8220,8 +8220,8 @@ fill_record_n_invoke_before_triggers(THD *thd, Field **ptr,
enum trg_event_type event)
{
return (fill_record(thd, ptr, values, ignore_errors) ||
- triggers && triggers->process_triggers(thd, event,
- TRG_ACTION_BEFORE, TRUE));
+ (triggers && triggers->process_triggers(thd, event,
+ TRG_ACTION_BEFORE, TRUE)));
}