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
692311f5
Commit
692311f5
authored
Nov 17, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabled having system tables in ndb
parent
9ae173c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
sql/sql_acl.cc
sql/sql_acl.cc
+27
-10
No files found.
sql/sql_acl.cc
View file @
692311f5
...
...
@@ -1384,8 +1384,10 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
table
->
field
[
0
]
->
store
(
host
,(
uint
)
strlen
(
host
),
&
my_charset_latin1
);
table
->
field
[
1
]
->
store
(
user
,(
uint
)
strlen
(
user
),
&
my_charset_latin1
);
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
my_error
(
ER_PASSWORD_NO_MATCH
,
MYF
(
0
));
/* purecov: deadcode */
...
...
@@ -1463,9 +1465,11 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
table
->
field
[
0
]
->
store
(
combo
.
host
.
str
,
combo
.
host
.
length
,
&
my_charset_latin1
);
table
->
field
[
1
]
->
store
(
combo
.
user
.
str
,
combo
.
user
.
length
,
&
my_charset_latin1
);
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
0
,
HA_READ_KEY_EXACT
))
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
if
(
!
create_user
)
{
...
...
@@ -1568,6 +1572,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
We should NEVER delete from the user table, as a uses can still
use mysqld even if he doesn't have any privileges in the user table!
*/
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
cmp_record
(
table
,
record
[
1
])
&&
(
error
=
table
->
file
->
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
{
// This should never happen
...
...
@@ -1645,8 +1650,11 @@ static int replace_db_table(TABLE *table, const char *db,
table
->
field
[
0
]
->
store
(
combo
.
host
.
str
,
combo
.
host
.
length
,
&
my_charset_latin1
);
table
->
field
[
1
]
->
store
(
db
,(
uint
)
strlen
(
db
),
&
my_charset_latin1
);
table
->
field
[
2
]
->
store
(
combo
.
user
.
str
,
combo
.
user
.
length
,
&
my_charset_latin1
);
if
(
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,(
byte
*
)
table
->
field
[
0
]
->
ptr
,
0
,
HA_READ_KEY_EXACT
))
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
if
(
what
==
'N'
)
{
// no row, no revoke
...
...
@@ -1679,6 +1687,7 @@ static int replace_db_table(TABLE *table, const char *db,
/* update old existing row */
if
(
rights
)
{
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
((
error
=
table
->
file
->
update_row
(
table
->
record
[
1
],
table
->
record
[
0
])))
goto
table_error
;
/* purecov: deadcode */
}
...
...
@@ -1953,8 +1962,10 @@ static int replace_column_table(GRANT_TABLE *g_t,
table
->
field
[
4
]
->
store
(
xx
->
column
.
ptr
(),
xx
->
column
.
length
(),
&
my_charset_latin1
);
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read
(
table
->
record
[
0
],(
byte
*
)
table
->
field
[
0
]
->
ptr
,
0
,
HA_READ_KEY_EXACT
))
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
if
(
revoke_grant
)
{
...
...
@@ -2022,8 +2033,10 @@ static int replace_column_table(GRANT_TABLE *g_t,
if
(
revoke_grant
)
{
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read
(
table
->
record
[
0
],
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
key_length
,
HA_READ_KEY_EXACT
))
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
goto
end
;
/* Scan through all rows with the same host,db,user and table */
...
...
@@ -2112,9 +2125,10 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
table
->
field
[
2
]
->
store
(
combo
.
user
.
str
,
combo
.
user
.
length
,
&
my_charset_latin1
);
table
->
field
[
3
]
->
store
(
table_name
,(
uint
)
strlen
(
table_name
),
&
my_charset_latin1
);
store_record
(
table
,
record
[
1
]);
// store at pos 1
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
/*
...
...
@@ -3571,9 +3585,12 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
tables
[
0
].
table
->
field
[
1
]
->
store
(
user_name
->
user
.
str
,(
uint
)
user_name
->
user
.
length
,
system_charset_info
);
tables
[
0
].
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
!
tables
[
0
].
table
->
file
->
index_read_idx
(
tables
[
0
].
table
->
record
[
0
],
0
,
(
byte
*
)
tables
[
0
].
table
->
field
[
0
]
->
ptr
,
0
,
field
[
0
]
->
ptr
,
tables
[
0
].
table
->
key_info
[
0
].
key_length
,
HA_READ_KEY_EXACT
))
{
int
error
;
...
...
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