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
c84eeefe
Commit
c84eeefe
authored
Sep 07, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support of view to COM_FIELD_LIST added (BUG#5145)
parent
481e8954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
sql/sql_parse.cc
sql/sql_parse.cc
+11
-0
sql/sql_show.cc
sql/sql_show.cc
+7
-2
No files found.
sql/sql_parse.cc
View file @
c84eeefe
...
@@ -1327,6 +1327,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1327,6 +1327,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
this so that they will not get logged to the slow query log
this so that they will not get logged to the slow query log
*/
*/
thd
->
slow_command
=
FALSE
;
thd
->
slow_command
=
FALSE
;
thd
->
lex
->
sql_command
=
SQLCOM_END
;
/* to avoid confusing VIEW detectors */
thd
->
set_time
();
thd
->
set_time
();
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
thd
->
query_id
=
query_id
;
thd
->
query_id
=
query_id
;
...
@@ -1570,7 +1571,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
...
@@ -1570,7 +1571,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if
(
grant_option
&&
if
(
grant_option
&&
check_grant
(
thd
,
SELECT_ACL
,
&
table_list
,
2
,
UINT_MAX
,
0
))
check_grant
(
thd
,
SELECT_ACL
,
&
table_list
,
2
,
UINT_MAX
,
0
))
break
;
break
;
/* switch on VIEW optimisation: do not fill temporary tables */
thd
->
lex
->
sql_command
=
SQLCOM_SHOW_FIELDS
;
/* init structures for VIEW processing */
table_list
.
select_lex
=
&
(
thd
->
lex
->
select_lex
);
mysql_init_query
(
thd
,
(
uchar
*
)
""
,
0
);
thd
->
lex
->
select_lex
.
table_list
.
link_in_list
((
byte
*
)
&
table_list
,
(
byte
**
)
&
table_list
.
next_local
);
mysqld_list_fields
(
thd
,
&
table_list
,
fields
);
mysqld_list_fields
(
thd
,
&
table_list
,
fields
);
thd
->
lex
->
unit
.
cleanup
();
free_items
(
thd
->
free_list
);
free_items
(
thd
->
free_list
);
thd
->
free_list
=
0
;
/* free_list should never point to garbage */
thd
->
free_list
=
0
;
/* free_list should never point to garbage */
break
;
break
;
...
...
sql/sql_show.cc
View file @
c84eeefe
...
@@ -1124,14 +1124,19 @@ void
...
@@ -1124,14 +1124,19 @@ void
mysqld_list_fields
(
THD
*
thd
,
TABLE_LIST
*
table_list
,
const
char
*
wild
)
mysqld_list_fields
(
THD
*
thd
,
TABLE_LIST
*
table_list
,
const
char
*
wild
)
{
{
TABLE
*
table
;
TABLE
*
table
;
int
res
;
DBUG_ENTER
(
"mysqld_list_fields"
);
DBUG_ENTER
(
"mysqld_list_fields"
);
DBUG_PRINT
(
"enter"
,(
"table: %s"
,
table_list
->
real_name
));
DBUG_PRINT
(
"enter"
,(
"table: %s"
,
table_list
->
real_name
));
if
(
!
(
table
=
open_ltable
(
thd
,
table_list
,
TL_UNLOCK
)))
table_list
->
lock_type
=
TL_UNLOCK
;
if
((
res
=
open_and_lock_tables
(
thd
,
table_list
)))
{
{
send_error
(
thd
);
if
(
res
<
0
)
send_error
(
thd
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
table
=
table_list
->
table
;
List
<
Item
>
field_list
;
List
<
Item
>
field_list
;
Field
**
ptr
,
*
field
;
Field
**
ptr
,
*
field
;
...
...
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