diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-10 18:17:43 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-10 18:17:43 +0300 |
commit | f34be1893892745b5b1a7a099eab4ad8e9ac8641 (patch) | |
tree | d7eed818fd8b648e5eabe0dbad53e61665d8dc37 /sql/sql_class.h | |
parent | e843297d128b165125d17aab8958f7ca91808923 (diff) | |
parent | 8882d71f3f1dd03ef98d072def39b29e6a03f5b8 (diff) | |
download | mariadb-git-f34be1893892745b5b1a7a099eab4ad8e9ac8641.tar.gz |
Merge with MariaDB 5.2
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index fd932ef59db..0ed27ae2825 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2197,7 +2197,7 @@ public: /*TODO: this will be obsolete when we have support for 64 bit my_time_t */ inline bool is_valid_time() { - return (start_time < (time_t) MY_TIME_T_MAX); + return (IS_TIME_T_VALID_FOR_TIMESTAMP(start_time)); } void set_time_after_lock() { utime_after_lock= my_micro_time(); } ulonglong current_utime() { return my_micro_time(); } @@ -2685,7 +2685,11 @@ public: virtual uint field_count(List<Item> &fields) const { return fields.elements; } virtual bool send_fields(List<Item> &list, uint flags)=0; - virtual bool send_data(List<Item> &items)=0; + /* + send_data returns 0 on ok, 1 on error and -1 if data was ignored, for + example for a duplicate row entry written to a temp table. + */ + virtual int send_data(List<Item> &items)=0; virtual bool initialize_tables (JOIN *join=0) { return 0; } virtual void send_error(uint errcode,const char *err); virtual bool send_eof()=0; @@ -2743,7 +2747,7 @@ class select_send :public select_result { public: select_send() :is_result_set_started(FALSE) {} bool send_fields(List<Item> &list, uint flags); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool send_eof(); virtual bool check_simple_select() const { return FALSE; } void abort(); @@ -2814,7 +2818,7 @@ public: } ~select_export(); int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); }; @@ -2831,7 +2835,7 @@ public: nest_level= nest_level_arg; } int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); }; @@ -2852,7 +2856,7 @@ public: ~select_insert(); int prepare(List<Item> &list, SELECT_LEX_UNIT *u); virtual int prepare2(void); - bool send_data(List<Item> &items); + virtual int send_data(List<Item> &items); virtual void store_values(List<Item> &values); virtual bool can_rollback_data() { return 0; } void send_error(uint errcode,const char *err); @@ -3021,7 +3025,7 @@ public: select_union() :write_err(0),table(0) { tmp_table_param.init(); } int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool send_eof(); bool flush(); void cleanup(); @@ -3037,7 +3041,7 @@ protected: Item_subselect *item; public: select_subselect(Item_subselect *item); - bool send_data(List<Item> &items)=0; + int send_data(List<Item> &items)=0; bool send_eof() { return 0; }; }; @@ -3048,7 +3052,7 @@ public: select_singlerow_subselect(Item_subselect *item_arg) :select_subselect(item_arg) {} - bool send_data(List<Item> &items); + int send_data(List<Item> &items); }; @@ -3096,7 +3100,7 @@ public: bool is_distinct, ulonglong options, const char *alias, bool bit_fields_as_long); bool init_result_table(ulonglong select_options); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); void cleanup(); ha_rows get_null_count_of_col(uint idx) { @@ -3128,7 +3132,7 @@ public: :select_subselect(item_arg), cache(0), fmax(mx) {} void cleanup(); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool cmp_real(); bool cmp_int(); bool cmp_decimal(); @@ -3141,7 +3145,7 @@ class select_exists_subselect :public select_subselect public: select_exists_subselect(Item_subselect *item_arg) :select_subselect(item_arg){} - bool send_data(List<Item> &items); + int send_data(List<Item> &items); }; @@ -3389,7 +3393,7 @@ public: multi_delete(TABLE_LIST *dt, uint num_of_tables); ~multi_delete(); int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool initialize_tables (JOIN *join); void send_error(uint errcode,const char *err); int do_deletes(); @@ -3433,7 +3437,7 @@ public: enum_duplicates handle_duplicates, bool ignore); ~multi_update(); int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool initialize_tables (JOIN *join); void send_error(uint errcode,const char *err); int do_updates(); @@ -3477,7 +3481,7 @@ public: } ~select_dumpvar() {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_data(List<Item> &items); + int send_data(List<Item> &items); bool send_eof(); virtual bool check_simple_select() const; void cleanup(); |