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
7bebde1f
Commit
7bebde1f
authored
Dec 10, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix according to review
parent
09a44a23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
client/mysqldump.c
client/mysqldump.c
+2
-2
sql/sql_acl.cc
sql/sql_acl.cc
+4
-0
sql/sql_show.cc
sql/sql_show.cc
+31
-12
No files found.
client/mysqldump.c
View file @
7bebde1f
...
...
@@ -1936,8 +1936,8 @@ static int dump_databases(char **db_names)
static
int
init_dumping
(
char
*
database
)
{
if
(
mysql_get_server_version
(
sock
)
>=
50003
&&
!
strcmp
(
database
,
"information_schema"
))
return
1
;
!
my_strcasecmp
(
&
my_charset_latin1
,
database
,
"information_schema"
))
return
1
;
if
(
mysql_select_db
(
sock
,
database
))
{
...
...
sql/sql_acl.cc
View file @
7bebde1f
...
...
@@ -4673,6 +4673,10 @@ int fill_schema_table_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
if
(
table_access
)
{
ulong
test_access
=
table_access
&
~
GRANT_ACL
;
/*
We should skip 'usage' privilege on table if
we have any privileges on column(s) of this table
*/
if
(
!
test_access
&&
grant_table
->
cols
)
continue
;
if
(
!
(
table_access
&
GRANT_ACL
))
...
...
sql/sql_show.cc
View file @
7bebde1f
...
...
@@ -1941,13 +1941,33 @@ static COND * make_cond_for_info_schema(COND *cond, TABLE_LIST *table)
}
int
schema_db_add
(
THD
*
thd
,
List
<
char
>
*
files
,
const
char
*
wild
)
/*
Add 'information_schema' name to db_names list
SYNOPSIS
schema_db_add()
thd thread handler
files list of db names
wild wild string
with_i_schema returns 1 if we added 'IS' name to list
otherwise returns 0
RETURN
1 error
0 success
*/
int
schema_db_add
(
THD
*
thd
,
List
<
char
>
*
files
,
const
char
*
wild
,
bool
*
with_i_schema
)
{
if
(
wild
&&
wild_compare
(
information_schema_name
.
str
,
wild
,
0
))
return
0
;
if
(
files
->
push_back
(
thd
->
strdup
(
information_schema_name
.
str
)))
return
-
1
;
return
1
;
*
with_i_schema
=
0
;
if
(
!
wild
||
!
wild_compare
(
information_schema_name
.
str
,
wild
,
0
))
{
*
with_i_schema
=
1
;
if
(
files
->
push_back
(
thd
->
strdup
(
information_schema_name
.
str
)))
return
1
;
}
return
0
;
}
...
...
@@ -2006,7 +2026,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
INDEX_FIELD_VALUES
idx_field_vals
;
char
path
[
FN_REFLEN
],
*
end
=
0
,
*
base_name
,
*
file_name
;
uint
len
=
0
;
int
with_i_schema
;
bool
with_i_schema
;
List
<
char
>
bases
;
lex
->
all_selects_list
=
&
sel
;
enum
enum_schema_tables
schema_table_idx
=
...
...
@@ -2017,8 +2037,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
get_index_field_values
(
lex
,
&
idx_field_vals
);
/* information schema name always is first in list */
with_i_schema
=
schema_db_add
(
thd
,
&
bases
,
idx_field_vals
.
db_value
);
if
(
with_i_schema
<
0
)
if
(
schema_db_add
(
thd
,
&
bases
,
idx_field_vals
.
db_value
,
&
with_i_schema
))
return
1
;
if
(
mysql_find_files
(
thd
,
&
bases
,
NullS
,
mysql_data_home
,
...
...
@@ -2142,13 +2161,13 @@ int fill_schema_shemata(THD *thd, TABLE_LIST *tables, COND *cond)
List
<
char
>
files
;
char
*
file_name
;
uint
length
;
int
with_i_schema
;
bool
with_i_schema
;
HA_CREATE_INFO
create
;
TABLE
*
table
=
tables
->
table
;
get_index_field_values
(
thd
->
lex
,
&
idx_field_vals
);
with_i_schema
=
schema_db_add
(
thd
,
&
files
,
idx_field_vals
.
db_value
);
if
(
with_i_schema
<
0
)
/* information schema name always is first in list */
if
(
schema_db_add
(
thd
,
&
files
,
idx_field_vals
.
db_value
,
&
with_i_schema
)
)
return
1
;
if
(
mysql_find_files
(
thd
,
&
files
,
NullS
,
mysql_data_home
,
idx_field_vals
.
db_value
,
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