summaryrefslogtreecommitdiff
path: root/sql/net_pkg.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-12-22 15:13:31 +0200
committerunknown <monty@hundin.mysql.fi>2001-12-22 15:13:31 +0200
commit9625a39ddd2d2e0eb6def99ca1ae34a48c300040 (patch)
treef8ed70ccb23812937954a6f217c183b3677d978a /sql/net_pkg.cc
parent5478a2adb7949716a04461875dc7bd4005705ee8 (diff)
downloadmariadb-git-9625a39ddd2d2e0eb6def99ca1ae34a48c300040.tar.gz
Fixed access privilege bug in query cache.
Change tests to use database 'mysqltest' instead of 'foo' Add option to not print access denied messages to check_table_access() Docs/manual.texi: Updated query cache information. client/mysqltest.c: When connection to the database '*NO-ONE*, connect without specify a database. include/raid.h: Portability fix mysql-test/r/drop.result: Change test to use database 'mysqltest' instead of 'foo' mysql-test/r/flush.result: Change test to use database 'mysqltest' instead of 'foo' mysql-test/r/innodb.result: Change test to use database 'mysqltest' instead of 'foo' mysql-test/r/query_cache.result: Change test to use database 'mysqltest' instead of 'foo' mysql-test/t/drop.test: Change test to use database 'mysqltest' instead of 'foo' mysql-test/t/flush.test: Change test to use database 'mysqltest' instead of 'foo' mysql-test/t/innodb.test: Change test to use database 'mysqltest' instead of 'foo' mysql-test/t/query_cache.test: Change test to use database 'mysqltest' instead of 'foo' sql/mysql_priv.h: Add option to not print access denied messages sql/net_pkg.cc: Fix for query cache sql/net_serv.cc: Speed improvment sql/sql_cache.cc: Fixed access privilege bug in query cache sql/sql_cache.h: Always compiled with integrity check function prototypes. sql/sql_do.cc: Removed warning sql/sql_parse.cc: Add option to not print access denied messages
Diffstat (limited to 'sql/net_pkg.cc')
-rw-r--r--sql/net_pkg.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc
index 9fb478ca664..2f26ad81bd5 100644
--- a/sql/net_pkg.cc
+++ b/sql/net_pkg.cc
@@ -30,6 +30,7 @@ void send_error(NET *net, uint sql_errno, const char *err)
err ? err : net->last_error[0] ?
net->last_error : "NULL"));
+ query_cache_abort(net);
if (thd)
thd->query_error = 1; // needed to catch query errors during replication
if (!err)
@@ -102,9 +103,9 @@ net_printf(NET *net, uint errcode, ...)
DBUG_ENTER("net_printf");
DBUG_PRINT("enter",("message: %u",errcode));
- if(thd) thd->query_error = 1;
- // if we are here, something is wrong :-)
-
+ if (thd)
+ thd->query_error = 1; // if we are here, something is wrong :-)
+ query_cache_abort(net); // Safety
va_start(args,errcode);
format=ER(errcode);
offset= net->return_errno ? 2 : 0;