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
c8ff8ec1
Commit
c8ff8ec1
authored
Feb 04, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beautify SHOW INDEX
parent
9d1f86a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+5
-1
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+1
-0
sql/sql_show.cc
sql/sql_show.cc
+2
-3
No files found.
mysql-test/r/fulltext.result
View file @
c8ff8ec1
...
...
@@ -5,6 +5,10 @@ INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
('Only MyISAM tables','support collections'),
('Function MATCH ... AGAINST()','is used to do a search'),
('Full-text search in MySQL', 'implements vector space model');
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A NULL NULL NULL YES FULLTEXT
t1 1 a 2 b A NULL NULL NULL YES FULLTEXT
select * from t1 where MATCH(a,b) AGAINST ("collections");
a b
Only MyISAM tables support collections
...
...
@@ -183,7 +187,7 @@ id
show keys from t2;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t2 1 tig 1 ticket A NULL NULL NULL YES BTREE
t2 1 tix 1 inhalt A NULL
1
NULL YES FULLTEXT
t2 1 tix 1 inhalt A NULL
NULL
NULL YES FULLTEXT
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
...
...
mysql-test/t/fulltext.test
View file @
c8ff8ec1
...
...
@@ -10,6 +10,7 @@ INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
(
'Only MyISAM tables'
,
'support collections'
),
(
'Function MATCH ... AGAINST()'
,
'is used to do a search'
),
(
'Full-text search in MySQL'
,
'implements vector space model'
);
SHOW
INDEX
FROM
t1
;
# nl search
...
...
sql/sql_show.cc
View file @
c8ff8ec1
...
...
@@ -726,9 +726,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list)
net_store_null
(
packet
);
/* Check if we have a key part that only uses part of the field */
if
(
!
key_part
->
field
||
key_part
->
length
!=
table
->
field
[
key_part
->
fieldnr
-
1
]
->
key_length
())
if
(
!
(
key_info
->
flags
&
HA_FULLTEXT
)
&&
(
!
key_part
->
field
||
key_part
->
length
!=
table
->
field
[
key_part
->
fieldnr
-
1
]
->
key_length
()))
{
end
=
int10_to_str
((
long
)
key_part
->
length
,
buff
,
10
);
/* purecov: inspected */
net_store_data
(
packet
,
convert
,
buff
,(
uint
)
(
end
-
buff
));
/* purecov: inspected */
...
...
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