summaryrefslogtreecommitdiff
path: root/sql/vers_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/vers_utils.h')
-rw-r--r--sql/vers_utils.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/sql/vers_utils.h b/sql/vers_utils.h
index 52d01e36e8c..e896f84135e 100644
--- a/sql/vers_utils.h
+++ b/sql/vers_utils.h
@@ -44,38 +44,4 @@ public:
bool acquire_error() const { return error; }
};
-
-class Local_da : public Diagnostics_area
-{
- THD *thd;
- uint sql_error;
- Diagnostics_area *saved_da;
-
-public:
- Local_da(THD *_thd, uint _sql_error= 0) :
- Diagnostics_area(_thd->query_id, false, true),
- thd(_thd),
- sql_error(_sql_error),
- saved_da(_thd->get_stmt_da())
- {
- thd->set_stmt_da(this);
- }
- ~Local_da()
- {
- if (saved_da)
- finish();
- }
- void finish()
- {
- DBUG_ASSERT(saved_da && thd);
- thd->set_stmt_da(saved_da);
- if (is_error())
- my_error(sql_error ? sql_error : sql_errno(), MYF(0), message());
- if (warn_count() > error_count())
- saved_da->copy_non_errors_from_wi(thd, get_warning_info());
- saved_da= NULL;
- }
-};
-
-
#endif // VERS_UTILS_INCLUDED