summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-05-20 11:13:07 +0200
committerSergei Golubchik <sergii@pisem.net>2013-05-20 11:13:07 +0200
commit639a766096733861ce5f4ed4863d9db37090a4f4 (patch)
tree03c798fe41698e07f03d7db63ac54e4707c3ebaa /sql/sql_acl.cc
parent682c8a36ca503f53db50628463424f205b609ab0 (diff)
parent4ee5ae3e7ff418d8912920357427297f1465f407 (diff)
downloadmariadb-git-639a766096733861ce5f4ed4863d9db37090a4f4.tar.gz
5.2 merge
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 31af9f1c137..c59c2296111 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -7369,6 +7369,12 @@ static bool find_mpvio_user(MPVIO_EXT *mpvio, Security_context *sctx)
cs->coll->hash_sort(cs, (uchar*) sctx->user, strlen(sctx->user), &nr1, &nr2);
pthread_mutex_lock(&acl_cache->lock);
+ if (!acl_users.elements)
+ {
+ pthread_mutex_unlock(&acl_cache->lock);
+ login_failed_error(mpvio->thd);
+ return 1;
+ }
uint i= nr1 % acl_users.elements;
ACL_USER *acl_user_tmp= dynamic_element(&acl_users, i, ACL_USER*);
mpvio->acl_user= acl_user_tmp->copy(mpvio->thd->mem_root);