diff options
author | unknown <monty@mashka.mysql.fi> | 2002-11-21 02:07:14 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-11-21 02:07:14 +0200 |
commit | 2723dbdb5e2c60162ca464f65f68fdd13b7c9cef (patch) | |
tree | e086ef10a8fa45e7bf43bf8810311b4b931601d1 /sql/sql_error.cc | |
parent | 548e59c685ecf65823747f45e2ae422485377d7b (diff) | |
download | mariadb-git-2723dbdb5e2c60162ca464f65f68fdd13b7c9cef.tar.gz |
Automatic conversion from CHAR(length) to BLOB when length > 255
New operators MOD and DIV
SELECT ... FROM DUAL
TRUE = 1 and FALSE = 0
include/mysqld_error.h:
New warning message
mysql-test/r/func_system.result:
Added testing of new functions
mysql-test/r/func_test.result:
Added testing of new functions
mysql-test/r/type_blob.result:
Added testing of new functions
mysql-test/t/func_system.test:
Added testing of new functions
mysql-test/t/func_test.test:
Added testing of new functions
mysql-test/t/type_blob.test:
Added testing of new functions
sql/item_func.cc:
Added function DIV
sql/item_func.h:
Added function DIV
sql/lex.h:
New keywords
sql/share/czech/errmsg.txt:
New warning message
sql/share/danish/errmsg.txt:
New warning message
sql/share/dutch/errmsg.txt:
New warning message
sql/share/english/errmsg.txt:
New warning message
sql/share/estonian/errmsg.txt:
New warning message
sql/share/french/errmsg.txt:
New warning message
sql/share/german/errmsg.txt:
New warning message
sql/share/greek/errmsg.txt:
New warning message
sql/share/hungarian/errmsg.txt:
New warning message
sql/share/italian/errmsg.txt:
New warning message
sql/share/japanese/errmsg.txt:
New warning message
sql/share/korean/errmsg.txt:
New warning message
sql/share/norwegian-ny/errmsg.txt:
New warning message
sql/share/norwegian/errmsg.txt:
New warning message
sql/share/polish/errmsg.txt:
New warning message
sql/share/portuguese/errmsg.txt:
New warning message
sql/share/romanian/errmsg.txt:
New warning message
sql/share/russian/errmsg.txt:
New warning message
sql/share/serbian/errmsg.txt:
New warning message
sql/share/slovak/errmsg.txt:
New warning message
sql/share/spanish/errmsg.txt:
New warning message
sql/share/swedish/errmsg.txt:
New warning message
Translated a lot of error messages
sql/share/ukrainian/errmsg.txt:
New warning message
sql/sql_class.cc:
Added support for warnings during parsing
sql/sql_class.h:
Added support for warnings during parsing
sql/sql_error.cc:
Added support for warnings during parsing
sql/sql_lex.cc:
Fixed comment
sql/sql_parse.cc:
Added automatic conversion from CHAR(length) to BLOB when length > 255
Added support for BLOB(length)
sql/sql_yacc.yy:
New operators MOD and DIV
SELECT ... FROM DUAL
TRUE = 1 and FALSE = 0
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r-- | sql/sql_error.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 3d6a0fa24aa..0740dc428f0 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -51,13 +51,22 @@ This file contains the implementation of error and warnings related SYNOPSIS mysql_reset_errors() thd Thread handle + + IMPLEMENTATION + Don't reset warnings if this has already been called for this query. + This may happen if one gets a warning during the parsing stage, + in which case push_warnings() has already called this function. */ void mysql_reset_errors(THD *thd) { - free_root(&thd->warn_root,MYF(0)); - bzero((char*) thd->warn_count, sizeof(thd->warn_count)); - thd->warn_list.empty(); + if (thd->query_id != thd->warn_id) + { + thd->warn_id= thd->query_id; + free_root(&thd->warn_root,MYF(0)); + bzero((char*) thd->warn_count, sizeof(thd->warn_count)); + thd->warn_list.empty(); + } } @@ -75,6 +84,9 @@ void mysql_reset_errors(THD *thd) void 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); + if (thd->warn_list.elements < thd->variables.max_error_count) { /* |