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
c06b791b
Commit
c06b791b
authored
Oct 23, 2009
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#39270 I_S optimization algorithm does not work properly in some cases
backport to Betony
parent
97454987
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
8 deletions
+40
-8
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+18
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+15
-3
sql/sql_show.cc
sql/sql_show.cc
+7
-5
No files found.
mysql-test/r/information_schema.result
View file @
c06b791b
...
...
@@ -1681,3 +1681,21 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
LOCK TABLES t1 READ, information_schema.tables READ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE t1;
EXPLAIN SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE KEY_COLUMN_USAGE ALL NULL NULL NULL NULL NULL Open_full_table; Scanned all databases
EXPLAIN SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PARTITIONS ALL NULL TABLE_NAME NULL NULL NULL Using where; Open_full_table; Scanned 1 database
EXPLAIN SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
WHERE CONSTRAINT_SCHEMA='test';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE REFERENTIAL_CONSTRAINTS ALL NULL CONSTRAINT_SCHEMA NULL NULL NULL Using where; Open_full_table; Scanned 1 database
EXPLAIN SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE TABLE_NAME='t1' and TABLE_SCHEMA='test';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE TABLE_CONSTRAINTS ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL Using where; Open_full_table; Scanned 0 databases
EXPLAIN SELECT * FROM INFORMATION_SCHEMA.TRIGGERS
WHERE EVENT_OBJECT_SCHEMA='test';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE TRIGGERS ALL NULL EVENT_OBJECT_SCHEMA NULL NULL NULL Using where; Open_full_table; Scanned 1 database
mysql-test/t/information_schema.test
View file @
c06b791b
...
...
@@ -1391,9 +1391,6 @@ SET TIMESTAMP=DEFAULT;
--
echo
End
of
5.1
tests
.
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
#
# Bug#24062 Incorrect error msg after execute DROP TABLE IF EXISTS on information_schema
#
...
...
@@ -1431,3 +1428,18 @@ DROP TABLE t1, information_schema.tables;
--
error
ER_DBACCESS_DENIED_ERROR
LOCK
TABLES
t1
READ
,
information_schema
.
tables
READ
;
DROP
TABLE
t1
;
#
# Bug#39270 I_S optimization algorithm does not work properly in some cases
#
EXPLAIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
KEY_COLUMN_USAGE
;
EXPLAIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
PARTITIONS
WHERE
TABLE_NAME
=
't1'
;
EXPLAIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
REFERENTIAL_CONSTRAINTS
WHERE
CONSTRAINT_SCHEMA
=
'test'
;
EXPLAIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
TABLE_CONSTRAINTS
WHERE
TABLE_NAME
=
't1'
and
TABLE_SCHEMA
=
'test'
;
EXPLAIN
SELECT
*
FROM
INFORMATION_SCHEMA
.
TRIGGERS
WHERE
EVENT_OBJECT_SCHEMA
=
'test'
;
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
sql/sql_show.cc
View file @
c06b791b
...
...
@@ -6717,11 +6717,12 @@ ST_SCHEMA_TABLE schema_tables[]=
fill_variables
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"KEY_COLUMN_USAGE"
,
key_column_usage_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_schema_key_column_usage_record
,
4
,
5
,
0
,
OPEN_TABLE_ONLY
},
OP
TIMIZE_I_S_TABLE
|
OP
EN_TABLE_ONLY
},
{
"OPEN_TABLES"
,
open_tables_fields_info
,
create_schema_table
,
fill_open_tables
,
make_old_format
,
0
,
-
1
,
-
1
,
1
,
0
},
{
"PARTITIONS"
,
partitions_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_schema_partitions_record
,
1
,
2
,
0
,
OPEN_TABLE_ONLY
},
get_all_tables
,
0
,
get_schema_partitions_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"PLUGINS"
,
plugin_fields_info
,
create_schema_table
,
fill_plugins
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"PROCESSLIST"
,
processlist_fields_info
,
create_schema_table
,
...
...
@@ -6731,7 +6732,7 @@ ST_SCHEMA_TABLE schema_tables[]=
NULL
,
-
1
,
-
1
,
false
,
0
},
{
"REFERENTIAL_CONSTRAINTS"
,
referential_constraints_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_referential_constraints_record
,
1
,
9
,
0
,
OPEN_TABLE_ONLY
},
1
,
9
,
0
,
OP
TIMIZE_I_S_TABLE
|
OP
EN_TABLE_ONLY
},
{
"ROUTINES"
,
proc_fields_info
,
create_schema_table
,
fill_schema_proc
,
make_proc_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"SCHEMATA"
,
schema_fields_info
,
create_schema_table
,
...
...
@@ -6751,14 +6752,15 @@ ST_SCHEMA_TABLE schema_tables[]=
get_all_tables
,
make_old_format
,
get_schema_tables_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
},
{
"TABLE_CONSTRAINTS"
,
table_constraints_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_schema_constraints_record
,
3
,
4
,
0
,
OPEN_TABLE_ONLY
},
get_all_tables
,
0
,
get_schema_constraints_record
,
3
,
4
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"TABLE_NAMES"
,
table_names_fields_info
,
create_schema_table
,
get_all_tables
,
make_table_names_old_format
,
0
,
1
,
2
,
1
,
0
},
{
"TABLE_PRIVILEGES"
,
table_privileges_fields_info
,
create_schema_table
,
fill_schema_table_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"TRIGGERS"
,
triggers_fields_info
,
create_schema_table
,
get_all_tables
,
make_old_format
,
get_schema_triggers_record
,
5
,
6
,
0
,
OPEN_TABLE_ONLY
},
OP
TIMIZE_I_S_TABLE
|
OP
EN_TABLE_ONLY
},
{
"USER_PRIVILEGES"
,
user_privileges_fields_info
,
create_schema_table
,
fill_schema_user_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"VARIABLES"
,
variables_fields_info
,
create_schema_table
,
fill_variables
,
...
...
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