@@ -221,15 +221,15 @@ static uint collect_cmp_types(Item **items, uint nitems, bool skip_nulls= FALSE)
221221 items[i]->result_type () == ROW_RESULT) &&
222222 cmp_row_type (items[0 ], items[i]))
223223 return 0 ;
224- found_types|= 1 << (uint)item_cmp_type (left_result,
225- items[i]->result_type ());
224+ found_types|= 1U << (uint)item_cmp_type (left_result,
225+ items[i]->result_type ());
226226 }
227227 /*
228228 Even if all right-hand items are NULLs and we are skipping them all, we need
229229 at least one type bit in the found_type bitmask.
230230 */
231231 if (skip_nulls && !found_types)
232- found_types= 1 << (uint)left_result;
232+ found_types= 1U << (uint)left_result;
233233 return found_types;
234234}
235235
@@ -3237,12 +3237,12 @@ Item *Item_func_case::find_item(String *str)
32373237 cmp_type= item_cmp_type (left_result_type, args[i]->result_type ());
32383238 DBUG_ASSERT (cmp_type != ROW_RESULT);
32393239 DBUG_ASSERT (cmp_items[(uint)cmp_type]);
3240- if (!(value_added_map & (1 << (uint)cmp_type)))
3240+ if (!(value_added_map & (1U << (uint)cmp_type)))
32413241 {
32423242 cmp_items[(uint)cmp_type]->store_value (args[first_expr_num]);
32433243 if ((null_value=args[first_expr_num]->null_value ))
32443244 return else_expr_num != -1 ? args[else_expr_num] : 0 ;
3245- value_added_map|= 1 << (uint)cmp_type;
3245+ value_added_map|= 1U << (uint)cmp_type;
32463246 }
32473247 if (!cmp_items[(uint)cmp_type]->cmp (args[i]) && !args[i]->null_value )
32483248 return args[i + 1 ];
@@ -3503,7 +3503,7 @@ void Item_func_case::fix_length_and_dec()
35033503 nagg++;
35043504 if (!(found_types= collect_cmp_types (agg, nagg)))
35053505 return ;
3506- if (found_types & (1 << STRING_RESULT))
3506+ if (found_types & (1U << STRING_RESULT))
35073507 {
35083508 /*
35093509 If we'll do string comparison, we also need to aggregate
@@ -3543,7 +3543,7 @@ void Item_func_case::fix_length_and_dec()
35433543 }
35443544 for (i= 0 ; i <= (uint)DECIMAL_RESULT; i++)
35453545 {
3546- if (found_types & (1 << i) && !cmp_items[i])
3546+ if (found_types & (1U << i) && !cmp_items[i])
35473547 {
35483548 DBUG_ASSERT ((Item_result)i != ROW_RESULT);
35493549 if (!(cmp_items[i]=
@@ -4392,7 +4392,7 @@ void Item_func_in::fix_length_and_dec()
43924392 }
43934393 for (i= 0 ; i <= (uint)DECIMAL_RESULT; i++)
43944394 {
4395- if (found_types & 1 << i)
4395+ if (found_types & ( 1U << i) )
43964396 {
43974397 (type_cnt)++;
43984398 cmp_type= (Item_result) i;
@@ -4583,7 +4583,7 @@ void Item_func_in::fix_length_and_dec()
45834583 {
45844584 for (i= 0 ; i <= (uint) DECIMAL_RESULT; i++)
45854585 {
4586- if (found_types & (1 << i) && !cmp_items[i])
4586+ if (found_types & (1U << i) && !cmp_items[i])
45874587 {
45884588 if ((Item_result)i == STRING_RESULT &&
45894589 agg_arg_charsets_for_comparison (cmp_collation, args, arg_count))
@@ -4673,12 +4673,12 @@ longlong Item_func_in::val_int()
46734673 Item_result cmp_type= item_cmp_type (left_result_type, args[i]->result_type ());
46744674 in_item= cmp_items[(uint)cmp_type];
46754675 DBUG_ASSERT (in_item);
4676- if (!(value_added_map & (1 << (uint)cmp_type)))
4676+ if (!(value_added_map & (1U << (uint)cmp_type)))
46774677 {
46784678 in_item->store_value (args[0 ]);
46794679 if ((null_value= args[0 ]->null_value ))
46804680 return 0 ;
4681- value_added_map|= 1 << (uint)cmp_type;
4681+ value_added_map|= 1U << (uint)cmp_type;
46824682 }
46834683 if (!in_item->cmp (args[i]) && !args[i]->null_value )
46844684 return (longlong) (!negated);
0 commit comments