#At file:///mnt/raid/alik/MySQL/bzr/wl4264/6.0-alik-wl4264.1/
2746 Alexander Nozdrin 2008-11-18
Prerequisite patch for WL#4264: make THD::warning_info a pointer,
so that warnings can be easily stored in other place.
modified:
sql/backup/kernel.cc
sql/event_scheduler.cc
sql/field.cc
sql/ha_ndbcluster_binlog.cc
sql/log_event.cc
sql/protocol.cc
sql/set_var.cc
sql/slave.cc
sql/sp.cc
sql/sql_base.cc
sql/sql_class.cc
sql/sql_class.h
sql/sql_error.cc
sql/sql_insert.cc
sql/sql_load.cc
sql/sql_parse.cc
sql/sql_prepare.cc
sql/sql_select.cc
sql/sql_show.cc
sql/sql_table.cc
sql/sql_update.cc
sql/time.cc
=== modified file 'sql/backup/kernel.cc'
--- a/sql/backup/kernel.cc 2008-11-14 20:45:00 +0000
+++ b/sql/backup/kernel.cc 2008-11-18 10:00:45 +0000
@@ -490,7 +490,7 @@ int Backup_restore_ctx::prepare(String *
// Prepare error reporting context.
- m_thd->warning_info.opt_clear_warning_info(m_thd->query_id); // Never errors
+ m_thd->warning_info->opt_clear_warning_info(m_thd->query_id); // Never errors
m_thd->no_warnings_for_error= FALSE;
save_errors(); // Never errors
=== modified file 'sql/event_scheduler.cc'
--- a/sql/event_scheduler.cc 2008-11-14 20:45:00 +0000
+++ b/sql/event_scheduler.cc 2008-11-18 10:00:45 +0000
@@ -74,7 +74,7 @@ Event_worker_thread::print_warnings(THD
{
MYSQL_ERROR *err;
DBUG_ENTER("evex_print_warnings");
- if (thd->warning_info.is_empty())
+ if (thd->warning_info->is_empty())
DBUG_VOID_RETURN;
char msg_buf[10 * STRING_BUFFER_USUAL_SIZE];
@@ -90,7 +90,7 @@ Event_worker_thread::print_warnings(THD
prefix.append(et->name.str, et->name.length, system_charset_info);
prefix.append("] ", 2);
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
while ((err= it++))
{
String err_msg(msg_buf, sizeof(msg_buf), system_charset_info);
=== modified file 'sql/field.cc'
--- a/sql/field.cc 2008-11-14 20:45:00 +0000
+++ b/sql/field.cc 2008-11-18 10:00:45 +0000
@@ -1116,7 +1116,7 @@ int Field_num::check_int(CHARSET_INFO *c
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"integer", tmp.c_ptr(), field_name,
- table->in_use->warning_info.current_row_for_warning());
+ table->in_use->warning_info->current_row_for_warning());
return 1;
}
/* Test if we have garbage at the end of the given string. */
@@ -2599,7 +2599,7 @@ int Field_new_decimal::store(const char
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"decimal", from_as_str.c_ptr(), field_name,
- table->in_use->warning_info.current_row_for_warning());
+ table->in_use->warning_info->current_row_for_warning());
DBUG_RETURN(err);
}
@@ -2622,7 +2622,7 @@ int Field_new_decimal::store(const char
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"decimal", from_as_str.c_ptr(), field_name,
- table->in_use->warning_info.current_row_for_warning());
+ table->in_use->warning_info->current_row_for_warning());
my_decimal_set_zero(&decimal_value);
break;
@@ -5168,7 +5168,7 @@ bool Field_time::get_date(MYSQL_TIME *lt
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DATA_OUT_OF_RANGE,
ER(ER_WARN_DATA_OUT_OF_RANGE), field_name,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
return 1;
}
tmp=(long) sint3korr(ptr);
@@ -6204,7 +6204,7 @@ check_string_copy_error(Field_str *field
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", tmp, field->field_name,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
return TRUE;
}
@@ -10108,7 +10108,7 @@ Field::set_warning(MYSQL_ERROR::enum_war
{
thd->cuted_fields+= cuted_increment;
push_warning_printf(thd, level, code, ER(code), field_name,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
return 0;
}
return level >= MYSQL_ERROR::WARN_LEVEL_WARN;
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2008-11-14 20:45:00 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2008-11-18 10:00:45 +0000
@@ -1899,7 +1899,7 @@ ndb_binlog_thread_handle_schema_event(TH
"my_errno: %d",
schema->db, schema->name, schema->query,
schema->node_id, my_errno);
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
while ((err= it++))
sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
@@ -2259,7 +2259,7 @@ ndb_binlog_thread_handle_schema_event_po
"binlog schema event '%s' from node %d. my_errno: %d",
schema->db, schema->name, schema->query,
schema->node_id, my_errno);
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
while ((err= it++))
sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
@@ -2438,7 +2438,7 @@ ndb_binlog_thread_handle_schema_event_po
"binlog schema event '%s' from node %d. my_errno: %d",
schema->db, schema->name, schema->query,
schema->node_id, my_errno);
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
while ((err= it++))
sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2008-11-14 20:45:00 +0000
+++ b/sql/log_event.cc 2008-11-18 10:00:45 +0000
@@ -133,7 +133,7 @@ static void inline slave_rows_error_repo
char buff[MAX_SLAVE_ERRMSG], *slider;
const char *buff_end= buff + sizeof(buff);
uint len;
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
buff[0]= 0;
@@ -4369,7 +4369,7 @@ int Load_log_event::do_apply_event(NET*
pthread_mutex_lock(&LOCK_thread_count);
thd->query_id = next_query_id();
pthread_mutex_unlock(&LOCK_thread_count);
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
TABLE_LIST tables;
bzero((char*) &tables,sizeof(tables));
=== modified file 'sql/protocol.cc'
--- a/sql/protocol.cc 2008-11-14 20:45:00 +0000
+++ b/sql/protocol.cc 2008-11-18 10:00:45 +0000
@@ -702,7 +702,7 @@ bool Protocol::send_result_set_metadata(
Send no warning information, as it will be sent at statement end.
*/
write_eof_packet(thd, &thd->net, thd->server_status,
- thd->warning_info.statement_warn_count());
+ thd->warning_info->statement_warn_count());
}
DBUG_RETURN(prepare_for_send(list->elements));
=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc 2008-11-14 20:45:00 +0000
+++ b/sql/set_var.cc 2008-11-18 10:00:45 +0000
@@ -3434,14 +3434,14 @@ static int check_pseudo_thread_id(THD *t
static uchar *get_warning_count(THD *thd)
{
- thd->sys_var_tmp.long_value= thd->warning_info.warn_count();
+ thd->sys_var_tmp.long_value= thd->warning_info->warn_count();
return (uchar*) &thd->sys_var_tmp.long_value;
}
static uchar *get_error_count(THD *thd)
{
- thd->sys_var_tmp.long_value= thd->warning_info.error_count();
+ thd->sys_var_tmp.long_value= thd->warning_info->error_count();
return (uchar*) &thd->sys_var_tmp.long_value;
}
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2008-11-14 20:45:00 +0000
+++ b/sql/slave.cc 2008-11-18 10:00:45 +0000
@@ -1670,7 +1670,7 @@ static int has_temporary_error(THD *thd)
/*
currently temporary error set in ndbcluster
*/
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
while ((err= it++))
{
@@ -2610,7 +2610,7 @@ Slave SQL thread aborted. Can't execute
}
/* Print any warnings issued */
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
/*
Added controlled slave thread cancel for replication
=== modified file 'sql/sp.cc'
--- a/sql/sp.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sp.cc 2008-11-18 10:00:45 +0000
@@ -1329,7 +1329,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *
&thd->sp_proc_cache, FALSE) != NULL ||
sp_find_routine(thd, TYPE_ENUM_FUNCTION, name,
&thd->sp_func_cache, FALSE) != NULL;
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
if (sp_object_found)
{
if (any)
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_base.cc 2008-11-18 10:00:45 +0000
@@ -602,7 +602,7 @@ static TABLE_SHARE
DBUG_RETURN(0);
}
/* Table existed in engine. Let's open it */
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
thd->clear_error(); // Clear error message
DBUG_RETURN(get_table_share(thd, table_list, key, key_length,
db_flags, error));
@@ -3483,7 +3483,7 @@ recover_from_failed_open_table_attempt(T
ha_create_table_from_engine(thd, table->db, table->table_name);
pthread_mutex_unlock(&LOCK_open);
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
thd->clear_error(); // Clear error message
mdl_release_lock(&thd->mdl_context, table->mdl_lock_data);
mdl_remove_lock(&thd->mdl_context, table->mdl_lock_data);
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_class.cc 2008-11-18 10:00:45 +0000
@@ -304,7 +304,7 @@ int thd_tx_isolation(const THD *thd)
extern "C"
void thd_inc_row_count(THD *thd)
{
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
}
@@ -436,7 +436,7 @@ Diagnostics_area::set_ok_status(THD *thd
return;
m_server_status= thd->server_status;
- m_statement_warn_count= thd->warning_info.statement_warn_count();
+ m_statement_warn_count= thd->warning_info->statement_warn_count();
m_affected_rows= affected_rows_arg;
m_last_insert_id= last_insert_id_arg;
if (message_arg)
@@ -472,7 +472,7 @@ Diagnostics_area::set_eof_status(THD *th
anyway.
*/
m_statement_warn_count= (thd->spcont ?
- 0 : thd->warning_info.statement_warn_count());
+ 0 : thd->warning_info->statement_warn_count());
m_status= DA_EOF;
DBUG_VOID_RETURN;
@@ -592,7 +592,8 @@ THD::THD()
first_successful_insert_id_in_prev_stmt_for_binlog(0),
first_successful_insert_id_in_cur_stmt(0),
stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE),
- warning_info(0),
+ main_warning_info(0),
+ warning_info(&main_warning_info),
global_read_lock(0),
is_fatal_error(0),
transaction_rollback_request(0),
=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h 2008-11-14 20:45:00 +0000
+++ b/sql/sql_class.h 2008-11-18 10:00:45 +0000
@@ -1904,7 +1904,8 @@ public:
table_map used_tables;
USER_CONN *user_connect;
CHARSET_INFO *db_charset;
- Warning_info warning_info;
+ Warning_info main_warning_info;
+ Warning_info *warning_info;
Diagnostics_area main_da;
#if defined(ENABLED_PROFILING)
PROFILING profiling;
=== modified file 'sql/sql_error.cc'
--- a/sql/sql_error.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_error.cc 2008-11-18 10:00:45 +0000
@@ -77,7 +77,7 @@ void push_warning(THD *thd, MYSQL_ERROR:
DBUG_VOID_RETURN;
if (! thd->spcont)
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
thd->got_warning= 1;
@@ -111,7 +111,7 @@ void push_warning(THD *thd, MYSQL_ERROR:
}
query_cache_abort(&thd->query_cache_tls);
- thd->warning_info.push_warning(thd, level, code, msg);
+ thd->warning_info->push_warning(thd, level, code, msg);
DBUG_VOID_RETURN;
}
@@ -191,7 +191,7 @@ bool mysqld_show_warnings(THD *thd, ulon
unit->set_limit(sel);
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
while ((err= it++))
{
/* Skip levels that the user is not interested in */
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_insert.cc 2008-11-18 10:00:45 +0000
@@ -835,7 +835,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
error=write_record(thd, table ,&info);
if (error)
break;
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
}
free_underlaid_joins(thd, &thd->lex->select_lex);
=== modified file 'sql/sql_load.cc'
--- a/sql/sql_load.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_load.cc 2008-11-18 10:00:45 +0000
@@ -645,7 +645,7 @@ read_fixed_length(THD *thd, COPY_INFO &i
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_FEW_RECORDS,
ER(ER_WARN_TOO_FEW_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP)
((Field_timestamp*) field)->set_time();
}
@@ -669,7 +669,7 @@ read_fixed_length(THD *thd, COPY_INFO &i
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_MANY_RECORDS,
ER(ER_WARN_TOO_MANY_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
}
if (thd->killed ||
@@ -705,9 +705,9 @@ read_fixed_length(THD *thd, COPY_INFO &i
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_MANY_RECORDS,
ER(ER_WARN_TOO_MANY_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
}
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
continue_loop:;
}
DBUG_RETURN(test(read_info.error));
@@ -771,7 +771,7 @@ read_sep_field(THD *thd, COPY_INFO &info
if (field->reset())
{
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
DBUG_RETURN(1);
}
field->set_null();
@@ -839,7 +839,7 @@ read_sep_field(THD *thd, COPY_INFO &info
if (field->reset())
{
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
DBUG_RETURN(1);
}
if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP)
@@ -854,7 +854,7 @@ read_sep_field(THD *thd, COPY_INFO &info
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_FEW_RECORDS,
ER(ER_WARN_TOO_FEW_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
}
else if (item->type() == Item::STRING_ITEM)
{
@@ -900,11 +900,11 @@ read_sep_field(THD *thd, COPY_INFO &info
thd->cuted_fields++; /* To long row */
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
if (thd->killed)
DBUG_RETURN(1);
}
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
continue_loop:;
}
DBUG_RETURN(test(read_info.error));
@@ -1038,7 +1038,7 @@ read_xml_field(THD *thd, COPY_INFO &info
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_TOO_FEW_RECORDS,
ER(ER_WARN_TOO_FEW_RECORDS),
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
}
else
((Item_user_var_as_out_param *)item)->set_null_value(cs);
@@ -1069,7 +1069,7 @@ read_xml_field(THD *thd, COPY_INFO &info
its default value at the beginning of each loop iteration.
*/
thd->transaction.stmt.modified_non_trans_table= no_trans_update_stmt;
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
continue_loop:;
}
DBUG_RETURN(test(read_info.error));
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_parse.cc 2008-11-18 10:00:45 +0000
@@ -1412,7 +1412,7 @@ bool dispatch_command(enum enum_server_c
0,0,0,0,
thd->query,thd->query_length,
thd->variables.character_set_client,
- thd->warning_info.current_row_for_warning());
+ thd->warning_info->current_row_for_warning());
}
log_slow_statement(thd);
@@ -1851,7 +1851,7 @@ mysql_execute_command(THD *thd)
Don't reset warnings when executing a stored routine.
*/
if ((all_tables || !lex->is_single_level_stmt()) && !thd->spcont)
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
#ifdef HAVE_REPLICATION
if (unlikely(thd->slave_thread))
@@ -4156,7 +4156,7 @@ create_sp_error:
else
sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
&thd->sp_func_cache, FALSE);
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
if (! sp)
{
if (lex->spname->m_db.str)
@@ -4276,7 +4276,7 @@ create_sp_error:
}
sp_result= sp_routine_exists_in_table(thd, type, lex->spname);
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
if (sp_result == SP_OK)
{
char *db= lex->spname->m_db.str;
@@ -5367,7 +5367,7 @@ void mysql_reset_thd_for_next_command(TH
}
thd->clear_error();
thd->main_da.reset_diagnostics_area();
- thd->warning_info.reset_for_next_command();
+ thd->warning_info->reset_for_next_command();
thd->rand_used= 0;
thd->sent_row_count= thd->examined_row_count= 0;
thd->thd_marker.emb_on_expr_nest= NULL;
=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_prepare.cc 2008-11-18 10:00:45 +0000
@@ -248,7 +248,7 @@ static bool send_prep_stmt(Prepared_stat
int2store(buff+5, columns);
int2store(buff+7, stmt->param_count);
buff[9]= 0; // Guard against a 4.1 client
- tmp= min(stmt->thd->warning_info.statement_warn_count(), 65535);
+ tmp= min(stmt->thd->warning_info->statement_warn_count(), 65535);
int2store(buff+10, tmp);
/*
@@ -1839,7 +1839,7 @@ static bool check_prepared_statement(Pre
/* Reset warning count for each query that uses tables */
if ((tables || !lex->is_single_level_stmt()) && !thd->spcont)
- thd->warning_info.opt_clear_warning_info(thd->query_id);
+ thd->warning_info->opt_clear_warning_info(thd->query_id);
switch (sql_command) {
case SQLCOM_REPLACE:
@@ -3298,7 +3298,7 @@ Prepared_statement::reprepare()
Sic: we can't simply silence warnings during reprepare, because if
it's failed, we need to return all the warnings to the user.
*/
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
}
return error;
}
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_select.cc 2008-11-18 10:00:45 +0000
@@ -13717,7 +13717,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab
/* Set first_unmatched for the last inner table of this group */
join_tab->last_inner->first_unmatched= join_tab;
}
- join->thd->warning_info.reset_current_row_for_warning();
+ join->thd->warning_info->reset_current_row_for_warning();
error= (*join_tab->read_first_record)(join_tab);
rc= evaluate_join_record(join, join_tab, error);
@@ -13969,7 +13969,7 @@ evaluate_join_record(JOIN *join, JOIN_TA
enum enum_nested_loop_state rc;
/* A match from join_tab is found for the current partial join. */
rc= (*join_tab->next_select)(join, join_tab+1, 0);
- join->thd->warning_info.inc_current_row_for_warning();
+ join->thd->warning_info->inc_current_row_for_warning();
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
return rc;
if (return_tab < join->return_tab)
@@ -13987,7 +13987,7 @@ evaluate_join_record(JOIN *join, JOIN_TA
}
else
{
- join->thd->warning_info.inc_current_row_for_warning();
+ join->thd->warning_info->inc_current_row_for_warning();
join_tab->read_record.file->unlock_row();
}
}
@@ -13998,7 +13998,7 @@ evaluate_join_record(JOIN *join, JOIN_TA
with the beginning coinciding with the current partial join.
*/
join->examined_rows++;
- join->thd->warning_info.inc_current_row_for_warning();
+ join->thd->warning_info->inc_current_row_for_warning();
join_tab->read_record.file->unlock_row();
}
return NESTED_LOOP_OK;
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_show.cc 2008-11-18 10:00:45 +0000
@@ -516,7 +516,7 @@ mysqld_show_create(THD *thd, TABLE_LIST
issue a warning with 'warning' level status in
case of invalid view and last error is ER_VIEW_INVALID
*/
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
thd->clear_error();
push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_table.cc 2008-11-18 10:00:45 +0000
@@ -4289,7 +4289,7 @@ static bool mysql_admin_table(THD* thd,
if (!table->table)
{
DBUG_PRINT("admin", ("open table failed"));
- if (thd->warning_info.is_empty())
+ if (thd->warning_info->is_empty())
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_CHECK_NO_SUCH_TABLE, ER(ER_CHECK_NO_SUCH_TABLE));
/* if it was a view will check md5 sum */
@@ -4397,7 +4397,7 @@ send_result:
lex->cleanup_after_one_table_open();
thd->clear_error(); // these errors shouldn't get client
{
- List_iterator_fast<MYSQL_ERROR> it(thd->warning_info.warn_list());
+ List_iterator_fast<MYSQL_ERROR> it(thd->warning_info->warn_list());
MYSQL_ERROR *err;
while ((err= it++))
{
@@ -4411,7 +4411,7 @@ send_result:
if (protocol->write())
goto err;
}
- thd->warning_info.clear_warning_info(thd->query_id);
+ thd->warning_info->clear_warning_info(thd->query_id);
}
protocol->prepare_for_resend();
protocol->store(table_name, system_charset_info);
@@ -7237,7 +7237,7 @@ err:
Report error here.
*/
if (alter_info->error_if_not_empty &&
- thd->warning_info.current_row_for_warning())
+ thd->warning_info->current_row_for_warning())
{
const char *f_val= 0;
enum enum_mysql_timestamp_type t_type= MYSQL_TIMESTAMP_DATE;
@@ -7409,7 +7409,7 @@ copy_data_between_tables(TABLE *from,TAB
errpos= 4;
if (ignore)
to->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
- thd->warning_info.reset_current_row_for_warning();
+ thd->warning_info->reset_current_row_for_warning();
restore_record(to, s->default_values); // Create empty record
while (!(error=info.read_record(&info)))
{
@@ -7468,7 +7468,7 @@ copy_data_between_tables(TABLE *from,TAB
}
else
found_count++;
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
}
err:
=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc 2008-11-14 20:45:00 +0000
+++ b/sql/sql_update.cc 2008-11-18 10:00:45 +0000
@@ -727,7 +727,7 @@ int mysql_update(THD *thd,
}
else
table->file->unlock_row();
- thd->warning_info.inc_current_row_for_warning();
+ thd->warning_info->inc_current_row_for_warning();
}
dup_key_found= 0;
/*
=== modified file 'sql/time.cc'
--- a/sql/time.cc 2008-11-14 20:45:00 +0000
+++ b/sql/time.cc 2008-11-18 10:00:45 +0000
@@ -748,7 +748,7 @@ void make_truncated_value_warning(THD *t
cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
type_str, str.c_ptr(), field_name,
- (ulong) thd->warning_info.current_row_for_warning());
+ (ulong) thd->warning_info->current_row_for_warning());
else
{
if (time_type > MYSQL_TIMESTAMP_ERROR)