mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge chunk from trunk.
This commit is contained in:
@ -1920,6 +1920,7 @@ class select_result :public Sql_alloc {
|
||||
protected:
|
||||
THD *thd;
|
||||
SELECT_LEX_UNIT *unit;
|
||||
uint nest_level;
|
||||
public:
|
||||
select_result();
|
||||
virtual ~select_result() {};
|
||||
@ -1956,6 +1957,12 @@ public:
|
||||
*/
|
||||
virtual void cleanup();
|
||||
void set_thd(THD *thd_arg) { thd= thd_arg; }
|
||||
/**
|
||||
The nest level, if supported.
|
||||
@return
|
||||
-1 if nest level is undefined, otherwise a positive integer.
|
||||
*/
|
||||
int get_nest_level() { return nest_level; }
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
virtual void begin_dataset() {}
|
||||
#else
|
||||
@ -2042,7 +2049,14 @@ class select_export :public select_to_file {
|
||||
bool is_unsafe_field_sep;
|
||||
bool fixed_row_size;
|
||||
public:
|
||||
select_export(sql_exchange *ex) :select_to_file(ex) {}
|
||||
/**
|
||||
Creates a select_export to represent INTO OUTFILE <filename> with a
|
||||
defined level of subquery nesting.
|
||||
*/
|
||||
select_export(sql_exchange *ex, uint nest_level_arg) :select_to_file(ex)
|
||||
{
|
||||
nest_level= nest_level_arg;
|
||||
}
|
||||
~select_export();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
bool send_data(List<Item> &items);
|
||||
@ -2051,7 +2065,15 @@ public:
|
||||
|
||||
class select_dump :public select_to_file {
|
||||
public:
|
||||
select_dump(sql_exchange *ex) :select_to_file(ex) {}
|
||||
/**
|
||||
Creates a select_export to represent INTO DUMPFILE <filename> with a
|
||||
defined level of subquery nesting.
|
||||
*/
|
||||
select_dump(sql_exchange *ex, uint nest_level_arg) :
|
||||
select_to_file(ex)
|
||||
{
|
||||
nest_level= nest_level_arg;
|
||||
}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
bool send_data(List<Item> &items);
|
||||
};
|
||||
@ -2062,17 +2084,17 @@ class select_insert :public select_result_interceptor {
|
||||
TABLE_LIST *table_list;
|
||||
TABLE *table;
|
||||
List<Item> *fields;
|
||||
ulonglong last_insert_id;
|
||||
ulonglong autoinc_value_of_last_inserted_row; // not autogenerated
|
||||
ulonglong autoinc_value_of_first_inserted_row; // autogenerated
|
||||
COPY_INFO info;
|
||||
bool insert_into_view;
|
||||
bool is_bulk_insert_mode;
|
||||
select_insert(TABLE_LIST *table_list_par,
|
||||
TABLE *table_par, List<Item> *fields_par,
|
||||
List<Item> *update_fields, List<Item> *update_values,
|
||||
enum_duplicates duplic, bool ignore);
|
||||
~select_insert();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int prepare2(void);
|
||||
virtual int prepare2(void);
|
||||
bool send_data(List<Item> &items);
|
||||
virtual void store_values(List<Item> &values);
|
||||
void send_error(uint errcode,const char *err);
|
||||
@ -2107,6 +2129,7 @@ public:
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
void abort();
|
||||
int prepare2(void) { return 0; }
|
||||
};
|
||||
|
||||
#include <myisam.h>
|
||||
@ -2468,7 +2491,16 @@ class select_dumpvar :public select_result_interceptor {
|
||||
ha_rows row_count;
|
||||
public:
|
||||
List<my_var> var_list;
|
||||
select_dumpvar() { var_list.empty(); row_count= 0;}
|
||||
/**
|
||||
Creates a select_dumpvar to represent INTO <variable> with a defined
|
||||
level of subquery nesting.
|
||||
*/
|
||||
select_dumpvar(uint nest_level_arg)
|
||||
{
|
||||
var_list.empty();
|
||||
row_count= 0;
|
||||
nest_level= nest_level_arg;
|
||||
}
|
||||
~select_dumpvar() {}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
bool send_data(List<Item> &items);
|
||||
|
Reference in New Issue
Block a user