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
1d03fb71
Commit
1d03fb71
authored
May 15, 2009
by
Matthias Leich
Browse files
Options
Browse Files
Download
Plain Diff
Merge of fix into GCA tree, no conflicts
parents
df41cc20
f4eb0953
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
mysql-test/r/information_schema_db.result
mysql-test/r/information_schema_db.result
+4
-4
mysql-test/t/information_schema_db.test
mysql-test/t/information_schema_db.test
+27
-17
No files found.
mysql-test/r/information_schema_db.result
View file @
1d03fb71
...
@@ -50,7 +50,7 @@ begin
...
@@ -50,7 +50,7 @@ begin
select table_name from information_schema.key_column_usage
select table_name from information_schema.key_column_usage
order by table_name;
order by table_name;
end|
end|
create table t1
create table t1
(f1 int(10) unsigned not null,
(f1 int(10) unsigned not null,
f2 varchar(100) not null,
f2 varchar(100) not null,
primary key (f1), unique key (f2));
primary key (f1), unique key (f2));
...
@@ -192,15 +192,15 @@ View Create View
...
@@ -192,15 +192,15 @@ View Create View
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
show create view testdb_1.v1;
show create view testdb_1.v1;
ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1'
ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1'
select table_name from information_schema.columns a
select table_name from information_schema.columns a
where a.table_name = 'v2';
where a.table_name = 'v2';
table_name
table_name
v2
v2
select view_definition from information_schema.views a
select view_definition from information_schema.views a
where a.table_name = 'v2';
where a.table_name = 'v2';
view_definition
view_definition
/* ALGORITHM=UNDEFINED */ select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
/* ALGORITHM=UNDEFINED */ select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
select view_definition from information_schema.views a
select view_definition from information_schema.views a
where a.table_name = 'testdb_1.v1';
where a.table_name = 'testdb_1.v1';
view_definition
view_definition
select * from v2;
select * from v2;
...
...
mysql-test/t/information_schema_db.test
View file @
1d03fb71
...
@@ -53,7 +53,7 @@ order by table_name;
...
@@ -53,7 +53,7 @@ order by table_name;
end
|
end
|
delimiter
;
|
delimiter
;
|
create
table
t1
create
table
t1
(
f1
int
(
10
)
unsigned
not
null
,
(
f1
int
(
10
)
unsigned
not
null
,
f2
varchar
(
100
)
not
null
,
f2
varchar
(
100
)
not
null
,
primary
key
(
f1
),
unique
key
(
f2
));
primary
key
(
f1
),
unique
key
(
f2
));
...
@@ -105,8 +105,8 @@ drop function f2;
...
@@ -105,8 +105,8 @@ drop function f2;
drop
view
v1
,
v2
;
drop
view
v1
,
v2
;
#
#
# Bug#20543
:
select on information_schema strange warnings, view, different
# Bug#20543 select on information_schema strange warnings, view, different
#
schemas/users
# schemas/users
#
#
#
#
create
database
testdb_1
;
create
database
testdb_1
;
...
@@ -125,7 +125,7 @@ grant insert on v1 to testdb_2@localhost;
...
@@ -125,7 +125,7 @@ grant insert on v1 to testdb_2@localhost;
create
view
v5
as
select
f1
from
t1
;
create
view
v5
as
select
f1
from
t1
;
grant
show
view
on
v5
to
testdb_2
@
localhost
;
grant
show
view
on
v5
to
testdb_2
@
localhost
;
--
error
1227
--
error
ER_SPECIFIC_ACCESS_DENIED_ERROR
create
definer
=
`no_such_user`
@
`no_such_host`
view
v6
as
select
f1
from
t1
;
create
definer
=
`no_such_user`
@
`no_such_host`
view
v6
as
select
f1
from
t1
;
connection
default
;
connection
default
;
...
@@ -169,46 +169,53 @@ use testdb_1;
...
@@ -169,46 +169,53 @@ use testdb_1;
revoke
show
view
on
v6
from
testdb_2
@
localhost
;
revoke
show
view
on
v6
from
testdb_2
@
localhost
;
connection
testdb_2
;
connection
testdb_2
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
fields
from
testdb_1
.
v5
;
show
fields
from
testdb_1
.
v5
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
create
view
testdb_1
.
v5
;
show
create
view
testdb_1
.
v5
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
fields
from
testdb_1
.
v6
;
show
fields
from
testdb_1
.
v6
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
create
view
testdb_1
.
v6
;
show
create
view
testdb_1
.
v6
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
fields
from
testdb_1
.
v7
;
show
fields
from
testdb_1
.
v7
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
create
view
testdb_1
.
v7
;
show
create
view
testdb_1
.
v7
;
--
error
1345
--
error
ER_VIEW_NO_EXPLAIN
show
create
view
v4
;
show
create
view
v4
;
#--error
1345
#--error
ER_VIEW_NO_EXPLAIN
show
fields
from
v4
;
show
fields
from
v4
;
show
fields
from
v2
;
show
fields
from
v2
;
show
fields
from
testdb_1
.
v1
;
show
fields
from
testdb_1
.
v1
;
show
create
view
v2
;
show
create
view
v2
;
--
error
1142
--
error
ER_TABLEACCESS_DENIED_ERROR
show
create
view
testdb_1
.
v1
;
show
create
view
testdb_1
.
v1
;
select
table_name
from
information_schema
.
columns
a
select
table_name
from
information_schema
.
columns
a
where
a
.
table_name
=
'v2'
;
where
a
.
table_name
=
'v2'
;
select
view_definition
from
information_schema
.
views
a
select
view_definition
from
information_schema
.
views
a
where
a
.
table_name
=
'v2'
;
where
a
.
table_name
=
'v2'
;
select
view_definition
from
information_schema
.
views
a
select
view_definition
from
information_schema
.
views
a
where
a
.
table_name
=
'testdb_1.v1'
;
where
a
.
table_name
=
'testdb_1.v1'
;
--
error
1356
--
error
ER_VIEW_INVALID
select
*
from
v2
;
select
*
from
v2
;
connection
default
;
connection
default
;
use
test
;
use
test
;
drop
view
testdb_1
.
v1
,
v2
,
testdb_1
.
v3
,
v4
;
drop
view
testdb_1
.
v1
,
v2
,
testdb_1
.
v3
,
v4
;
drop
database
testdb_1
;
drop
database
testdb_1
;
connection
testdb_1
;
disconnect
testdb_1
;
--
source
include
/
wait_until_disconnected
.
inc
connection
testdb_2
;
disconnect
testdb_2
;
--
source
include
/
wait_until_disconnected
.
inc
connection
default
;
drop
user
testdb_1
@
localhost
;
drop
user
testdb_1
@
localhost
;
drop
user
testdb_2
@
localhost
;
drop
user
testdb_2
@
localhost
;
...
@@ -239,4 +246,7 @@ show create view testdb_1.v1;
...
@@ -239,4 +246,7 @@ show create view testdb_1.v1;
connection
default
;
connection
default
;
drop
user
mysqltest_1
@
localhost
;
drop
user
mysqltest_1
@
localhost
;
drop
database
testdb_1
;
drop
database
testdb_1
;
connection
user1
;
disconnect
user1
;
disconnect
user1
;
--
source
include
/
wait_until_disconnected
.
inc
connection
default
;
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