summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-10-30 20:10:11 +0300
committerunknown <kostja@bodhi.(none)>2007-10-30 20:10:11 +0300
commit1430f4ded275728ed747ebe48005c01b40cd3bab (patch)
treec2548e816a592f05bae2fef620d54c08c61982e6 /sql
parentd4d4ba9a9f49a6abc9cd00924e1e33bfd2278b87 (diff)
parent2437001234eba37ad821be11052e57f04293d5bd (diff)
downloadmariadb-git-1430f4ded275728ed747ebe48005c01b40cd3bab.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2 sql/sql_connect.cc: Manual merge.
Diffstat (limited to 'sql')
-rw-r--r--sql/filesort.cc4
-rw-r--r--sql/ha_ndbcluster_binlog.cc2
-rw-r--r--sql/item_func.cc4
-rw-r--r--sql/item_subselect.cc2
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/sp.cc2
-rw-r--r--sql/sp_head.cc6
-rw-r--r--sql/sql_base.cc10
-rw-r--r--sql/sql_class.cc4
-rw-r--r--sql/sql_class.h16
-rw-r--r--sql/sql_connect.cc4
-rw-r--r--sql/sql_delete.cc8
-rw-r--r--sql/sql_insert.cc12
-rw-r--r--sql/sql_parse.cc22
-rw-r--r--sql/sql_prepare.cc2
-rw-r--r--sql/sql_select.cc30
-rw-r--r--sql/sql_union.cc2
-rw-r--r--sql/sql_update.cc6
-rw-r--r--sql/sql_view.cc6
-rw-r--r--sql/sql_yacc.yy4
20 files changed, 81 insertions, 67 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index c074f90e780..2e6f0ecaf05 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -555,7 +555,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
else
file->unlock_row();
/* It does not make sense to read more keys in case of a fatal error */
- if (thd->net.report_error)
+ if (thd->is_error())
break;
}
if (quick_select)
@@ -573,7 +573,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
file->ha_rnd_end();
}
- if (thd->net.report_error)
+ if (thd->is_error())
DBUG_RETURN(HA_POS_ERROR);
/* Signal we should use orignal column read and write maps */
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index c22d5ac53f5..fc35a7a930e 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -271,7 +271,7 @@ static void run_query(THD *thd, char *buf, char *end,
sql_print_error("NDB: %s: error %s %d(ndb: %d) %d %d",
buf, thd->net.last_error, thd->net.last_errno,
thd_ndb->m_error_code,
- thd->net.report_error, thd->is_slave_error);
+ (int) thd->is_error(), thd->is_slave_error);
}
thd->options= save_thd_options;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 64574a9ad74..2d4d61de61b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -187,7 +187,7 @@ Item_func::fix_fields(THD *thd, Item **ref)
}
}
fix_length_and_dec();
- if (thd->net.report_error) // An error inside fix_length_and_dec occured
+ if (thd->is_error()) // An error inside fix_length_and_dec occured
return TRUE;
fixed= 1;
return FALSE;
@@ -4073,7 +4073,7 @@ my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val)
NOTES
For now it always return OK. All problem with value evaluating
- will be caught by thd->net.report_error check in sql_set_variables().
+ will be caught by thd->is_error() check in sql_set_variables().
RETURN
FALSE OK.
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 843c6ced263..8eb7421f854 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -248,7 +248,7 @@ bool Item_subselect::exec()
{
int res;
- if (thd->net.report_error)
+ if (thd->is_error())
/* Do not execute subselect in case of a fatal error */
return 1;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 138c71fa559..11874b1020c 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -3051,7 +3051,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list)
if ((error= var->check(thd)))
goto err;
}
- if (!(error= test(thd->net.report_error)))
+ if (!(error= test(thd->is_error())))
{
it.rewind();
while ((var= it++))
diff --git a/sql/sp.cc b/sql/sp.cc
index 1b5d8ca87b8..b4f0ec7729b 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1866,7 +1866,7 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
an error with it's return value without calling my_error(), we
set the generic "mysql.proc table corrupt" error here.
*/
- if (!thd->net.report_error)
+ if (! thd->is_error())
{
/*
SP allows full NAME_LEN chars thus he have to allocate enough
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index f7ab9bac3b1..6e8749aa745 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -370,7 +370,7 @@ sp_eval_expr(THD *thd, Field *result_field, Item **expr_item_ptr)
thd->abort_on_warning= save_abort_on_warning;
thd->transaction.stmt.modified_non_trans_table= save_stmt_modified_non_trans_table;
- if (thd->net.report_error)
+ if (thd->is_error())
{
/* Return error status if something went wrong. */
err_status= TRUE;
@@ -1277,7 +1277,7 @@ sp_head::execute(THD *thd)
done:
DBUG_PRINT("info", ("err_status: %d killed: %d is_slave_error: %d report_error: %d",
err_status, thd->killed, thd->is_slave_error,
- thd->net.report_error));
+ thd->is_error()));
if (thd->killed)
err_status= TRUE;
@@ -2673,7 +2673,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
cleanup_items() is called in sp_head::execute()
*/
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 10e6716cadf..223485f1e42 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -6260,7 +6260,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
thd->lex->allow_sum_func= save_allow_sum_func;
thd->mark_used_columns= save_mark_used_columns;
DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns));
- DBUG_RETURN(test(thd->net.report_error));
+ DBUG_RETURN(test(thd->is_error()));
}
@@ -6804,7 +6804,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
select_lex->conds_processed_with_permanent_arena= 1;
}
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
- DBUG_RETURN(test(thd->net.report_error));
+ DBUG_RETURN(test(thd->is_error()));
err_no_arena:
select_lex->is_item_list_lookup= save_is_item_list_lookup;
@@ -6886,7 +6886,7 @@ fill_record(THD * thd, List<Item> &fields, List<Item> &values,
goto err;
}
}
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
err:
if (table)
table->auto_increment_field_not_null= FALSE;
@@ -6971,7 +6971,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
table= (*ptr)->table;
table->auto_increment_field_not_null= FALSE;
}
- while ((field = *ptr++) && !thd->net.report_error)
+ while ((field = *ptr++) && ! thd->is_error())
{
value=v++;
table= field->table;
@@ -6980,7 +6980,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
if (value->save_in_field(field, 0) < 0)
goto err;
}
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
err:
if (table)
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d77e531ec13..707c8e83007 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1368,7 +1368,7 @@ bool select_send::send_data(List<Item> &items)
thd->sent_row_count++;
if (!thd->vio_ok())
DBUG_RETURN(0);
- if (!thd->net.report_error)
+ if (! thd->is_error())
DBUG_RETURN(protocol->write());
protocol->remove_last_row();
DBUG_RETURN(1);
@@ -1389,7 +1389,7 @@ bool select_send::send_eof()
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (!thd->net.report_error)
+ if (! thd->is_error())
{
::send_eof(thd);
status= 0;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index a7f196cd825..a3e71e183f3 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1468,7 +1468,7 @@ public:
bool in_lock_tables;
/**
True if a slave error. Causes the slave to stop. Not the same
- as the statement execution error (net.report_error), since
+ 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.
*/
@@ -1716,6 +1716,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();
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index c4367b2a8fb..8a817e5993a 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -975,12 +975,12 @@ void end_connection(THD *thd)
decrease_user_connections(thd->user_connect);
if (thd->killed ||
- net->error && net->vio != 0 && net->report_error)
+ net->error && net->vio != 0 && thd->is_error())
{
statistic_increment(aborted_threads,&LOCK_status);
}
- if (net->error && net->vio != 0 && net->report_error)
+ if (net->error && net->vio != 0 && thd->is_error())
{
if (!thd->killed && thd->variables.log_warnings > 1)
{
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 4c57fad8d87..219dc90429b 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -252,10 +252,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table->mark_columns_needed_for_delete();
while (!(error=info.read_record(&info)) && !thd->killed &&
- !thd->net.report_error)
+ ! thd->is_error())
{
- // thd->net.report_error is tested to disallow delete row on error
- if (!(select && select->skip_record())&& !thd->net.report_error )
+ // thd->is_error() is tested to disallow delete row on error
+ if (!(select && select->skip_record())&& ! thd->is_error() )
{
if (table->triggers &&
@@ -389,7 +389,7 @@ cleanup:
send_ok(thd, (ha_rows) thd->row_count_func);
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
- DBUG_RETURN(error >= 0 || thd->net.report_error);
+ DBUG_RETURN(error >= 0 || thd->is_error());
}
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index e868afede51..077141c4d7a 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -738,7 +738,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table->triggers,
TRG_EVENT_INSERT))
{
- if (values_list.elements != 1 && !thd->net.report_error)
+ if (values_list.elements != 1 && ! thd->is_error())
{
info.records++;
continue;
@@ -769,7 +769,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table->triggers,
TRG_EVENT_INSERT))
{
- if (values_list.elements != 1 && ! thd->net.report_error)
+ if (values_list.elements != 1 && ! thd->is_error())
{
info.records++;
continue;
@@ -1909,7 +1909,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
thd->proc_info="got old table";
if (di->thd.killed)
{
- if (di->thd.net.report_error)
+ if (di->thd.is_error())
{
/*
Copy the error message. Note that we don't treat fatal
@@ -1940,7 +1940,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
pthread_mutex_unlock(&di->mutex);
if (table_list->table)
{
- DBUG_ASSERT(thd->net.report_error == 0);
+ DBUG_ASSERT(! thd->is_error());
thd->di= di;
}
/* Unlock the delayed insert object after its last access. */
@@ -1949,7 +1949,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
end_create:
pthread_mutex_unlock(&LOCK_delayed_create);
- DBUG_RETURN(thd->net.report_error);
+ DBUG_RETURN(thd->is_error());
}
@@ -3015,7 +3015,7 @@ bool select_insert::send_data(List<Item> &values)
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
store_values(values);
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
- if (thd->net.report_error)
+ if (thd->is_error())
DBUG_RETURN(1);
if (table_list) // Not CREATE ... SELECT
{
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index e6d953bcbe1..ac042960388 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -436,7 +436,7 @@ pthread_handler_t handle_bootstrap(void *arg)
if (thd->is_fatal_error)
break;
- if (thd->net.report_error)
+ if (thd->is_error())
{
/* The query failed, send error to log and abort bootstrap */
net_send_error(thd);
@@ -990,7 +990,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
mysql_parse(thd, thd->query, thd->query_length, & found_semicolon);
- while (!thd->killed && found_semicolon && !thd->net.report_error)
+ while (!thd->killed && found_semicolon && ! thd->is_error())
{
char *next_packet= (char*) found_semicolon;
net->no_send_error= 0;
@@ -1355,9 +1355,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->transaction.xid_state.xid.null();
/* report error issued during command execution */
- if (thd->killed_errno() && !thd->net.report_error)
+ if (thd->killed_errno() && ! thd->is_error())
thd->send_kill_message();
- if (thd->net.report_error)
+ if (thd->is_error())
net_send_error(thd);
log_slow_statement(thd);
@@ -3930,7 +3930,7 @@ create_sp_error:
thd->row_count_func));
else
{
- DBUG_ASSERT(thd->net.report_error == 1 || thd->killed);
+ DBUG_ASSERT(thd->is_error() || thd->killed);
goto error; // Substatement should already have sent error
}
}
@@ -4523,7 +4523,7 @@ finish:
*/
start_waiting_global_read_lock(thd);
}
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -5467,7 +5467,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
else
#endif
{
- if (! thd->net.report_error)
+ if (! thd->is_error())
{
/*
Binlog logs a string starting from thd->query and having length
@@ -5491,7 +5491,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
}
else
{
- DBUG_ASSERT(thd->net.report_error);
+ DBUG_ASSERT(thd->is_error());
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
thd->is_fatal_error));
@@ -6311,7 +6311,7 @@ void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields,
RETURN
0 ok
- !=0 error. thd->killed or thd->net.report_error is set
+ !=0 error. thd->killed or thd->is_error() is set
*/
bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
@@ -7274,10 +7274,10 @@ bool parse_sql(THD *thd,
bool mysql_parse_status= MYSQLparse(thd) != 0;
- /* Check that if MYSQLparse() failed, thd->net.report_error is set. */
+ /* Check that if MYSQLparse() failed, thd->is_error() is set. */
DBUG_ASSERT(!mysql_parse_status ||
- mysql_parse_status && thd->net.report_error);
+ mysql_parse_status && thd->is_error());
/* Reset Lex_input_stream. */
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index a6cdcf14881..b1b1502f015 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2864,7 +2864,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
lex_start(thd);
error= parse_sql(thd, &lip, NULL) ||
- thd->net.report_error ||
+ thd->is_error() ||
init_param_array(this);
lex->set_trg_event_type_for_tables();
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index fd0ce630a01..ef1151d82f3 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -263,8 +263,8 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
result, unit, select_lex);
}
DBUG_PRINT("info",("res: %d report_error: %d", res,
- thd->net.report_error));
- res|= thd->net.report_error;
+ thd->is_error()));
+ res|= thd->is_error();
if (unlikely(res))
result->abort();
@@ -491,7 +491,7 @@ JOIN::prepare(Item ***rref_pointer_array,
(having->fix_fields(thd, &having) ||
having->check_cols(1)));
select_lex->having_fix_field= 0;
- if (having_fix_rc || thd->net.report_error)
+ if (having_fix_rc || thd->is_error())
DBUG_RETURN(-1); /* purecov: inspected */
thd->lex->allow_sum_func= save_allow_sum_func;
}
@@ -817,7 +817,7 @@ JOIN::optimize()
}
conds= optimize_cond(this, conds, join_list, &cond_value);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from optimize_cond"));
@@ -826,7 +826,7 @@ JOIN::optimize()
{
having= optimize_cond(this, having, join_list, &having_value);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from optimize_cond"));
@@ -1031,7 +1031,7 @@ JOIN::optimize()
{
ORDER *org_order= order;
order=remove_const(this, order,conds,1, &simple_order);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -1162,7 +1162,7 @@ JOIN::optimize()
group_list= remove_const(this, (old_group_list= group_list), conds,
rollup.state == ROLLUP::STATE_NONE,
&simple_group);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -1185,7 +1185,7 @@ JOIN::optimize()
{
group_list= procedure->group= remove_const(this, procedure->group, conds,
1, &simple_group);
- if (thd->net.report_error)
+ if (thd->is_error())
{
error= 1;
DBUG_PRINT("error",("Error from remove_const"));
@@ -2098,10 +2098,10 @@ JOIN::exec()
}
}
}
- /* XXX: When can we have here thd->net.report_error not zero? */
- if (thd->net.report_error)
+ /* XXX: When can we have here thd->is_error() not zero? */
+ if (thd->is_error())
{
- error= thd->net.report_error;
+ error= thd->is_error();
DBUG_VOID_RETURN;
}
curr_join->having= curr_join->tmp_having;
@@ -2307,7 +2307,7 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
join->having_history= (join->having?join->having:join->tmp_having);
}
- if (thd->net.report_error)
+ if (thd->is_error())
goto err;
join->exec();
@@ -2333,7 +2333,7 @@ err:
{
thd->proc_info="end";
err|= select_lex->cleanup();
- DBUG_RETURN(err || thd->net.report_error);
+ DBUG_RETURN(err || thd->is_error());
}
DBUG_RETURN(join->error);
}
@@ -10717,7 +10717,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
DBUG_PRINT("error",("Error: do_select() failed"));
}
#endif
- DBUG_RETURN(join->thd->net.report_error ? -1 : rc);
+ DBUG_RETURN(join->thd->is_error() ? -1 : rc);
}
@@ -16050,7 +16050,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
first->options | thd->options | SELECT_DESCRIBE,
result, unit, first);
}
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 5da4b97cc5d..a48cff82715 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -58,7 +58,7 @@ bool select_union::send_data(List<Item> &values)
return 0;
}
fill_record(thd, table->field, values, 1);
- if (thd->net.report_error)
+ if (thd->is_error())
return 1;
if ((error= table->file->ha_write_row(table->record[0])))
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 4071bb86c90..036d7e06d0e 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -844,7 +844,7 @@ int mysql_update(THD *thd,
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
thd->abort_on_warning= 0;
- DBUG_RETURN((error >= 0 || thd->net.report_error) ? 1 : 0);
+ DBUG_RETURN((error >= 0 || thd->is_error()) ? 1 : 0);
err:
delete select;
@@ -1193,8 +1193,8 @@ bool mysql_multi_update(THD *thd,
OPTION_SETUP_TABLES_DONE,
result, unit, select_lex);
DBUG_PRINT("info",("res: %d report_error: %d", res,
- thd->net.report_error));
- res|= thd->net.report_error;
+ (int) thd->is_error()));
+ res|= thd->is_error();
if (unlikely(res))
{
/* If we had a another error reported earlier then this will be ignored */
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 6e27af63e8a..f7223cafb5e 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -607,7 +607,7 @@ err:
thd->proc_info= "end";
lex->link_first_table_back(view, link_to_local);
unit->cleanup();
- DBUG_RETURN(res || thd->net.report_error);
+ DBUG_RETURN(res || thd->is_error());
}
@@ -823,7 +823,7 @@ loop_out:
view_parameters + revision_number_position, 1,
&file_parser_dummy_hook))
{
- error= thd->net.report_error? -1 : 0;
+ error= thd->is_error() ? -1 : 0;
goto err;
}
}
@@ -886,7 +886,7 @@ loop_out:
if (sql_create_definition_file(&dir, &file, view_file_type,
(uchar*)view, view_parameters, num_view_backups))
{
- error= thd->net.report_error? -1 : 1;
+ error= thd->is_error() ? -1 : 1;
goto err;
}
DBUG_RETURN(0);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 109e8f5434f..b893014aacb 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -9804,7 +9804,7 @@ NUM_literal:
| DECIMAL_NUM
{
$$= new Item_decimal($1.str, $1.length, YYTHD->charset());
- if (YYTHD->net.report_error)
+ if (YYTHD->is_error())
{
MYSQL_YYABORT;
}
@@ -9812,7 +9812,7 @@ NUM_literal:
| FLOAT_NUM
{
$$ = new Item_float($1.str, $1.length);
- if (YYTHD->net.report_error)
+ if (YYTHD->is_error())
{
MYSQL_YYABORT;
}