summaryrefslogtreecommitdiff
path: root/sql/sql_error.cc
diff options
context:
space:
mode:
authorunknown <wax@kishkin.ru>2003-03-18 04:07:40 +0500
committerunknown <wax@kishkin.ru>2003-03-18 04:07:40 +0500
commit0b505fb437eedd1b31c99888247c2259539c095b (patch)
treed5655e0a1fd7bd5c629fbc934a708f44ea818663 /sql/sql_error.cc
parentc312cd45786f22f0fed89d4cb2d6bba7c6c87644 (diff)
downloadmariadb-git-0b505fb437eedd1b31c99888247c2259539c095b.tar.gz
This is full commit of group_concat with support subselects
include/mysqld_error.h: add warning sql/field.h: add friend class sql/item_sum.cc: add function sql/item_sum.h: add class sql/lex.h: add lex sql/mysql_priv.h: change push_warning sql/mysqld.cc: add new option sql/set_var.cc: add new system variable sql/share/english/errmsg.txt: add new message text sql/sql_class.h: change MY_ERROR class sql/sql_error.cc: change push_warning sql/sql_lex.h: add qorder_list for function sql/sql_yacc.yy: add structure of group_concat BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r--sql/sql_error.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index 5508be5167a..9f28d33bc50 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -79,14 +79,19 @@ void mysql_reset_errors(THD *thd)
level Severity of warning (note, warning, error ...)
code Error number
msg Clear error message
+
+ RETURN
+ pointer on MYSQL_ERROR object
*/
-void push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code,
- const char *msg)
+MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
+ uint code, const char *msg)
{
if (thd->query_id != thd->warn_id)
mysql_reset_errors(thd);
+ MYSQL_ERROR *err = NULL;
+
if (thd->warn_list.elements < thd->variables.max_error_count)
{
/*
@@ -95,13 +100,14 @@ void push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code,
*/
MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
my_pthread_setspecific_ptr(THR_MALLOC, &thd->warn_root);
- MYSQL_ERROR *err= new MYSQL_ERROR(code, level, msg);
+ err = new MYSQL_ERROR(code, level, msg);
if (err)
thd->warn_list.push_back(err);
my_pthread_setspecific_ptr(THR_MALLOC, old_root);
}
thd->warn_count[(uint) level]++;
thd->total_warn_count++;
+ return err;
}
/*