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
5348bc99
Commit
5348bc99
authored
Feb 18, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up fix for Bug #7989 by avoiding extra memory copy, and adding some
more information to the error message.
parent
a6afab6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
sql/sql_acl.cc
sql/sql_acl.cc
+10
-12
No files found.
sql/sql_acl.cc
View file @
5348bc99
...
...
@@ -202,18 +202,17 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
{
/*
We make a temporary copy of the database, force it to lower case,
and then copy it back over the original name. We can't just update
the host.db pointer, because tmp_name is allocated on the stack.
and then check it against the original name.
*/
(
void
)
str
mov
(
tmp_name
,
host
.
db
);
my_casedn_str
(
files_charset_info
,
tmp_name
);
(
void
)
str
nmov
(
tmp_name
,
host
.
db
,
sizeof
(
tmp_name
)
);
my_casedn_str
(
files_charset_info
,
host
.
db
);
if
(
strcmp
(
host
.
db
,
tmp_name
)
!=
0
)
{
sql_print_warning
(
"'host' entry '%s|%s' had database in mixed "
"case that has been forced to lowercase because "
"lower_case_table_names is set."
,
"lower_case_table_names is set. It will not be "
"possible to remove this privilege using REVOKE."
,
host
.
host
.
hostname
,
host
.
db
);
(
void
)
strmov
(
host
.
db
,
tmp_name
);
}
}
host
.
access
=
get_access
(
table
,
2
);
...
...
@@ -403,18 +402,17 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
{
/*
We make a temporary copy of the database, force it to lower case,
and then copy it back over the original name. We can't just update
the db.db pointer, because tmp_name is allocated on the stack.
and then check it against the original name.
*/
(
void
)
str
mov
(
tmp_name
,
db
.
db
);
my_casedn_str
(
files_charset_info
,
tmp_name
);
(
void
)
str
nmov
(
tmp_name
,
db
.
db
,
sizeof
(
tmp_name
)
);
my_casedn_str
(
files_charset_info
,
db
.
db
);
if
(
strcmp
(
db
.
db
,
tmp_name
)
!=
0
)
{
sql_print_warning
(
"'db' entry '%s %s@%s' had database in mixed "
"case that has been forced to lowercase because "
"lower_case_table_names is set."
,
"lower_case_table_names is set. It will not be "
"possible to remove this privilege using REVOKE."
,
db
.
db
,
db
.
user
,
db
.
host
.
hostname
,
db
.
host
.
hostname
);
(
void
)
strmov
(
db
.
db
,
tmp_name
);
}
}
db
.
sort
=
get_sort
(
3
,
db
.
host
.
hostname
,
db
.
db
,
db
.
user
);
...
...
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