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
4c4352e5
Commit
4c4352e5
authored
Dec 14, 2004
by
gluh@gluh.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fx for bug#7221: information_schema: errors in "key_column_usage"
parent
7a38322f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
22 deletions
+11
-22
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+6
-6
mysql-test/r/information_schema_inno.result
mysql-test/r/information_schema_inno.result
+5
-5
sql/sql_show.cc
sql/sql_show.cc
+0
-11
No files found.
mysql-test/r/information_schema.result
View file @
4c4352e5
...
@@ -390,11 +390,11 @@ NULL test key_1 test t1 UNIQUE
...
@@ -390,11 +390,11 @@ NULL test key_1 test t1 UNIQUE
NULL test key_2 test t1 UNIQUE
NULL test key_2 test t1 UNIQUE
select * from information_schema.KEY_COLUMN_USAGE where
select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test";
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
NULL test PRIMARY NULL test t1 a 1 NULL
NULL NULL NULL
NULL test PRIMARY NULL test t1 a 1 NULL
NULL test constraint_1 NULL test t1 a 1 NULL
NULL NULL NULL
NULL test constraint_1 NULL test t1 a 1 NULL
NULL test key_1 NULL test t1 a 1 NULL
NULL NULL NULL
NULL test key_1 NULL test t1 a 1 NULL
NULL test key_2 NULL test t1 a 1 NULL
NULL NULL NULL
NULL test key_2 NULL test t1 a 1 NULL
select table_name from information_schema.TABLES where table_schema like "test%";
select table_name from information_schema.TABLES where table_schema like "test%";
table_name
table_name
t1
t1
...
@@ -559,7 +559,7 @@ TABLE_NAME= "vo";
...
@@ -559,7 +559,7 @@ TABLE_NAME= "vo";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
select * from information_schema.KEY_COLUMN_USAGE where
select * from information_schema.KEY_COLUMN_USAGE where
TABLE_NAME= "vo";
TABLE_NAME= "vo";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
drop view vo;
drop view vo;
select TABLE_NAME,TABLE_TYPE,ENGINE
select TABLE_NAME,TABLE_TYPE,ENGINE
from information_schema.tables
from information_schema.tables
...
...
mysql-test/r/information_schema_inno.result
View file @
4c4352e5
...
@@ -11,9 +11,9 @@ NULL test t2_ibfk_1 test t2 FOREIGN KEY
...
@@ -11,9 +11,9 @@ NULL test t2_ibfk_1 test t2 FOREIGN KEY
NULL test t2_ibfk_2 test t2 FOREIGN KEY
NULL test t2_ibfk_2 test t2 FOREIGN KEY
select * from information_schema.KEY_COLUMN_USAGE where
select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test";
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
NULL test PRIMARY NULL test t1 id 1 NULL
NULL NULL NULL
NULL test PRIMARY NULL test t1 id 1 NULL
NULL test PRIMARY NULL test t2 id 1 NULL
NULL NULL NULL
NULL test PRIMARY NULL test t2 id 1 NULL
NULL test t2_ibfk_1 NULL test t2 t1_id 1 1
test t1 id
NULL test t2_ibfk_1 NULL test t2 t1_id 1 1
NULL test t2_ibfk_2 NULL test t2 t1_id 1 1
test t1 id
NULL test t2_ibfk_2 NULL test t2 t1_id 1 1
drop table t2, t1;
drop table t2, t1;
sql/sql_show.cc
View file @
4c4352e5
...
@@ -2979,14 +2979,6 @@ static int get_schema_key_column_usage_record(THD *thd,
...
@@ -2979,14 +2979,6 @@ static int get_schema_key_column_usage_record(THD *thd,
(
longlong
)
f_idx
);
(
longlong
)
f_idx
);
table
->
field
[
8
]
->
store
((
longlong
)
f_idx
);
table
->
field
[
8
]
->
store
((
longlong
)
f_idx
);
table
->
field
[
8
]
->
set_notnull
();
table
->
field
[
8
]
->
set_notnull
();
table
->
field
[
9
]
->
store
(
f_key_info
->
referenced_db
->
str
,
f_key_info
->
referenced_db
->
length
,
cs
);
table
->
field
[
9
]
->
set_notnull
();
table
->
field
[
10
]
->
store
(
f_key_info
->
referenced_table
->
str
,
f_key_info
->
referenced_table
->
length
,
cs
);
table
->
field
[
10
]
->
set_notnull
();
table
->
field
[
11
]
->
store
(
r_info
->
str
,
r_info
->
length
,
cs
);
table
->
field
[
11
]
->
set_notnull
();
table
->
file
->
write_row
(
table
->
record
[
0
]);
table
->
file
->
write_row
(
table
->
record
[
0
]);
}
}
}
}
...
@@ -3602,9 +3594,6 @@ ST_FIELD_INFO key_column_usage_fields_info[]=
...
@@ -3602,9 +3594,6 @@ ST_FIELD_INFO key_column_usage_fields_info[]=
{
"COLUMN_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"COLUMN_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"ORDINAL_POSITION"
,
10
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"ORDINAL_POSITION"
,
10
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"POSITION_IN_UNIQUE_CONSTRAINT"
,
10
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
},
{
"POSITION_IN_UNIQUE_CONSTRAINT"
,
10
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
},
{
"REFERENCED_TABLE_SCHEMA"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
},
{
"REFERENCED_TABLE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
},
{
"REFERENCED_COLUMN_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
}
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
}
};
};
...
...
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