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
0b6c26c6
Commit
0b6c26c6
authored
Nov 20, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1-w1284
parents
f25cbdd9
0aa62bc3
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
103 additions
and
3 deletions
+103
-3
include/mysqld_error.h
include/mysqld_error.h
+2
-1
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+1
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+1
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+1
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+1
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+1
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+1
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+1
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+1
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+1
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+1
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+1
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+1
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+1
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+1
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+1
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+1
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+1
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+1
-0
sql/share/serbian/errmsg.txt
sql/share/serbian/errmsg.txt
+1
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+1
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+1
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+1
-0
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+1
-0
sql/sql_acl.cc
sql/sql_acl.cc
+64
-2
sql/sql_acl.h
sql/sql_acl.h
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+13
-0
No files found.
include/mysqld_error.h
View file @
0b6c26c6
...
@@ -300,4 +300,5 @@
...
@@ -300,4 +300,5 @@
#define ER_WARN_QC_RESIZE 1281
#define ER_WARN_QC_RESIZE 1281
#define ER_BAD_FT_COLUMN 1282
#define ER_BAD_FT_COLUMN 1282
#define ER_UNKNOWN_KEY_CACHE 1283
#define ER_UNKNOWN_KEY_CACHE 1283
#define ER_ERROR_MESSAGES 284
#define ER_WARN_HOSTNAME_WONT_WORK 1284
#define ER_ERROR_MESSAGES 285
sql/share/czech/errmsg.txt
View file @
0b6c26c6
...
@@ -296,3 +296,4 @@ character-set=latin2
...
@@ -296,3 +296,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/danish/errmsg.txt
View file @
0b6c26c6
...
@@ -290,3 +290,4 @@ character-set=latin1
...
@@ -290,3 +290,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/dutch/errmsg.txt
View file @
0b6c26c6
...
@@ -298,3 +298,4 @@ character-set=latin1
...
@@ -298,3 +298,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/english/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/estonian/errmsg.txt
View file @
0b6c26c6
...
@@ -292,3 +292,4 @@ character-set=latin7
...
@@ -292,3 +292,4 @@ character-set=latin7
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/french/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/german/errmsg.txt
View file @
0b6c26c6
...
@@ -299,3 +299,4 @@ character-set=latin1
...
@@ -299,3 +299,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/greek/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=greek
...
@@ -287,3 +287,4 @@ character-set=greek
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/hungarian/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=latin2
...
@@ -289,3 +289,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/italian/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/japanese/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=ujis
...
@@ -289,3 +289,4 @@ character-set=ujis
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/korean/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=euckr
...
@@ -287,3 +287,4 @@ character-set=euckr
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/norwegian-ny/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/norwegian/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/polish/errmsg.txt
View file @
0b6c26c6
...
@@ -291,3 +291,4 @@ character-set=latin2
...
@@ -291,3 +291,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/portuguese/errmsg.txt
View file @
0b6c26c6
...
@@ -288,3 +288,4 @@ character-set=latin1
...
@@ -288,3 +288,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/romanian/errmsg.txt
View file @
0b6c26c6
...
@@ -291,3 +291,4 @@ character-set=latin2
...
@@ -291,3 +291,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/russian/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=koi8r
...
@@ -289,3 +289,4 @@ character-set=koi8r
" %lu, - %lu",
" %lu, - %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/serbian/errmsg.txt
View file @
0b6c26c6
...
@@ -282,3 +282,4 @@ character-set=cp1250
...
@@ -282,3 +282,4 @@ character-set=cp1250
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/slovak/errmsg.txt
View file @
0b6c26c6
...
@@ -295,3 +295,4 @@ character-set=latin2
...
@@ -295,3 +295,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/spanish/errmsg.txt
View file @
0b6c26c6
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/swedish/errmsg.txt
View file @
0b6c26c6
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu",
"Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu",
"Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index",
"Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/share/ukrainian/errmsg.txt
View file @
0b6c26c6
...
@@ -292,3 +292,4 @@ character-set=koi8u
...
@@ -292,3 +292,4 @@ character-set=koi8u
" Ԧ ͦ %lu, ͦ Ԧ - %lu",
" Ԧ ͦ %lu, ͦ Ԧ - %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Can't resolve '%s' if --skip-name-resolve active",
sql/sql_acl.cc
View file @
0b6c26c6
...
@@ -139,6 +139,8 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
...
@@ -139,6 +139,8 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
READ_RECORD
read_record_info
;
READ_RECORD
read_record_info
;
MYSQL_LOCK
*
lock
;
MYSQL_LOCK
*
lock
;
my_bool
return_val
=
1
;
my_bool
return_val
=
1
;
bool
check_no_resolve
=
specialflag
&
SPECIAL_NO_RESOLVE
;
DBUG_ENTER
(
"acl_init"
);
DBUG_ENTER
(
"acl_init"
);
if
(
!
acl_cache
)
if
(
!
acl_cache
)
...
@@ -198,6 +200,13 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
...
@@ -198,6 +200,13 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
host
.
access
=
get_access
(
table
,
2
);
host
.
access
=
get_access
(
table
,
2
);
host
.
access
=
fix_rights_for_db
(
host
.
access
);
host
.
access
=
fix_rights_for_db
(
host
.
access
);
host
.
sort
=
get_sort
(
2
,
host
.
host
.
hostname
,
host
.
db
);
host
.
sort
=
get_sort
(
2
,
host
.
host
.
hostname
,
host
.
db
);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
host
.
host
.
hostname
))
{
sql_print_error
(
"Error in table 'host' entry '%s|%s'. "
"Can't resolve '%s' if --skip-name-resolve active. Skipped"
,
host
.
host
.
hostname
,
host
.
db
,
host
.
host
.
hostname
);
continue
;
}
#ifndef TO_BE_REMOVED
#ifndef TO_BE_REMOVED
if
(
table
->
fields
==
8
)
if
(
table
->
fields
==
8
)
{
// Without grant
{
// Without grant
...
@@ -259,6 +268,14 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
...
@@ -259,6 +268,14 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
ACL_USER
user
;
ACL_USER
user
;
update_hostname
(
&
user
.
host
,
get_field
(
&
mem
,
table
->
field
[
0
]));
update_hostname
(
&
user
.
host
,
get_field
(
&
mem
,
table
->
field
[
0
]));
user
.
user
=
get_field
(
&
mem
,
table
->
field
[
1
]);
user
.
user
=
get_field
(
&
mem
,
table
->
field
[
1
]);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
user
.
host
.
hostname
))
{
sql_print_error
(
"Error in table 'user' entry '%s@%s'. "
"Can't resolve '%s' if --skip-name-resolve active. Skipped"
,
user
.
user
,
user
.
host
.
hostname
,
user
.
host
.
hostname
);
continue
;
}
const
char
*
password
=
get_field
(
&
mem
,
table
->
field
[
2
]);
const
char
*
password
=
get_field
(
&
mem
,
table
->
field
[
2
]);
uint
password_len
=
password
?
strlen
(
password
)
:
0
;
uint
password_len
=
password
?
strlen
(
password
)
:
0
;
set_user_salt
(
&
user
,
password
,
password_len
);
set_user_salt
(
&
user
,
password
,
password_len
);
...
@@ -353,6 +370,13 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
...
@@ -353,6 +370,13 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
continue
;
continue
;
}
}
db
.
user
=
get_field
(
&
mem
,
table
->
field
[
2
]);
db
.
user
=
get_field
(
&
mem
,
table
->
field
[
2
]);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
db
.
host
.
hostname
))
{
sql_print_error
(
"Error in table 'db' entry '%s %s@%s'. "
"Can't resolve '%s' if --skip-name-resolve active. Skipped"
,
db
.
db
,
db
.
user
,
db
.
host
.
hostname
,
db
.
host
.
hostname
);
continue
;
}
db
.
access
=
get_access
(
table
,
3
);
db
.
access
=
get_access
(
table
,
3
);
db
.
access
=
fix_rights_for_db
(
db
.
access
);
db
.
access
=
fix_rights_for_db
(
db
.
access
);
db
.
sort
=
get_sort
(
3
,
db
.
host
.
hostname
,
db
.
db
,
db
.
user
);
db
.
sort
=
get_sort
(
3
,
db
.
host
.
hostname
,
db
.
db
,
db
.
user
);
...
@@ -1257,6 +1281,25 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname,
...
@@ -1257,6 +1281,25 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname,
(
ip
&&
!
wild_compare
(
ip
,
host
->
hostname
,
0
)));
(
ip
&&
!
wild_compare
(
ip
,
host
->
hostname
,
0
)));
}
}
bool
hostname_requires_resolving
(
const
char
*
hostname
)
{
char
cur
;
if
(
!
hostname
)
return
false
;
int
namelen
=
strlen
(
hostname
);
int
lhlen
=
strlen
(
my_localhost
);
if
((
namelen
==
lhlen
)
&&
!
my_strnncoll
(
&
my_charset_latin1
,
(
const
uchar
*
)
hostname
,
namelen
,
(
const
uchar
*
)
my_localhost
,
strlen
(
my_localhost
)))
return
false
;
for
(;
(
cur
=*
hostname
);
hostname
++
)
{
if
((
cur
!=
'%'
)
&&
(
cur
!=
'_'
)
&&
(
cur
!=
'.'
)
&&
((
cur
<
'0'
)
||
(
cur
>
'9'
)))
return
true
;
}
return
false
;
}
/*
/*
Update grants in the user and database privilege tables
Update grants in the user and database privilege tables
...
@@ -2444,6 +2487,7 @@ my_bool grant_init(THD *org_thd)
...
@@ -2444,6 +2487,7 @@ my_bool grant_init(THD *org_thd)
MYSQL_LOCK
*
lock
;
MYSQL_LOCK
*
lock
;
my_bool
return_val
=
1
;
my_bool
return_val
=
1
;
TABLE
*
t_table
,
*
c_table
;
TABLE
*
t_table
,
*
c_table
;
bool
check_no_resolve
=
specialflag
&
SPECIAL_NO_RESOLVE
;
DBUG_ENTER
(
"grant_init"
);
DBUG_ENTER
(
"grant_init"
);
grant_option
=
FALSE
;
grant_option
=
FALSE
;
...
@@ -2493,13 +2537,31 @@ my_bool grant_init(THD *org_thd)
...
@@ -2493,13 +2537,31 @@ my_bool grant_init(THD *org_thd)
do
do
{
{
GRANT_TABLE
*
mem_check
;
GRANT_TABLE
*
mem_check
;
if
(
!
(
mem_check
=
new
GRANT_TABLE
(
t_table
,
c_table
))
||
if
(
!
(
mem_check
=
new
GRANT_TABLE
(
t_table
,
c_table
))
||
mem_check
->
ok
())
mem_check
->
ok
()
&&
my_hash_insert
(
&
column_priv_hash
,(
byte
*
)
mem_check
))
{
{
/* This could only happen if we are out memory */
/* This could only happen if we are out memory */
grant_option
=
FALSE
;
/* purecov: deadcode */
grant_option
=
FALSE
;
/* purecov: deadcode */
goto
end_unlock
;
goto
end_unlock
;
}
}
if
(
check_no_resolve
)
{
if
(
hostname_requires_resolving
(
mem_check
->
host
))
{
char
buff
[
MAX_FIELD_WIDTH
];
sql_print_error
(
"Error in table 'tables_priv' entry '%s %s@%s'. "
"Can't resolve '%s' if --skip-name-resolve active. Skipped"
,
mem_check
->
tname
,
mem_check
->
user
,
mem_check
->
host
,
mem_check
->
host
);
continue
;
}
}
if
(
my_hash_insert
(
&
column_priv_hash
,(
byte
*
)
mem_check
))
{
grant_option
=
FALSE
;
goto
end_unlock
;
}
}
}
while
(
!
t_table
->
file
->
index_next
(
t_table
->
record
[
0
]));
while
(
!
t_table
->
file
->
index_next
(
t_table
->
record
[
0
]));
...
...
sql/sql_acl.h
View file @
0b6c26c6
...
@@ -131,6 +131,7 @@ public:
...
@@ -131,6 +131,7 @@ public:
/* prototypes */
/* prototypes */
bool
hostname_requires_resolving
(
const
char
*
hostname
);
my_bool
acl_init
(
THD
*
thd
,
bool
dont_read_acl_tables
);
my_bool
acl_init
(
THD
*
thd
,
bool
dont_read_acl_tables
);
void
acl_reload
(
THD
*
thd
);
void
acl_reload
(
THD
*
thd
);
void
acl_free
(
bool
end
=
0
);
void
acl_free
(
bool
end
=
0
);
...
...
sql/sql_parse.cc
View file @
0b6c26c6
...
@@ -3183,6 +3183,19 @@ mysql_execute_command(THD *thd)
...
@@ -3183,6 +3183,19 @@ mysql_execute_command(THD *thd)
}
}
}
}
}
}
if
(
specialflag
&
SPECIAL_NO_RESOLVE
)
{
LEX_USER
*
user
;
List_iterator
<
LEX_USER
>
user_list
(
lex
->
users_list
);
while
((
user
=
user_list
++
))
{
if
(
hostname_requires_resolving
(
user
->
host
.
str
))
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_HOSTNAME_WONT_WORK
,
ER
(
ER_WARN_HOSTNAME_WONT_WORK
),
user
->
host
.
str
);
}
}
if
(
tables
)
if
(
tables
)
{
{
if
(
grant_option
&&
check_grant
(
thd
,
if
(
grant_option
&&
check_grant
(
thd
,
...
...
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