diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2014-04-15 20:41:08 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2014-04-15 20:41:08 +0500 |
commit | 142c20eda9d287f7f898dd8d89821f0e809dafc6 (patch) | |
tree | f308bf21bb21b9e90bd0b52e163e004d11e78d3b /mysql-test/suite | |
parent | 708ba733dade0348611269093587e30f4cd64eb7 (diff) | |
download | mariadb-git-142c20eda9d287f7f898dd8d89821f0e809dafc6.tar.gz |
MDEV-4856 SQL_ERROR_LOG shows 1146 errors which didnt appear in mysql client.
The fill_schema_table() function used to call get_table_share() for a table name in WHERE
then clear the error list. That way plugins receive the superfluous error notification if it
happens in it. Also the problem was that error handler didn't prevent the suppressed
error message from logging anyway as the logging happens in THD::raise_condition
before the handler call.
Trigger_error_handler is remade into Warnings_only_error_handler, so it stores the error
message in all cases in the thd->stmt_da.
Then later the stored error is raised.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/plugins/r/sql_error_log.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/sql_error_log.test | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result index f3e6716302b..3086b1f2d1f 100644 --- a/mysql-test/suite/plugins/r/sql_error_log.result +++ b/mysql-test/suite/plugins/r/sql_error_log.result @@ -33,6 +33,8 @@ insert into t1 values ('aa'); ERROR 22007: Incorrect integer value: 'aa' for column 'id' at row 1 SET SQL_MODE = ''; drop table t1; +SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists'; +TABLE_NAME uninstall plugin SQL_ERROR_LOG; Warnings: Warning 1620 Plugin is busy and will be uninstalled on shutdown diff --git a/mysql-test/suite/plugins/t/sql_error_log.test b/mysql-test/suite/plugins/t/sql_error_log.test index 8d04720aac3..a28e2d2e259 100644 --- a/mysql-test/suite/plugins/t/sql_error_log.test +++ b/mysql-test/suite/plugins/t/sql_error_log.test @@ -46,6 +46,8 @@ insert into t1 values ('aa'); SET SQL_MODE = ''; drop table t1; +SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists'; + uninstall plugin SQL_ERROR_LOG; let $MYSQLD_DATADIR= `SELECT @@datadir`; |