diff options
author | unknown <serg@serg.mylan> | 2005-03-14 14:47:51 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-14 14:47:51 +0100 |
commit | 2a455886238cea391b0bba072598f40bf118df8f (patch) | |
tree | f9212bc6a4dc14f47bfce79ca07320ec3d810728 /sql/sql_error.cc | |
parent | a3df74518f0448119268fd0445a5136b9f121c6b (diff) | |
parent | 12f918835a7114f694baca4a1c4ee6d72b4d2037 (diff) | |
download | mariadb-git-2a455886238cea391b0bba072598f40bf118df8f.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
mysql-test/r/join_outer.result:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r-- | sql/sql_error.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 4d254b95514..4420f2d16ad 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -64,6 +64,7 @@ void MYSQL_ERROR::set_msg(THD *thd, const char *msg_arg) SYNOPSIS mysql_reset_errors() thd Thread handle + force Reset warnings even if it has been done before IMPLEMENTATION Don't reset warnings if this has already been called for this query. @@ -71,14 +72,15 @@ void MYSQL_ERROR::set_msg(THD *thd, const char *msg_arg) in which case push_warnings() has already called this function. */ -void mysql_reset_errors(THD *thd) +void mysql_reset_errors(THD *thd, bool force) { DBUG_ENTER("mysql_reset_errors"); - if (thd->query_id != thd->warn_id) + if (thd->query_id != thd->warn_id || force) { thd->warn_id= thd->query_id; free_root(&thd->warn_root,MYF(0)); bzero((char*) thd->warn_count, sizeof(thd->warn_count)); + if (force) thd->total_warn_count= 0; thd->warn_list.empty(); thd->row_count= 1; // by default point to row 1 } |