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
89adb79a
Commit
89adb79a
authored
Nov 11, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small bug fix
parent
d96c670c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
sql/sql_derived.cc
sql/sql_derived.cc
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+9
-7
No files found.
sql/sql_derived.cc
View file @
89adb79a
...
@@ -111,6 +111,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
...
@@ -111,6 +111,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
t
->
real_name
=
table
->
real_name
;
t
->
real_name
=
table
->
real_name
;
t
->
table
=
table
;
t
->
table
=
table
;
table
->
derived_select_number
=
sl
->
select_number
;
table
->
derived_select_number
=
sl
->
select_number
;
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
=
(
tables
&&
tables
->
db
&&
tables
->
db
[
0
])
?
t
->
db
:
thd
->
db
;
...
...
sql/sql_parse.cc
View file @
89adb79a
...
@@ -1332,13 +1332,18 @@ mysql_execute_command(THD *thd)
...
@@ -1332,13 +1332,18 @@ mysql_execute_command(THD *thd)
TODO: make derived tables processing 'inside' SELECT processing.
TODO: make derived tables processing 'inside' SELECT processing.
TODO: solve problem with depended derived tables in subselects
TODO: solve problem with depended derived tables in subselects
*/
*/
if
(
lex
->
derived_tables
)
if
((
lex
->
select_lex
.
next_select_in_list
()
&&
lex
->
unit
.
create_total_list
(
thd
,
lex
,
&
tables
))
||
(
table_rules_on
&&
tables
&&
thd
->
slave_thread
&&
!
tables_ok
(
thd
,
tables
)))
DBUG_VOID_RETURN
;
if
(
lex
->
derived_tables
)
{
{
for
(
TABLE_LIST
*
cursor
=
tables
;
for
(
TABLE_LIST
*
cursor
=
tables
;
cursor
;
cursor
;
cursor
=
cursor
->
next
)
cursor
=
cursor
->
next
)
if
(
cursor
->
derived
&&
(
res
=
mysql_derived
(
thd
,
lex
,
if
(
cursor
->
derived
&&
(
res
=
mysql_derived
(
thd
,
lex
,
(
SELECT_LEX_UNIT
*
)
cursor
->
derived
,
(
SELECT_LEX_UNIT
*
)
cursor
->
derived
,
cursor
)))
cursor
)))
{
{
if
(
res
<
0
)
if
(
res
<
0
)
...
@@ -1346,11 +1351,6 @@ if (lex->derived_tables)
...
@@ -1346,11 +1351,6 @@ if (lex->derived_tables)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
}
}
if
((
lex
->
select_lex
.
next_select_in_list
()
&&
lex
->
unit
.
create_total_list
(
thd
,
lex
,
&
tables
))
||
(
table_rules_on
&&
tables
&&
thd
->
slave_thread
&&
!
tables_ok
(
thd
,
tables
)))
DBUG_VOID_RETURN
;
thread_safe_increment
(
com_stat
[
lex
->
sql_command
],
&
LOCK_status
);
thread_safe_increment
(
com_stat
[
lex
->
sql_command
],
&
LOCK_status
);
switch
(
lex
->
sql_command
)
{
switch
(
lex
->
sql_command
)
{
...
@@ -2717,6 +2717,8 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
...
@@ -2717,6 +2717,8 @@ 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
)
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
)
tables
->
grant
.
privilege
=
want_access
;
tables
->
grant
.
privilege
=
want_access
;
...
...
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