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
a79c6b60
Commit
a79c6b60
authored
Feb 28, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus:mysql/mysql-5.1
into shellback.(none):/home/msvensson/mysql/mysql-5.1
parents
359b2ef4
2e401e20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
2 deletions
+61
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
mysql-test/r/grant2.result
mysql-test/r/grant2.result
+22
-0
mysql-test/t/grant2.test
mysql-test/t/grant2.test
+35
-0
sql/sql_acl.cc
sql/sql_acl.cc
+3
-1
No files found.
mysql-test/mysql-test-run.pl
View file @
a79c6b60
...
@@ -2904,7 +2904,7 @@ sub run_mysqltest ($) {
...
@@ -2904,7 +2904,7 @@ sub run_mysqltest ($) {
if
(
$opt_debug
)
if
(
$opt_debug
)
{
{
$cmdline_mysqlslap
.=
$cmdline_mysqlslap
.=
"
--debug=d:t:A,
$opt_vardir_trace
/log/mysql
dum
p.trace
";
"
--debug=d:t:A,
$opt_vardir_trace
/log/mysql
sla
p.trace
";
}
}
}
}
...
...
mysql-test/r/grant2.result
View file @
a79c6b60
...
@@ -334,3 +334,25 @@ lock table mysql.user write;
...
@@ -334,3 +334,25 @@ lock table mysql.user write;
revoke all on *.* from 'mysqltest_1'@'localhost';
revoke all on *.* from 'mysqltest_1'@'localhost';
unlock tables;
unlock tables;
drop user 'mysqltest_1'@'localhost';
drop user 'mysqltest_1'@'localhost';
create database TESTDB;
create table t2(a int);
create temporary table t1 as select * from mysql.user;
delete from mysql.user where host='localhost';
INSERT INTO mysql.user VALUES
('%','mysqltest_1',password('password'),'N','N','N','N','N','N',
'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N',
'','','','',0,0,0,0);
INSERT INTO mysql.db VALUES
('%','TESTDB','mysqltest_1','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','N','Y','Y','Y','
Y','N');
Warnings:
Warning 1265 Data truncated for column 'Alter_routine_priv' at row 1
FLUSH PRIVILEGES;
create database TEStdb;
ERROR 42000: Access denied for user 'mysqltest_1'@'%' to database 'TEStdb'
delete from mysql.user;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
insert into mysql.user select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
mysql-test/t/grant2.test
View file @
a79c6b60
...
@@ -429,3 +429,38 @@ disconnect con2root;
...
@@ -429,3 +429,38 @@ disconnect con2root;
disconnect
con3root
;
disconnect
con3root
;
# End of 4.1 tests
# End of 4.1 tests
#
# Bug#17279 user with no global privs and with create
# priv in db can create databases
#
create
database
TESTDB
;
create
table
t2
(
a
int
);
create
temporary
table
t1
as
select
*
from
mysql
.
user
;
delete
from
mysql
.
user
where
host
=
'localhost'
;
INSERT
INTO
mysql
.
user
VALUES
(
'%'
,
'mysqltest_1'
,
password
(
'password'
),
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
'N'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
INSERT
INTO
mysql
.
db
VALUES
(
'%'
,
'TESTDB'
,
'mysqltest_1'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'N'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'N'
,
'Y'
,
'Y'
,
'Y'
,
'
Y'
,
'N'
);
FLUSH
PRIVILEGES
;
connect
(
con1
,
localhost
,
mysqltest_1
,
password
,
TESTDB
);
# The user mysqltest_1 should only be allowed access to
# database TESTDB, not TEStdb
--
error
1044
create
database
TEStdb
;
# Clean-up
connection
default
;
delete
from
mysql
.
user
;
delete
from
mysql
.
db
where
host
=
'%'
and
user
=
'mysqltest_1'
and
db
=
'TESTDB'
;
insert
into
mysql
.
user
select
*
from
t1
;
drop
table
t1
,
t2
;
drop
database
TESTDB
;
flush
privileges
;
sql/sql_acl.cc
View file @
a79c6b60
...
@@ -263,7 +263,9 @@ my_bool acl_init(bool dont_read_acl_tables)
...
@@ -263,7 +263,9 @@ my_bool acl_init(bool dont_read_acl_tables)
acl_cache
=
new
hash_filo
(
ACL_CACHE_SIZE
,
0
,
0
,
acl_cache
=
new
hash_filo
(
ACL_CACHE_SIZE
,
0
,
0
,
(
hash_get_key
)
acl_entry_get_key
,
(
hash_get_key
)
acl_entry_get_key
,
(
hash_free_key
)
free
,
system_charset_info
);
(
hash_free_key
)
free
,
/* Use the case sensitive "binary" charset */
&
my_charset_bin
);
if
(
dont_read_acl_tables
)
if
(
dont_read_acl_tables
)
{
{
DBUG_RETURN
(
0
);
/* purecov: tested */
DBUG_RETURN
(
0
);
/* purecov: tested */
...
...
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