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
75b7fef4
Commit
75b7fef4
authored
May 10, 2005
by
gluh@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#10018: use INFORMATION_SCHEMA works, but show tables in it returns error
additional fix after review
parent
5dee7cfc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
sql/sql_show.cc
sql/sql_show.cc
+16
-3
No files found.
sql/sql_show.cc
View file @
75b7fef4
...
...
@@ -1805,6 +1805,11 @@ int make_db_list(THD *thd, List<char> *files,
get_index_field_values
(
lex
,
idx_field_vals
);
if
(
is_wild_value
)
{
/*
This part of code is only for SHOW DATABASES command.
idx_field_vals->db_value can be 0 when we don't use
LIKE clause (see also get_index_field_values() function)
*/
if
(
!
idx_field_vals
->
db_value
||
!
wild_case_compare
(
system_charset_info
,
information_schema_name
.
str
,
...
...
@@ -1818,11 +1823,15 @@ int make_db_list(THD *thd, List<char> *files,
idx_field_vals
->
db_value
,
1
);
}
/*
This part of code is for SHOW TABLES, SHOW TABLE STATUS commands.
idx_field_vals->db_value can't be 0 (see get_index_field_values()
function). lex->orig_sql_command can be not equal to SQLCOM_END
only in case of executing of SHOW commands.
*/
if
(
lex
->
orig_sql_command
!=
SQLCOM_END
)
{
if
(
!
idx_field_vals
->
db_value
||
!
my_strcasecmp
(
system_charset_info
,
information_schema_name
.
str
,
if
(
!
my_strcasecmp
(
system_charset_info
,
information_schema_name
.
str
,
idx_field_vals
->
db_value
))
{
*
with_i_schema
=
1
;
...
...
@@ -1831,6 +1840,10 @@ int make_db_list(THD *thd, List<char> *files,
return
files
->
push_back
(
thd
->
strdup
(
idx_field_vals
->
db_value
));
}
/*
Create list of existing databases. It is used in case
of select from information schema table
*/
if
(
files
->
push_back
(
thd
->
strdup
(
information_schema_name
.
str
)))
return
1
;
*
with_i_schema
=
1
;
...
...
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