Commit a706b2a3 authored by unknown's avatar unknown
Browse files

BUG#18198: Many strange partition functions were allowed, now only strictly...

BUG#18198: Many strange partition functions were allowed, now only strictly allowed functions are ok


mysql-test/r/partition_error.result:
  New test cases
mysql-test/t/partition_error.test:
  New test cases
sql/item.h:
  Added method check_partition_func_processor for check if item tree is valid
sql/item_cmpfunc.h:
  Added method check_partition_func_processor for check if item tree is valid
sql/item_func.h:
  Added method check_partition_func_processor for check if item tree is valid
sql/item_strfunc.h:
  Added method check_partition_func_processor for check if item tree is valid
sql/item_timefunc.h:
  Added method check_partition_func_processor for check if item tree is valid
sql/item_xmlfunc.h:
  Added method check_partition_func_processor for check if item tree is valid
parent 34a11a32
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -554,3 +554,26 @@ PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5));
insert into t1 values (10);
ERROR HY000: Table has no partition for value 10
drop table t1;
create table t1 (v varchar(12))
partition by range (ascii(v))
(partition p0 values less than (10));
drop table t1;
create table t1 (a int)
partition by hash (rand(a));
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
create table t1 (a int)
partition by hash(CURTIME() + a);
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
create table t1 (a int)
partition by hash (NOW()+a);
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
create table t1 (a int)
partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00')));
ERROR HY000: This partition function is not allowed
create table t1 (a int)
partition by range (a + (select count(*) from t1))
(partition p1 values less than (1));
ERROR HY000: This partition function is not allowed
create table t1 (a char(10))
partition by hash (extractvalue(a,'a'));
ERROR HY000: The PARTITION function returns the wrong type
+28 −0
Original line number Diff line number Diff line
@@ -747,3 +747,31 @@ CREATE TABLE t1(a int)
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
insert into t1 values (10);
drop table t1;

#
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
#
create table t1 (v varchar(12))
partition by range (ascii(v))
(partition p0 values less than (10));
drop table t1;

-- error 1064
create table t1 (a int)
partition by hash (rand(a));
-- error 1064
create table t1 (a int)
partition by hash(CURTIME() + a);
-- error 1064
create table t1 (a int)
partition by hash (NOW()+a);
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (a int)
partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00')));
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (a int)
partition by range (a + (select count(*) from t1))
(partition p1 values less than (1));
-- error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
create table t1 (a char(10))
partition by hash (extractvalue(a,'a'));
+19 −12
Original line number Diff line number Diff line
@@ -745,6 +745,13 @@ class Item {
  virtual bool change_context_processor(byte *context) { return 0; }
  virtual bool reset_query_id_processor(byte *query_id) { return 0; }
  /*
    Check if a partition function is allowed
    SYNOPSIS
      check_partition_func_processor()
      bool_arg                        Return argument
    RETURN VALUE
      0
    DESCRIPTION
    check_partition_func_processor is used to check if a partition function
    uses an allowed function. The default is that an item is not allowed
    in a partition function. However all mathematical functions, string
@@ -1031,7 +1038,7 @@ class Item_name_const : public Item
    Item::maybe_null= TRUE;
  }

  virtual bool check_partition_func_processor(byte *bool_arg) { return 0; }
  bool check_partition_func_processor(byte *bool_arg) { return 0; }
  bool fix_fields(THD *, Item **);

  enum Type type() const;
@@ -1078,7 +1085,7 @@ class Item_num: public Item
  Item_num() {}                               /* Remove gcc warning */
  virtual Item_num *neg()= 0;
  Item *safe_charset_converter(CHARSET_INFO *tocs);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

#define NO_CACHED_FIELD_INDEX ((uint)(-1))
@@ -1264,7 +1271,7 @@ class Item_null :public Item
  bool is_null() { return 1; }
  void print(String *str) { str->append(STRING_WITH_LEN("NULL")); }
  Item *safe_charset_converter(CHARSET_INFO *tocs);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_null_result :public Item_null
@@ -1277,7 +1284,7 @@ class Item_null_result :public Item_null
  {
    save_in_field(result_field, no_conversions);
  }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};  

@@ -1462,7 +1469,7 @@ class Item_static_int_func :public Item_int
  {}
  Item *safe_charset_converter(CHARSET_INFO *tocs);
  void print(String *str) { str->append(func_name); }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -1582,7 +1589,7 @@ class Item_static_float_func :public Item_float
  {}
  void print(String *str) { str->append(func_name); }
  Item *safe_charset_converter(CHARSET_INFO *tocs);
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -1661,7 +1668,7 @@ class Item_string :public Item
  void print(String *str);
  // to prevent drop fixed flag (no need parent cleanup call)
  void cleanup() {}
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -1676,7 +1683,7 @@ class Item_static_string_func :public Item_string
  {}
  Item *safe_charset_converter(CHARSET_INFO *tocs);
  void print(String *str) { str->append(func_name); }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -1690,7 +1697,7 @@ class Item_datetime :public Item_string
                                                    &my_charset_bin)
  { max_length=19;}
  enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -1714,7 +1721,7 @@ class Item_return_int :public Item_int
    unsigned_flag=1;
  }
  enum_field_types field_type() const { return int_field_type; }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -1739,7 +1746,7 @@ class Item_hex_string: public Item
  void cleanup() {}
  bool eq(const Item *item, bool binary_cmp) const;
  virtual Item *safe_charset_converter(CHARSET_INFO *tocs);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -1977,7 +1984,7 @@ class Item_int_with_ref :public Item_int
  }
  Item *new_item();
  virtual Item *real_item() { return ref; }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

+14 −14
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ class Item_bool_rowready_func2 :public Item_bool_func2
  }
  Item *neg_transformer(THD *thd);
  virtual Item *negated_item();
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_not :public Item_bool_func
@@ -250,7 +250,7 @@ class Item_func_not :public Item_bool_func
  enum Functype functype() const { return NOT_FUNC; }
  const char *func_name() const { return "not"; }
  Item *neg_transformer(THD *thd);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_maxmin_subselect;
@@ -465,7 +465,7 @@ class Item_func_between :public Item_func_opt_neg
  bool is_bool_func() { return 1; }
  CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
  uint decimal_precision() const { return 1; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -477,7 +477,7 @@ class Item_func_strcmp :public Item_bool_func2
  optimize_type select_optimize() const { return OPTIMIZE_NONE; }
  const char *func_name() const { return "strcmp"; }
  void print(String *str) { Item_func::print(str); }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -540,7 +540,7 @@ class Item_func_ifnull :public Item_func_coalesce
  const char *func_name() const { return "ifnull"; }
  Field *tmp_table_field(TABLE *table);
  uint decimal_precision() const;
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -581,7 +581,7 @@ class Item_func_nullif :public Item_bool_func2
  void print(String *str) { Item_func::print(str); }
  table_map not_null_tables() const { return 0; }
  bool is_null();
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -624,7 +624,7 @@ class Item_func_case :public Item_func
  void print(String *str);
  Item *find_item(String *str);
  CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -904,7 +904,7 @@ class Item_func_in :public Item_func_opt_neg
  bool nulls_in_row();
  bool is_bool_func() { return 1; }
  CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

/* Functions used by where clause */
@@ -946,7 +946,7 @@ class Item_func_isnull :public Item_bool_func
  optimize_type select_optimize() const { return OPTIMIZE_NULL; }
  Item *neg_transformer(THD *thd);
  CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

/* Functions used by HAVING for rewriting IN subquery */
@@ -968,7 +968,7 @@ class Item_is_not_null_test :public Item_func_isnull
  */
  table_map used_tables() const
    { return used_tables_cache | RAND_TABLE_BIT; }
  virtual bool check_partition_func_processor(byte *bool_arg)
  bool check_partition_func_processor(byte *bool_arg)
  { *(bool *)bool_arg= FALSE; return 0; }
};

@@ -992,7 +992,7 @@ class Item_func_isnotnull :public Item_bool_func
  void print(String *str);
  CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
  void top_level_item() { abort_on_null=1; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -1031,7 +1031,7 @@ class Item_func_like :public Item_bool_func2
  const char *func_name() const { return "like"; }
  bool fix_fields(THD *thd, Item **ref);
  void cleanup();
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

#ifdef USE_REGEX
@@ -1054,7 +1054,7 @@ class Item_func_regex :public Item_bool_func
  const char *func_name() const { return "regexp"; }
  void print(String *str) { print_op(str); }
  CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

#else
@@ -1111,7 +1111,7 @@ class Item_cond :public Item_bool_func
  Item *transform(Item_transformer transformer, byte *arg);
  void traverse_cond(Cond_traverser, void *arg, traverse_order order);
  void neg_arguments(THD *thd);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


+31 −31
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ class Item_func_num1: public Item_func_numhybrid
  void fix_num_length_and_dec();
  void find_num_type();
  String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -260,7 +260,7 @@ class Item_num_op :public Item_func_numhybrid
  void print(String *str) { print_op(str); }
  void find_num_type();
  String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -298,7 +298,7 @@ class Item_func_signed :public Item_int_func
  { max_length=args[0]->max_length; unsigned_flag=0; }
  void print(String *str);
  uint decimal_precision() const { return args[0]->decimal_precision(); }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -332,7 +332,7 @@ class Item_decimal_typecast :public Item_func
  void fix_length_and_dec() {};
  const char *func_name() const { return "decimal_typecast"; }
  void print(String *);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -401,7 +401,7 @@ class Item_func_int_div :public Item_int_func
  const char *func_name() const { return "DIV"; }
  void fix_length_and_dec();
  void print(String *str) { print_op(str); }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -474,7 +474,7 @@ class Item_func_exp :public Item_dec_func
  Item_func_exp(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "exp"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -484,7 +484,7 @@ class Item_func_ln :public Item_dec_func
  Item_func_ln(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "ln"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -495,7 +495,7 @@ class Item_func_log :public Item_dec_func
  Item_func_log(Item *a,Item *b) :Item_dec_func(a,b) {}
  double val_real();
  const char *func_name() const { return "log"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -505,7 +505,7 @@ class Item_func_log2 :public Item_dec_func
  Item_func_log2(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "log2"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -515,7 +515,7 @@ class Item_func_log10 :public Item_dec_func
  Item_func_log10(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "log10"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -525,7 +525,7 @@ class Item_func_sqrt :public Item_dec_func
  Item_func_sqrt(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "sqrt"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -535,7 +535,7 @@ class Item_func_pow :public Item_dec_func
  Item_func_pow(Item *a,Item *b) :Item_dec_func(a,b) {}
  double val_real();
  const char *func_name() const { return "pow"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -545,7 +545,7 @@ class Item_func_acos :public Item_dec_func
  Item_func_acos(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "acos"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_asin :public Item_dec_func
@@ -554,7 +554,7 @@ class Item_func_asin :public Item_dec_func
  Item_func_asin(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "asin"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_atan :public Item_dec_func
@@ -564,7 +564,7 @@ class Item_func_atan :public Item_dec_func
  Item_func_atan(Item *a,Item *b) :Item_dec_func(a,b) {}
  double val_real();
  const char *func_name() const { return "atan"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_cos :public Item_dec_func
@@ -573,7 +573,7 @@ class Item_func_cos :public Item_dec_func
  Item_func_cos(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "cos"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_sin :public Item_dec_func
@@ -582,7 +582,7 @@ class Item_func_sin :public Item_dec_func
  Item_func_sin(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "sin"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_tan :public Item_dec_func
@@ -591,7 +591,7 @@ class Item_func_tan :public Item_dec_func
  Item_func_tan(Item *a) :Item_dec_func(a) {}
  double val_real();
  const char *func_name() const { return "tan"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_integer :public Item_int_func
@@ -668,7 +668,7 @@ class Item_func_sign :public Item_int_func
  Item_func_sign(Item *a) :Item_int_func(a) {}
  const char *func_name() const { return "sign"; }
  longlong val_int();
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -683,7 +683,7 @@ class Item_func_units :public Item_real_func
  const char *func_name() const { return name; }
  void fix_length_and_dec()
  { decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -701,7 +701,7 @@ class Item_func_min_max :public Item_func
  my_decimal *val_decimal(my_decimal *);
  void fix_length_and_dec();
  enum Item_result result_type () const { return cmp_type; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_min :public Item_func_min_max
@@ -727,7 +727,7 @@ class Item_func_length :public Item_int_func
  longlong val_int();
  const char *func_name() const { return "length"; }
  void fix_length_and_dec() { max_length=10; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_bit_length :public Item_func_length
@@ -747,7 +747,7 @@ class Item_func_char_length :public Item_int_func
  longlong val_int();
  const char *func_name() const { return "char_length"; }
  void fix_length_and_dec() { max_length=10; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_coercibility :public Item_int_func
@@ -758,7 +758,7 @@ class Item_func_coercibility :public Item_int_func
  const char *func_name() const { return "coercibility"; }
  void fix_length_and_dec() { max_length=10; maybe_null= 0; }
  table_map not_null_tables() const { return 0; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_locate :public Item_int_func
@@ -772,7 +772,7 @@ class Item_func_locate :public Item_int_func
  longlong val_int();
  void fix_length_and_dec();
  void print(String *str);
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


@@ -797,7 +797,7 @@ class Item_func_ascii :public Item_int_func
  longlong val_int();
  const char *func_name() const { return "ascii"; }
  void fix_length_and_dec() { max_length=3; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_ord :public Item_int_func
@@ -807,7 +807,7 @@ class Item_func_ord :public Item_int_func
  Item_func_ord(Item *a) :Item_int_func(a) {}
  longlong val_int();
  const char *func_name() const { return "ord"; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_find_in_set :public Item_int_func
@@ -821,7 +821,7 @@ class Item_func_find_in_set :public Item_int_func
  longlong val_int();
  const char *func_name() const { return "find_in_set"; }
  void fix_length_and_dec();
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
@@ -833,7 +833,7 @@ class Item_func_bit: public Item_int_func
  Item_func_bit(Item *a) :Item_int_func(a) {}
  void fix_length_and_dec() { unsigned_flag= 1; }
  void print(String *str) { print_op(str); }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_bit_or :public Item_func_bit
@@ -859,7 +859,7 @@ class Item_func_bit_count :public Item_int_func
  longlong val_int();
  const char *func_name() const { return "bit_count"; }
  void fix_length_and_dec() { max_length=2; }
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};

class Item_func_shift_left :public Item_func_bit
@@ -1286,7 +1286,7 @@ class Item_func_inet_aton : public Item_int_func
   longlong val_int();
   const char *func_name() const { return "inet_aton"; }
   void fix_length_and_dec() { decimals = 0; max_length = 21; maybe_null=1;}
  virtual bool check_partition_func_processor(byte *bool_arg) { return 0;}
  bool check_partition_func_processor(byte *bool_arg) { return 0;}
};


Loading