Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ec4a0ee4
Commit
ec4a0ee4
authored
May 31, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
several bug fixes
parent
9b35856c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
7 deletions
+20
-7
include/my_global.h
include/my_global.h
+3
-1
mysys/charset.c
mysys/charset.c
+1
-0
sql/sql_acl.cc
sql/sql_acl.cc
+12
-3
sql/sql_parse.cc
sql/sql_parse.cc
+4
-3
No files found.
include/my_global.h
View file @
ec4a0ee4
...
...
@@ -263,8 +263,10 @@ C_MODE_END
#endif
#ifdef HAVE_ATOMIC_ADD
#define __SMP__
#define CONFIG_SMP
#include <asm/atomic.h>
#ifndef CONFIG_SMP
#define CONFIG_SMP
#endif
#endif
#include <errno.h>
/* Recommended by debian */
/* We need the following to go around a problem with openssl on solaris */
...
...
mysys/charset.c
View file @
ec4a0ee4
...
...
@@ -315,6 +315,7 @@ static CHARSET_INFO *add_charset(uint cs_number, const char *cs_name, myf flags)
cs
->
to_lower
=
tmp_to_lower
;
cs
->
to_upper
=
tmp_to_upper
;
cs
->
sort_order
=
tmp_sort_order
;
cs
->
strxfrm_multiply
=
cs
->
mbmaxlen
=
1
;
if
(
read_charset_file
(
cs_number
,
cs
,
flags
))
return
NULL
;
...
...
sql/sql_acl.cc
View file @
ec4a0ee4
...
...
@@ -2285,12 +2285,21 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list,
(
!
db
?
rights
:
0
),
revoke_grant
,
create_new_users
)))
result
=
-
1
;
else
else
if
(
db
)
{
ulong
db_rights
=
rights
&
DB_ACLS
;
if
(
db_rights
==
rights
)
{
if
(
db
&&
replace_db_table
(
tables
[
1
].
table
,
db
,
*
Str
,
rights
&
DB_ACLS
,
if
(
replace_db_table
(
tables
[
1
].
table
,
db
,
*
Str
,
db_rights
,
revoke_grant
))
result
=
-
1
;
}
else
{
net_printf
(
&
thd
->
net
,
ER_WRONG_USAGE
,
"DB GRANT"
,
"GLOBAL PRIVILEGEY"
);
result
=
-
1
;
}
}
}
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
pthread_mutex_unlock
(
&
LOCK_grant
);
...
...
sql/sql_parse.cc
View file @
ec4a0ee4
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment