From 6314babf40cee31344a3fa7d94c2a677eac13c44 Mon Sep 17 00:00:00 2001 From: "mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se" <> Date: Sat, 8 Apr 2006 18:10:20 -0400 Subject: BUG#18198: Errors due to too much allowed in partition functions Added functions to enable/disable allowed/disallowed partition functions --- sql/item_timefunc.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'sql/item_timefunc.h') diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index fd2f3945fca..ffe049873fc 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -39,6 +39,7 @@ public: { max_length=6*MY_CHARSET_BIN_MB_MAXLEN; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -53,6 +54,7 @@ public: decimals=0; max_length=6*MY_CHARSET_BIN_MB_MAXLEN; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -69,6 +71,7 @@ public: maybe_null=1; } enum_monotonicity_info get_monotonicity_info() const; + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -84,6 +87,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -108,6 +112,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -140,6 +145,7 @@ public: max_length=3*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -155,6 +161,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -170,6 +177,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -185,6 +193,7 @@ public: max_length=1*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -200,6 +209,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -215,6 +225,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_yearweek :public Item_int_func @@ -229,6 +240,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -245,6 +257,7 @@ public: max_length=4*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -274,6 +287,7 @@ public: max_length=1*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_dayname :public Item_func_weekday @@ -306,6 +320,7 @@ public: decimals=0; max_length=10*MY_CHARSET_BIN_MB_MAXLEN; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -320,6 +335,7 @@ public: decimals=0; max_length=10*MY_CHARSET_BIN_MB_MAXLEN; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -526,6 +542,7 @@ public: Item_func_from_days(Item *a) :Item_date(a) {} const char *func_name() const { return "from_days"; } bool get_date(TIME *res, uint fuzzy_date); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -543,6 +560,7 @@ public: void fix_length_and_dec(); uint format_length(const String *format); bool eq(const Item *item, bool binary_cmp) const; + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -561,6 +579,7 @@ class Item_func_from_unixtime :public Item_date_func const char *func_name() const { return "from_unixtime"; } void fix_length_and_dec(); bool get_date(TIME *res, uint fuzzy_date); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -627,6 +646,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -648,6 +668,7 @@ public: longlong val_int(); bool get_date(TIME *res, uint fuzzy_date); void print(String *str); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -665,6 +686,7 @@ class Item_extract :public Item_int_func void fix_length_and_dec(); bool eq(const Item *item, bool binary_cmp) const; void print(String *str); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -701,6 +723,7 @@ public: max_length=args[0]->max_length; maybe_null= 1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -720,6 +743,7 @@ public: String *val_str(String *a); void fix_length_and_dec(); void print(String *str); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -791,6 +815,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -813,6 +838,7 @@ public: } void print(String *str); const char *func_name() const { return "add_time"; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_timediff :public Item_str_func @@ -852,6 +878,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_microsecond :public Item_int_func @@ -865,6 +892,7 @@ public: decimals=0; maybe_null=1; } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -882,6 +910,7 @@ public: maybe_null=1; } void print(String *str); + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -928,6 +957,7 @@ public: { return tmp_table_field_from_field_type(table, 1); } + virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} }; -- cgit v1.2.1 From fbd7a258e242b13f98e1c12931597b1f87025d4d Mon Sep 17 00:00:00 2001 From: "mikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se" <> Date: Wed, 31 May 2006 13:32:14 -0400 Subject: BUG#18198: Many strange partition functions were allowed, now only strictly allowed functions are ok --- sql/item_timefunc.h | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'sql/item_timefunc.h') diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index a42232fd0fc..cbac0564faf 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -39,7 +39,7 @@ public: { max_length=6*MY_CHARSET_BIN_MB_MAXLEN; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -54,7 +54,7 @@ public: decimals=0; max_length=6*MY_CHARSET_BIN_MB_MAXLEN; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -71,7 +71,7 @@ public: maybe_null=1; } enum_monotonicity_info get_monotonicity_info() const; - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -87,7 +87,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -112,7 +112,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -145,7 +145,7 @@ public: max_length=3*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -161,7 +161,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -177,7 +177,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -193,7 +193,7 @@ public: max_length=1*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -209,7 +209,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -225,7 +225,7 @@ public: max_length=2*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_yearweek :public Item_int_func @@ -240,7 +240,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -257,7 +257,7 @@ public: max_length=4*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -287,7 +287,7 @@ public: max_length=1*MY_CHARSET_BIN_MB_MAXLEN; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_dayname :public Item_func_weekday @@ -320,7 +320,7 @@ public: decimals=0; max_length=10*MY_CHARSET_BIN_MB_MAXLEN; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -335,7 +335,7 @@ public: decimals=0; max_length=10*MY_CHARSET_BIN_MB_MAXLEN; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -542,7 +542,7 @@ public: Item_func_from_days(Item *a) :Item_date(a) {} const char *func_name() const { return "from_days"; } bool get_date(TIME *res, uint fuzzy_date); - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -560,7 +560,7 @@ public: void fix_length_and_dec(); uint format_length(const String *format); bool eq(const Item *item, bool binary_cmp) const; - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -579,7 +579,7 @@ class Item_func_from_unixtime :public Item_date_func const char *func_name() const { return "from_unixtime"; } void fix_length_and_dec(); bool get_date(TIME *res, uint fuzzy_date); - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -646,7 +646,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -669,7 +669,7 @@ public: bool get_date(TIME *res, uint fuzzy_date); bool eq(const Item *item, bool binary_cmp) const; 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;} }; @@ -687,7 +687,7 @@ class Item_extract :public Item_int_func void fix_length_and_dec(); bool eq(const Item *item, bool binary_cmp) const; 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;} }; @@ -724,7 +724,7 @@ public: max_length=args[0]->max_length; maybe_null= 1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -744,7 +744,7 @@ public: String *val_str(String *a); 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;} }; @@ -816,7 +816,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -839,7 +839,7 @@ public: } void print(String *str); const char *func_name() const { return "add_time"; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; class Item_func_timediff :public Item_str_func @@ -879,7 +879,7 @@ public: { return tmp_table_field_from_field_type(table, 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_microsecond :public Item_int_func @@ -893,7 +893,7 @@ public: decimals=0; maybe_null=1; } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; @@ -911,7 +911,7 @@ public: maybe_null=1; } 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;} }; @@ -958,7 +958,7 @@ public: { return tmp_table_field_from_field_type(table, 1); } - virtual bool check_partition_func_processor(byte *bool_arg) { return 0;} + bool check_partition_func_processor(byte *bool_arg) { return 0;} }; -- cgit v1.2.1