summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index f68243ff544..06edfd8c334 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3634,6 +3634,11 @@ public:
void begin_dataset() {}
#endif
virtual void update_used_tables() {}
+
+ void reset_offset_limit()
+ {
+ unit->offset_limit_cnt= 0;
+ }
};
@@ -3662,6 +3667,26 @@ public:
};
+/*
+ This is a select_result_sink which stores the data in text form.
+*/
+
+class select_result_text_buffer : public select_result_sink
+{
+public:
+ select_result_text_buffer(THD *thd_arg) : thd(thd_arg) {}
+ int send_data(List<Item> &items);
+ bool send_result_set_metadata(List<Item> &fields, uint flag);
+
+ void save_to(String *res);
+private:
+ int append_row(List<Item> &items, bool send_names);
+
+ THD *thd;
+ List<char*> rows;
+ int n_columns;
+};
+
/*
Base class for select_result descendands which intercept and
@@ -4389,7 +4414,9 @@ class multi_update :public select_result_interceptor
so that afterward send_error() needs to find out that.
*/
bool error_handled;
-
+
+ /* Need this to protect against multiple prepare() calls */
+ bool prepared;
public:
multi_update(TABLE_LIST *ut, List<TABLE_LIST> *leaves_list,
List<Item> *fields, List<Item> *values,