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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d66889bf
Commit
d66889bf
authored
Nov 12, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents
8a7acf8a
7bd4fb81
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
mysql-test/r/derived.result
mysql-test/r/derived.result
+3
-0
mysql-test/t/derived.test
mysql-test/t/derived.test
+1
-0
sql/sql_derived.cc
sql/sql_derived.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
No files found.
mysql-test/r/derived.result
View file @
d66889bf
...
@@ -37,3 +37,6 @@ select * from (select 1);
...
@@ -37,3 +37,6 @@ select * from (select 1);
select a from (select 1 as a);
select a from (select 1 as a);
a
a
1
1
select 1 from (select 1);
1
1
mysql-test/t/derived.test
View file @
d66889bf
...
@@ -21,3 +21,4 @@ SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1);
...
@@ -21,3 +21,4 @@ SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1);
drop
table
if
exists
t1
.
t2
,
t3
;
drop
table
if
exists
t1
.
t2
,
t3
;
select
*
from
(
select
1
);
select
*
from
(
select
1
);
select
a
from
(
select
1
as
a
);
select
a
from
(
select
1
as
a
);
select
1
from
(
select
1
);
sql/sql_derived.cc
View file @
d66889bf
...
@@ -118,7 +118,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
...
@@ -118,7 +118,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
table
->
tmp_table
=
TMP_TABLE
;
table
->
tmp_table
=
TMP_TABLE
;
if
(
!
lex
->
describe
)
if
(
!
lex
->
describe
)
sl
->
exclude
();
sl
->
exclude
();
t
->
db
=
(
tables
&&
tables
->
db
&&
tables
->
db
[
0
])
?
t
->
db
:
thd
->
db
;
t
->
db
=
""
;
t
->
derived
=
(
SELECT_LEX
*
)
0
;
// just in case ...
t
->
derived
=
(
SELECT_LEX
*
)
0
;
// just in case ...
}
}
}
}
...
...
sql/sql_parse.cc
View file @
d66889bf
...
@@ -2717,7 +2717,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
...
@@ -2717,7 +2717,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
TABLE_LIST
*
org_tables
=
tables
;
TABLE_LIST
*
org_tables
=
tables
;
for
(;
tables
;
tables
=
tables
->
next
)
for
(;
tables
;
tables
=
tables
->
next
)
{
{
if
(
tables
->
derived
)
if
(
tables
->
derived
||
(
tables
->
table
&&
(
int
)
tables
->
table
->
tmp_table
)
)
continue
;
continue
;
if
((
thd
->
master_access
&
want_access
)
==
(
want_access
&
~
EXTRA_ACL
)
&&
if
((
thd
->
master_access
&
want_access
)
==
(
want_access
&
~
EXTRA_ACL
)
&&
thd
->
db
)
thd
->
db
)
...
@@ -2735,7 +2735,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
...
@@ -2735,7 +2735,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
found
=
1
;
found
=
1
;
}
}
}
}
else
if
(
tables
->
db
&&
check_access
(
thd
,
want_access
,
tables
->
db
,
&
tables
->
grant
.
privilege
,
else
if
(
check_access
(
thd
,
want_access
,
tables
->
db
,
&
tables
->
grant
.
privilege
,
0
,
no_errors
))
0
,
no_errors
))
return
TRUE
;
return
TRUE
;
}
}
...
...
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