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
4429756e
Commit
4429756e
authored
Jun 20, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash when an entry was added to the mysql.tables_priv
table with an empty hostname. (Bug #11330)
parent
b5b3b32d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/grant.result
mysql-test/r/grant.result
+4
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+8
-0
sql/sql_acl.cc
sql/sql_acl.cc
+2
-1
No files found.
mysql-test/r/grant.result
View file @
4429756e
...
...
@@ -435,3 +435,7 @@ ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'mysqltest_1';
drop database mysqltest;
use mysql;
insert into tables_priv values ('','mysqltest_1','test_table','test_grantor','',CURRENT_TIMESTAMP,'Select','Select');
flush privileges;
delete from tables_priv where host = '' and user = 'mysqltest_1';
mysql-test/t/grant.test
View file @
4429756e
...
...
@@ -392,3 +392,11 @@ revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user=_binary'
mysqltest_1
';
drop database mysqltest;
#
# Bug #11330: Entry in tables_priv with host = '' causes crash
#
connection default;
use mysql;
insert into tables_priv values ('','
mysqltest_1
','
test_table
','
test_grantor
','',CURRENT_TIMESTAMP,'
Select
','
Select
');
flush privileges;
delete from tables_priv where host = '' and user = '
mysqltest_1
'
;
sql/sql_acl.cc
View file @
4429756e
...
...
@@ -1866,7 +1866,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs)
if
(
cols
)
{
int
key_len
;
col_privs
->
field
[
0
]
->
store
(
host
.
hostname
,(
uint
)
strlen
(
host
.
hostname
),
col_privs
->
field
[
0
]
->
store
(
host
.
hostname
,
host
.
hostname
?
(
uint
)
strlen
(
host
.
hostname
)
:
0
,
&
my_charset_latin1
);
col_privs
->
field
[
1
]
->
store
(
db
,(
uint
)
strlen
(
db
),
&
my_charset_latin1
);
col_privs
->
field
[
2
]
->
store
(
user
,(
uint
)
strlen
(
user
),
&
my_charset_latin1
);
...
...
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