32
32
#include <sys/resource.h>
33
33
#include <sys/time.h>
35
// #include <drizzled/catalog/instance.h>
36
// #include <drizzled/cursor.h>
37
35
#include <drizzled/diagnostics_area.h>
38
36
#include <drizzled/error.h>
39
37
#include <drizzled/identifier.h>
608
607
List<DRIZZLE_ERROR> warn_list;
609
608
uint32_t warn_count[(uint32_t) DRIZZLE_ERROR::WARN_LEVEL_END];
610
609
uint32_t total_warn_count;
611
Diagnostics_area main_da;
610
Diagnostics_area main_da0;
613
612
ulong col_access;
1095
1094
int send_explain_fields(select_result *result);
1098
Clear the current error, if any.
1099
We do not clear is_fatal_error or is_fatal_sub_stmt_error since we
1100
assume this is never called if the fatal error is set.
1101
@todo: To silence an error, one should use Internal_error_handler
1102
mechanism. In future this function will be removed.
1104
inline void clear_error(bool full= false)
1106
if (main_da.is_error())
1107
main_da.reset_diagnostics_area();
1111
drizzle_reset_errors(this, true);
1115
void clearDiagnostics()
1117
main_da.reset_diagnostics_area();
1121
Mark the current error as fatal. Warning: this does not
1122
set any error, it sets a property of the error, so must be
1123
followed or prefixed with my_error().
1125
inline void fatal_error()
1127
assert(main_da.is_error());
1128
is_fatal_error= true;
1131
true if there is an error in the error stack.
1133
Please use this method instead of direct access to
1136
If true, the current (sub)-statement should be aborted.
1137
The main difference between this member and is_fatal_error
1138
is that a fatal error can not be handled by a stored
1139
procedure continue handler, whereas a normal error can.
1141
To raise this flag, use my_error().
1143
inline bool is_error() const { return main_da.is_error(); }
1096
void clear_error(bool full= false);
1097
void clearDiagnostics();
1099
bool is_error() const;
1144
1101
inline const CHARSET_INFO *charset() { return default_charset_info; }
1404
1361
void mark_used_tables_as_free_for_reuse(Table *table);
1408
/** A short cut for session->main_da.set_ok_status(). */
1409
inline void my_ok(ha_rows affected_rows= 0, ha_rows found_rows_arg= 0,
1410
uint64_t passed_id= 0, const char *message= NULL)
1412
main_da.set_ok_status(this, affected_rows, found_rows_arg, passed_id, message);
1416
/** A short cut for session->main_da.set_eof_status(). */
1418
inline void my_eof()
1420
main_da.set_eof_status(this);
1364
void my_ok(ha_rows affected_rows= 0, ha_rows found_rows_arg= 0, uint64_t passed_id= 0, const char *message= NULL);
1423
1366
bool add_item_to_list(Item *item);
1424
1367
bool add_value_to_list(Item *value);
1425
1368
bool add_order_to_list(Item *item, bool asc);