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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e68ebac9
Commit
e68ebac9
authored
May 15, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some things to make MySQL to compile again.
parent
a68e91cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
+14
-15
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+7
-7
sql/sql_acl.cc
sql/sql_acl.cc
+3
-6
sql/sql_cache.cc
sql/sql_cache.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+3
-1
No files found.
libmysqld/lib_sql.cc
View file @
e68ebac9
...
...
@@ -236,7 +236,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
const
char
*
passwd
,
const
char
*
db
,
bool
check_count
)
{
NET
*
net
=
&
thd
->
net
;
uint
max
=
0
;
USER_RESOURCES
ur
;
thd
->
db
=
0
;
if
(
!
(
thd
->
user
=
my_strdup
(
user
,
MYF
(
0
))))
...
...
@@ -248,22 +248,22 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
passwd
,
thd
->
scramble
,
&
thd
->
priv_user
,
protocol_version
==
9
||
!
(
thd
->
client_capabilities
&
CLIENT_LONG_PASSWORD
),
&
max
);
DBUG_PRINT
(
"
general
"
,
CLIENT_LONG_PASSWORD
),
&
ur
);
DBUG_PRINT
(
"
info
"
,
(
"Capabilities: %d packet_length: %d Host: '%s' User: '%s' Using password: %s Access: %u db: '%s'"
,
thd
->
client_capabilities
,
thd
->
max_packet_length
,
thd
->
host
?
thd
->
host
:
thd
->
ip
,
thd
->
priv_user
,
thd
->
host
_or_
ip
,
thd
->
priv_user
,
passwd
[
0
]
?
"yes"
:
"no"
,
thd
->
master_access
,
thd
->
db
?
thd
->
db
:
"*none*"
));
if
(
thd
->
master_access
&
NO_ACCESS
)
{
net_printf
(
net
,
ER_ACCESS_DENIED_ERROR
,
thd
->
user
,
thd
->
host
?
thd
->
host
:
thd
->
ip
,
thd
->
host
_or_
ip
,
passwd
[
0
]
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
mysql_log
.
write
(
thd
,
COM_CONNECT
,
ER
(
ER_ACCESS_DENIED_ERROR
),
thd
->
user
,
thd
->
host
?
thd
->
host
:
thd
->
ip
?
thd
->
ip
:
"unknown ip"
,
thd
->
host
_or_ip
,
passwd
[
0
]
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
return
(
1
);
// Error already given
}
...
...
@@ -284,7 +284,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
(
char
*
)
"%s@%s on %s"
:
(
char
*
)
"%s@%s as anonymous on %s"
),
user
,
thd
->
host
?
thd
->
host
:
thd
->
ip
?
thd
->
ip
:
"unknown ip"
,
thd
->
host
_or_ip
,
db
?
db
:
(
char
*
)
""
);
thd
->
db_access
=
0
;
if
(
db
&&
db
[
0
])
...
...
sql/sql_acl.cc
View file @
e68ebac9
...
...
@@ -1180,20 +1180,17 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
char
*
password
,
empty_string
[
1
];
DBUG_ENTER
(
"replace_user_table"
);
password
=
empty_string
;
empty_string
[
0
]
=
0
;
if
(
combo
.
password
.
str
&&
combo
.
password
.
str
[
0
])
{
if
(
combo
.
password
.
length
<
=
HASH_PASSWORD_LENGTH
)
if
(
combo
.
password
.
length
!
=
HASH_PASSWORD_LENGTH
)
{
send_error
(
&
thd
->
net
,
ER_PASSWORD_NO_MATCH
);
DBUG_RETURN
(
1
);
}
password
=
combo
.
password
.
str
;
}
else
{
password
=
empty_string
;
empty_string
[
0
]
=
0
;
}
table
->
field
[
0
]
->
store
(
combo
.
host
.
str
,
combo
.
host
.
length
);
table
->
field
[
1
]
->
store
(
combo
.
user
.
str
,
combo
.
user
.
length
);
...
...
sql/sql_cache.cc
View file @
e68ebac9
...
...
@@ -1071,7 +1071,7 @@ void Query_cache::invalidate(CHANGED_TABLE_LIST *tables_used)
DUMP
(
this
);
for
(
;
tables_used
;
tables_used
=
tables_used
->
next
)
{
invalidate_table
((
uchar
*
)
tables_used
->
key
,
tables_used
->
key_length
);
invalidate_table
((
byte
*
)
tables_used
->
key
,
tables_used
->
key_length
);
DBUG_PRINT
(
"qcache"
,
(
" db %s, table %s"
,
tables_used
->
key
,
tables_used
->
table_name
));
}
...
...
sql/sql_parse.cc
View file @
e68ebac9
...
...
@@ -242,7 +242,8 @@ 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
)
&&
get_or_create_user_conn
(
thd
,
user
,
thd
->
host_or_ip
,
&
ur
))
if
((
ur
.
questions
||
ur
.
updates
||
ur
.
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
&&
check_for_max_user_connections
(
thd
->
user_connect
))
...
...
@@ -259,6 +260,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
return
0
;
// ok
}
/*
Check for maximum allowable user connections, if the mysqld server is
started with corresponding variable that is greater then 0.
...
...
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