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
f32ff06f
Commit
f32ff06f
authored
Feb 28, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0-look
parents
bd3d749a
6febc2a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+22
-0
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+16
-0
sql/sql_show.cc
sql/sql_show.cc
+2
-1
No files found.
mysql-test/r/show_check.result
View file @
f32ff06f
...
@@ -233,3 +233,25 @@ c decimal(4,3) YES NULL
...
@@ -233,3 +233,25 @@ c decimal(4,3) YES NULL
d double(4,3) YES NULL
d double(4,3) YES NULL
f float(4,3) YES NULL
f float(4,3) YES NULL
drop table t1;
drop table t1;
CREATE TABLE t1 ( a VARCHAR(20) );
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
CREATE TEMPORARY TABLE t2 ( index (a(20)) ) SELECT a FROM t1 GROUP BY a;
SHOW INDEX FROM t2;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t2 X a X X X NULL X X X BTREE
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
test.t2 analyze status OK
SHOW INDEX FROM t2;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t2 X a X X X 5 X X X BTREE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TEMPORARY TABLE `t2` (
`a` varchar(20) default NULL,
KEY `a` (`a`)
) TYPE=MyISAM
SHOW INDEX FROM t2;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t2 X a X X X 5 X X X BTREE
DROP TEMPORARY TABLE t2;
mysql-test/t/show_check.test
View file @
f32ff06f
...
@@ -131,3 +131,19 @@ drop table t1;
...
@@ -131,3 +131,19 @@ drop table t1;
create
table
t1
(
c
decimal
(
3
,
3
),
d
double
(
3
,
3
),
f
float
(
3
,
3
));
create
table
t1
(
c
decimal
(
3
,
3
),
d
double
(
3
,
3
),
f
float
(
3
,
3
));
show
columns
from
t1
;
show
columns
from
t1
;
drop
table
t1
;
drop
table
t1
;
# Fix for BUG#7519: For temporary tables, SHOW INDEX doesn't display index
# cardinality after ANALYZE.
CREATE
TABLE
t1
(
a
VARCHAR
(
20
)
);
INSERT
INTO
t1
VALUES
(
'one'
),(
'two'
),(
'three'
),(
'four'
),(
'five'
);
CREATE
TEMPORARY
TABLE
t2
(
index
(
a
(
20
))
)
SELECT
a
FROM
t1
GROUP
BY
a
;
--
replace_column
2
X
4
X
5
X
6
X
8
X
9
X
10
X
SHOW
INDEX
FROM
t2
;
ANALYZE
TABLE
t2
;
--
replace_column
2
X
4
X
5
X
6
X
8
X
9
X
10
X
SHOW
INDEX
FROM
t2
;
SHOW
CREATE
TABLE
t2
;
--
replace_column
2
X
4
X
5
X
6
X
8
X
9
X
10
X
SHOW
INDEX
FROM
t2
;
DROP
TEMPORARY
TABLE
t2
;
sql/sql_show.cc
View file @
f32ff06f
...
@@ -686,7 +686,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list)
...
@@ -686,7 +686,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list)
String
*
packet
=
&
thd
->
packet
;
String
*
packet
=
&
thd
->
packet
;
KEY
*
key_info
=
table
->
key_info
;
KEY
*
key_info
=
table
->
key_info
;
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
|
HA_STATUS_TIME
);
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
|
HA_STATUS_TIME
|
HA_STATUS_CONST
);
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
{
{
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
...
...
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