diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_admin.cc | 2 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 17 |
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); |