summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorkostja@vajra.(none) <>2007-04-05 15:49:46 +0400
committerkostja@vajra.(none) <>2007-04-05 15:49:46 +0400
commit701ed297d0f7c2f4c769878a9def7c2945ea3055 (patch)
treea91b4f984fd6317085b8bd7e94cd91134184aab6 /sql/sql_show.cc
parentfe6835c2b93ab6767553b427fd9259d88de67e8e (diff)
parent98db2300865004a4bb573caebc82b25fb5b08911 (diff)
downloadmariadb-git-701ed297d0f7c2f4c769878a9def7c2945ea3055.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into vajra.(none):/opt/local/work/mysql-5.1-c1
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 445890adedb..4e89fb610cc 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3761,8 +3761,7 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db,
LEX_STRING *definer_buffer)
{
CHARSET_INFO *cs= system_charset_info;
- byte *sql_mode_str;
- ulong sql_mode_len;
+ LEX_STRING sql_mode_rep;
restore_record(table, s->default_values);
table->field[1]->store(db, strlen(db), cs);
@@ -3778,11 +3777,9 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db,
table->field[14]->store(STRING_WITH_LEN("OLD"), cs);
table->field[15]->store(STRING_WITH_LEN("NEW"), cs);
- sql_mode_str=
- sys_var_thd_sql_mode::symbolic_mode_representation(thd,
- sql_mode,
- &sql_mode_len);
- table->field[17]->store((const char*)sql_mode_str, sql_mode_len, cs);
+ sys_var_thd_sql_mode::symbolic_mode_representation(thd, sql_mode,
+ &sql_mode_rep);
+ table->field[17]->store(sql_mode_rep.str, sql_mode_rep.length, cs);
table->field[18]->store((const char *)definer_buffer->str, definer_buffer->length, cs);
return schema_table_store_record(thd, table);
}
@@ -4308,13 +4305,13 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table)
CHARSET_INFO *scs= system_charset_info;
TIME time;
Event_timed et;
- DBUG_ENTER("fill_events_copy_to_schema_tab");
+ DBUG_ENTER("copy_event_to_schema_table");
restore_record(sch_table, s->default_values);
if (et.load_from_row(thd, event_table))
{
- my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0));
+ my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), event_table->alias);
DBUG_RETURN(1);
}
@@ -4349,13 +4346,11 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table)
/* SQL_MODE */
{
- byte *sql_mode_str;
- ulong sql_mode_len= 0;
- sql_mode_str=
- sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode,
- &sql_mode_len);
+ LEX_STRING sql_mode;
+ sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode,
+ &sql_mode);
sch_table->field[ISE_SQL_MODE]->
- store((const char*)sql_mode_str, sql_mode_len, scs);
+ store(sql_mode.str, sql_mode.length, scs);
}
int not_used=0;