mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
This commit is contained in:
@@ -969,6 +969,7 @@ public:
|
||||
@return true if the error is handled
|
||||
*/
|
||||
virtual bool handle_error(uint sql_errno,
|
||||
const char *message,
|
||||
MYSQL_ERROR::enum_warning_level level,
|
||||
THD *thd) = 0;
|
||||
};
|
||||
@@ -1363,9 +1364,20 @@ public:
|
||||
|
||||
ulonglong limit_found_rows;
|
||||
ulonglong options; /* Bitmap of states */
|
||||
longlong row_count_func; /* For the ROW_COUNT() function */
|
||||
ha_rows cuted_fields,
|
||||
sent_row_count, examined_row_count;
|
||||
longlong row_count_func; /* For the ROW_COUNT() function */
|
||||
ha_rows cuted_fields;
|
||||
|
||||
/*
|
||||
number of rows we actually sent to the client, including "synthetic"
|
||||
rows in ROLLUP etc.
|
||||
*/
|
||||
ha_rows sent_row_count;
|
||||
|
||||
/*
|
||||
number of rows we read, sent or not, including in create_sort_index()
|
||||
*/
|
||||
ha_rows examined_row_count;
|
||||
|
||||
/*
|
||||
The set of those tables whose fields are referenced in all subqueries
|
||||
of the query.
|
||||
@@ -1401,7 +1413,11 @@ public:
|
||||
/* Statement id is thread-wide. This counter is used to generate ids */
|
||||
ulong statement_id_counter;
|
||||
ulong rand_saved_seed1, rand_saved_seed2;
|
||||
ulong row_count; // Row counter, mainly for errors and warnings
|
||||
/*
|
||||
Row counter, mainly for errors and warnings. Not increased in
|
||||
create_sort_index(); may differ from examined_row_count.
|
||||
*/
|
||||
ulong row_count;
|
||||
pthread_t real_id; /* For debugging */
|
||||
my_thread_id thread_id;
|
||||
uint tmp_table, global_read_lock;
|
||||
@@ -1464,7 +1480,14 @@ public:
|
||||
/* for IS NULL => = last_insert_id() fix in remove_eq_conds() */
|
||||
bool substitute_null_with_insert_id;
|
||||
bool in_lock_tables;
|
||||
bool query_error, bootstrap, cleanup_done;
|
||||
/**
|
||||
True if a slave error. Causes the slave to stop. Not the same
|
||||
as the statement execution error (is_error()), since
|
||||
a statement may be expected to return an error, e.g. because
|
||||
it returned an error on master, and this is OK on the slave.
|
||||
*/
|
||||
bool is_slave_error;
|
||||
bool bootstrap, cleanup_done;
|
||||
|
||||
/** is set if some thread specific value(s) used in a statement. */
|
||||
bool thread_specific_used;
|
||||
@@ -1693,7 +1716,7 @@ public:
|
||||
net.last_error[0]= 0;
|
||||
net.last_errno= 0;
|
||||
net.report_error= 0;
|
||||
query_error= 0;
|
||||
is_slave_error= 0;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
inline bool vio_ok() const { return net.vio != 0; }
|
||||
@@ -1707,6 +1730,20 @@ public:
|
||||
net.report_error= 1;
|
||||
DBUG_PRINT("error",("Fatal error set"));
|
||||
}
|
||||
/**
|
||||
TRUE if there is an error in the error stack.
|
||||
|
||||
Please use this method instead of direct access to
|
||||
net.report_error.
|
||||
|
||||
If TRUE, the current (sub)-statement should be aborted.
|
||||
The main difference between this member and is_fatal_error
|
||||
is that a fatal error can not be handled by a stored
|
||||
procedure continue handler, whereas a normal error can.
|
||||
|
||||
To raise this flag, use my_error().
|
||||
*/
|
||||
inline bool is_error() const { return net.report_error; }
|
||||
inline CHARSET_INFO *charset() { return variables.character_set_client; }
|
||||
void update_charset();
|
||||
|
||||
@@ -1900,7 +1937,7 @@ public:
|
||||
@param level the error level
|
||||
@return true if the error is handled
|
||||
*/
|
||||
virtual bool handle_error(uint sql_errno,
|
||||
virtual bool handle_error(uint sql_errno, const char *message,
|
||||
MYSQL_ERROR::enum_warning_level level);
|
||||
|
||||
/**
|
||||
@@ -2027,14 +2064,20 @@ public:
|
||||
|
||||
|
||||
class select_send :public select_result {
|
||||
int status;
|
||||
/**
|
||||
True if we have sent result set metadata to the client.
|
||||
In this case the client always expects us to end the result
|
||||
set with an eof or error packet
|
||||
*/
|
||||
bool is_result_set_started;
|
||||
public:
|
||||
select_send() :status(0) {}
|
||||
select_send() :is_result_set_started(FALSE) {}
|
||||
bool send_fields(List<Item> &list, uint flags);
|
||||
bool send_data(List<Item> &items);
|
||||
bool send_eof();
|
||||
virtual bool check_simple_select() const { return FALSE; }
|
||||
void abort();
|
||||
virtual void cleanup();
|
||||
};
|
||||
|
||||
|
||||
@@ -2068,12 +2111,19 @@ public:
|
||||
class select_export :public select_to_file {
|
||||
uint field_term_length;
|
||||
int field_sep_char,escape_char,line_sep_char;
|
||||
int field_term_char; // first char of FIELDS TERMINATED BY or MAX_INT
|
||||
/*
|
||||
The is_ambiguous_field_sep field is true if a value of the field_sep_char
|
||||
field is one of the 'n', 't', 'r' etc characters
|
||||
(see the READ_INFO::unescape method and the ESCAPE_CHARS constant value).
|
||||
*/
|
||||
bool is_ambiguous_field_sep;
|
||||
/*
|
||||
The is_ambiguous_field_term is true if field_sep_char contains the first
|
||||
char of the FIELDS TERMINATED BY (ENCLOSED BY is empty), and items can
|
||||
contain this character.
|
||||
*/
|
||||
bool is_ambiguous_field_term;
|
||||
/*
|
||||
The is_unsafe_field_sep field is true if a value of the field_sep_char
|
||||
field is one of the '0'..'9', '+', '-', '.' and 'e' characters
|
||||
|
||||
Reference in New Issue
Block a user