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
baf97714
Commit
baf97714
authored
Nov 11, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup in sql_acl.cc: thd->lex ->lex
parent
e5f4c7a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
sql/sql_acl.cc
sql/sql_acl.cc
+24
-23
No files found.
sql/sql_acl.cc
View file @
baf97714
...
@@ -1528,6 +1528,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1528,6 +1528,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
uint
password_len
=
0
;
uint
password_len
=
0
;
char
what
=
(
revoke_grant
)
?
'N'
:
'Y'
;
char
what
=
(
revoke_grant
)
?
'N'
:
'Y'
;
DBUG_ENTER
(
"replace_user_table"
);
DBUG_ENTER
(
"replace_user_table"
);
LEX
*
lex
=
thd
->
lex
;
safe_mutex_assert_owner
(
&
acl_cache
->
lock
);
safe_mutex_assert_owner
(
&
acl_cache
->
lock
);
if
(
combo
.
password
.
str
&&
combo
.
password
.
str
[
0
])
if
(
combo
.
password
.
str
&&
combo
.
password
.
str
[
0
])
...
@@ -1600,8 +1601,8 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1600,8 +1601,8 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
store_record
(
table
,
record
[
1
]);
// Save copy for update
store_record
(
table
,
record
[
1
]);
// Save copy for update
if
(
combo
.
password
.
str
)
// If password given
if
(
combo
.
password
.
str
)
// If password given
table
->
field
[
2
]
->
store
(
password
,
password_len
,
&
my_charset_latin1
);
table
->
field
[
2
]
->
store
(
password
,
password_len
,
&
my_charset_latin1
);
else
if
(
!
rights
&&
!
revoke_grant
&&
thd
->
lex
->
ssl_type
==
SSL_TYPE_NOT_SPECIFIED
&&
else
if
(
!
rights
&&
!
revoke_grant
&&
!
thd
->
lex
->
mqh
.
bits
)
lex
->
ssl_type
==
SSL_TYPE_NOT_SPECIFIED
&&
!
lex
->
mqh
.
bits
)
{
{
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -1624,7 +1625,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1624,7 +1625,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
if
(
table
->
fields
>=
31
)
/* From 4.0.0 we have more fields */
if
(
table
->
fields
>=
31
)
/* From 4.0.0 we have more fields */
{
{
/* We write down SSL related ACL stuff */
/* We write down SSL related ACL stuff */
switch
(
thd
->
lex
->
ssl_type
)
{
switch
(
lex
->
ssl_type
)
{
case
SSL_TYPE_ANY
:
case
SSL_TYPE_ANY
:
table
->
field
[
24
]
->
store
(
"ANY"
,
3
,
&
my_charset_latin1
);
table
->
field
[
24
]
->
store
(
"ANY"
,
3
,
&
my_charset_latin1
);
table
->
field
[
25
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
25
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
...
@@ -1642,15 +1643,15 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1642,15 +1643,15 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
table
->
field
[
25
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
25
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
26
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
26
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
27
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
table
->
field
[
27
]
->
store
(
""
,
0
,
&
my_charset_latin1
);
if
(
thd
->
lex
->
ssl_cipher
)
if
(
lex
->
ssl_cipher
)
table
->
field
[
25
]
->
store
(
thd
->
lex
->
ssl_cipher
,
table
->
field
[
25
]
->
store
(
lex
->
ssl_cipher
,
strlen
(
thd
->
lex
->
ssl_cipher
),
&
my_charset_latin1
);
strlen
(
lex
->
ssl_cipher
),
&
my_charset_latin1
);
if
(
thd
->
lex
->
x509_issuer
)
if
(
lex
->
x509_issuer
)
table
->
field
[
26
]
->
store
(
thd
->
lex
->
x509_issuer
,
table
->
field
[
26
]
->
store
(
lex
->
x509_issuer
,
strlen
(
thd
->
lex
->
x509_issuer
),
&
my_charset_latin1
);
strlen
(
lex
->
x509_issuer
),
&
my_charset_latin1
);
if
(
thd
->
lex
->
x509_subject
)
if
(
lex
->
x509_subject
)
table
->
field
[
27
]
->
store
(
thd
->
lex
->
x509_subject
,
table
->
field
[
27
]
->
store
(
lex
->
x509_subject
,
strlen
(
thd
->
lex
->
x509_subject
),
&
my_charset_latin1
);
strlen
(
lex
->
x509_subject
),
&
my_charset_latin1
);
break
;
break
;
case
SSL_TYPE_NOT_SPECIFIED
:
case
SSL_TYPE_NOT_SPECIFIED
:
break
;
break
;
...
@@ -1662,7 +1663,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1662,7 +1663,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
break
;
break
;
}
}
USER_RESOURCES
mqh
=
thd
->
lex
->
mqh
;
USER_RESOURCES
mqh
=
lex
->
mqh
;
if
(
mqh
.
bits
&
1
)
if
(
mqh
.
bits
&
1
)
table
->
field
[
28
]
->
store
((
longlong
)
mqh
.
questions
);
table
->
field
[
28
]
->
store
((
longlong
)
mqh
.
questions
);
if
(
mqh
.
bits
&
2
)
if
(
mqh
.
bits
&
2
)
...
@@ -1704,19 +1705,19 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
...
@@ -1704,19 +1705,19 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
if
(
old_row_exists
)
if
(
old_row_exists
)
acl_update_user
(
combo
.
user
.
str
,
combo
.
host
.
str
,
acl_update_user
(
combo
.
user
.
str
,
combo
.
host
.
str
,
combo
.
password
.
str
,
password_len
,
combo
.
password
.
str
,
password_len
,
thd
->
lex
->
ssl_type
,
lex
->
ssl_type
,
thd
->
lex
->
ssl_cipher
,
lex
->
ssl_cipher
,
thd
->
lex
->
x509_issuer
,
lex
->
x509_issuer
,
thd
->
lex
->
x509_subject
,
lex
->
x509_subject
,
&
thd
->
lex
->
mqh
,
&
lex
->
mqh
,
rights
);
rights
);
else
else
acl_insert_user
(
combo
.
user
.
str
,
combo
.
host
.
str
,
password
,
password_len
,
acl_insert_user
(
combo
.
user
.
str
,
combo
.
host
.
str
,
password
,
password_len
,
thd
->
lex
->
ssl_type
,
lex
->
ssl_type
,
thd
->
lex
->
ssl_cipher
,
lex
->
ssl_cipher
,
thd
->
lex
->
x509_issuer
,
lex
->
x509_issuer
,
thd
->
lex
->
x509_subject
,
lex
->
x509_subject
,
&
thd
->
lex
->
mqh
,
&
lex
->
mqh
,
rights
);
rights
);
}
}
DBUG_RETURN
(
error
);
DBUG_RETURN
(
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