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
f78ae59f
Commit
f78ae59f
authored
Mar 20, 2006
by
gluh@eagle.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug#18224 VIEW on information_schema crashes the server
additional check for subselect
parent
a184a00e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+7
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+5
-0
sql/sql_show.cc
sql/sql_show.cc
+2
-1
No files found.
mysql-test/r/information_schema.result
View file @
f78ae59f
...
@@ -281,6 +281,13 @@ sub1 sub1
...
@@ -281,6 +281,13 @@ sub1 sub1
select count(*) from information_schema.ROUTINES;
select count(*) from information_schema.ROUTINES;
count(*)
count(*)
2
2
create view v1 as select routine_schema, routine_name from information_schema.routines
order by routine_schema, routine_name;
select * from v1;
routine_schema routine_name
test sel2
test sub1
drop view v1;
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES;
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES;
ROUTINE_NAME ROUTINE_DEFINITION
ROUTINE_NAME ROUTINE_DEFINITION
show create function sub1;
show create function sub1;
...
...
mysql-test/t/information_schema.test
View file @
f78ae59f
...
@@ -142,6 +142,11 @@ select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
...
@@ -142,6 +142,11 @@ select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
mysql
.
proc
b
where
a
.
ROUTINE_NAME
=
convert
(
b
.
name
using
utf8
)
order
by
1
;
mysql
.
proc
b
where
a
.
ROUTINE_NAME
=
convert
(
b
.
name
using
utf8
)
order
by
1
;
select
count
(
*
)
from
information_schema
.
ROUTINES
;
select
count
(
*
)
from
information_schema
.
ROUTINES
;
create
view
v1
as
select
routine_schema
,
routine_name
from
information_schema
.
routines
order
by
routine_schema
,
routine_name
;
select
*
from
v1
;
drop
view
v1
;
connect
(
user1
,
localhost
,
mysqltest_1
,,);
connect
(
user1
,
localhost
,
mysqltest_1
,,);
connection
user1
;
connection
user1
;
select
ROUTINE_NAME
,
ROUTINE_DEFINITION
from
information_schema
.
ROUTINES
;
select
ROUTINE_NAME
,
ROUTINE_DEFINITION
from
information_schema
.
ROUTINES
;
...
...
sql/sql_show.cc
View file @
f78ae59f
...
@@ -3864,7 +3864,8 @@ bool get_schema_tables_result(JOIN *join)
...
@@ -3864,7 +3864,8 @@ bool get_schema_tables_result(JOIN *join)
TABLE_LIST
*
table_list
=
tab
->
table
->
pos_in_table_list
;
TABLE_LIST
*
table_list
=
tab
->
table
->
pos_in_table_list
;
if
(
table_list
->
schema_table
&&
thd
->
fill_derived_tables
())
if
(
table_list
->
schema_table
&&
thd
->
fill_derived_tables
())
{
{
bool
is_subselect
=
(
&
lex
->
unit
!=
lex
->
current_select
->
master_unit
());
bool
is_subselect
=
(
&
lex
->
unit
!=
lex
->
current_select
->
master_unit
()
&&
lex
->
current_select
->
master_unit
()
->
item
);
/*
/*
The schema table is already processed and
The schema table is already processed and
the statement is not a subselect.
the statement is not a subselect.
...
...
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