1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

several bug fixes

include/my_global.h:
  Fix for a clash with include files from Linux kernel source
mysys/charset.c:
  Fix for a bug with LEFT(), RIGHT() ... and GROUP BY clause
sql/sql_acl.cc:
  Sending error when global privilege is attempted at db level
sql/sql_parse.cc:
  Fix for the non-functioning max_user_connections
This commit is contained in:
unknown
2003-05-31 21:35:20 +03:00
parent 0ce9d6af4f
commit 17ac9f831f
4 changed files with 20 additions and 7 deletions

View File

@@ -257,10 +257,11 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
db ? db : (char*) "");
thd->db_access=0;
/* Don't allow user to connect if he has done too many queries */
if ((ur.questions || ur.updates || ur.connections) &&
if ((ur.questions || ur.updates || ur.connections || max_user_connections) &&
get_or_create_user_conn(thd,user,thd->host_or_ip,&ur))
return -1;
if (thd->user_connect && thd->user_connect->user_resources.connections &&
if (thd->user_connect && ((thd->user_connect->user_resources.connections) ||
max_user_connections) &&
check_for_max_user_connections(thd->user_connect))
return -1;
if (db && db[0])
@@ -308,7 +309,7 @@ static int check_for_max_user_connections(USER_CONN *uc)
DBUG_ENTER("check_for_max_user_connections");
if (max_user_connections &&
(max_user_connections <= (uint) uc->connections))
(max_user_connections < (uint) uc->connections))
{
net_printf(&(current_thd->net),ER_TOO_MANY_USER_CONNECTIONS, uc->user);
error=1;