summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-01-15 15:42:15 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-01-15 15:42:15 +0400
commit8b36b965c57f36ea801c4e5c6a5c477781240729 (patch)
tree27e8d3afcdce37b4784bb89e2952a59cb19278d8 /sql/sql_trigger.cc
parente64d6d5a7dff4d60f81cb6bb9cfbfaac95462fd6 (diff)
downloadmariadb-git-8b36b965c57f36ea801c4e5c6a5c477781240729.tar.gz
backported:
-WL#2822 INFORMATION_SCHEMA.ROUTINES: Add missing columns -WL#2003 INFORMATION_SCHEMA: PARAMETERS view -addon for 'I_S optimization' WL
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 6f0602cedfd..ee530a74b50 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1198,12 +1198,13 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
DBUG_RETURN(1); // EOM
}
-
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_TRG_NO_CREATION_CTX,
- ER(ER_TRG_NO_CREATION_CTX),
- (const char*) db,
- (const char*) table_name);
+
+ if (!thd->no_warnings_for_error)
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRG_NO_CREATION_CTX,
+ ER(ER_TRG_NO_CREATION_CTX),
+ (const char*) db,
+ (const char*) table_name);
if (!(trg_client_cs_name= alloc_lex_string(&table->mem_root)) ||
!(trg_connection_cl_name= alloc_lex_string(&table->mem_root)) ||
@@ -1332,12 +1333,12 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
MySQL, which does not support triggers definers. We should emit
warning here.
*/
-
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_TRG_NO_DEFINER, ER(ER_TRG_NO_DEFINER),
- (const char*) db,
- (const char*) lex.sphead->m_name.str);
-
+ if (!thd->no_warnings_for_error)
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRG_NO_DEFINER, ER(ER_TRG_NO_DEFINER),
+ (const char*) db,
+ (const char*) lex.sphead->m_name.str);
+
/*
Set definer to the '' to correct displaying in the information
schema.