summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-06-15 23:01:01 +0300
committerMichael Widenius <monty@askmonty.org>2013-06-15 23:01:01 +0300
commit7c1abe151c88d0f1cf7bad0a856b554a2fdec83a (patch)
tree942065eb257529d342d64bdff6c5d7a63a4966a2 /sql
parent5f1f2fc0e443f098af24d21f7d1ec1a8166a4030 (diff)
downloadmariadb-git-7c1abe151c88d0f1cf7bad0a856b554a2fdec83a.tar.gz
Fixed patch that was part of last push that didn't apply correctly.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_admin.cc2
-rw-r--r--sql/sql_prepare.cc17
2 files changed, 8 insertions, 11 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 4e5a3873df9..be2a4d3df64 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -406,7 +406,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
open_error= open_and_lock_tables(thd, table, TRUE, 0);
- da->pop_warning_info(&tmp_wi);
+ da->pop_warning_info();
}
else
{
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index fe3a35b3101..a8ecdc0718b 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2962,26 +2962,23 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length)
param= stmt->param_array[param_number];
- Diagnostics_area new_stmt_da(true), *save_stmt_da= thd->stmt_da;
- Warning_info new_warning_info(thd->query_id, false, true);
- Warning_info *save_warning_info= thd->warning_info;
+ Diagnostics_area new_stmt_da(thd->query_id, false);
+ Diagnostics_area *save_stmt_da= thd->get_stmt_da();
- thd->stmt_da= &new_stmt_da;
- thd->warning_info= &new_warning_info;
+ thd->set_stmt_da(&new_stmt_da);
#ifndef EMBEDDED_LIBRARY
param->set_longdata(packet, (ulong) (packet_end - packet));
#else
param->set_longdata(thd->extra_data, thd->extra_length);
#endif
- if (thd->stmt_da->is_error())
+ if (thd->get_stmt_da()->is_error())
{
stmt->state= Query_arena::STMT_ERROR;
- stmt->last_errno= thd->stmt_da->sql_errno();
- strncpy(stmt->last_error, thd->stmt_da->message(), MYSQL_ERRMSG_SIZE);
+ stmt->last_errno= thd->get_stmt_da()->sql_errno();
+ strncpy(stmt->last_error, thd->get_stmt_da()->message(), MYSQL_ERRMSG_SIZE);
}
- thd->stmt_da= save_stmt_da;
- thd->warning_info= save_warning_info;
+ thd->set_stmt_da(save_stmt_da);
general_log_print(thd, thd->get_command(), NullS);