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
a8efd33a
Commit
a8efd33a
authored
Jul 07, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/bug11635/my41-bug11635
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
parents
61db7856
50133499
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
15 deletions
+39
-15
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+4
-4
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+20
-5
mysql-test/r/sql_mode.result
mysql-test/r/sql_mode.result
+3
-3
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+9
-0
sql/sql_show.cc
sql/sql_show.cc
+3
-3
No files found.
mysql-test/r/ctype_utf8.result
View file @
a8efd33a
...
...
@@ -412,7 +412,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 default NULL,
UNIQUE KEY `a`
TYPE
HASH (`c`(1))
UNIQUE KEY `a`
USING
HASH (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
...
...
@@ -448,7 +448,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 default NULL,
UNIQUE KEY `a`
TYPE
BTREE (`c`(1))
UNIQUE KEY `a`
USING
BTREE (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
...
...
@@ -570,7 +570,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 collate utf8_bin default NULL,
UNIQUE KEY `a`
TYPE
HASH (`c`(1))
UNIQUE KEY `a`
USING
HASH (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
...
...
@@ -606,7 +606,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 collate utf8_bin default NULL,
UNIQUE KEY `a`
TYPE
BTREE (`c`(1))
UNIQUE KEY `a`
USING
BTREE (`c`(1))
) ENGINE=HEAP DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
...
...
mysql-test/r/show_check.result
View file @
a8efd33a
...
...
@@ -420,7 +420,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
KEY `i`
TYPE
HASH (`i`)
KEY `i`
USING
HASH (`i`)
) ENGINE=HEAP DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
...
...
@@ -428,7 +428,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
KEY `i`
TYPE
BTREE (`i`)
KEY `i`
USING
BTREE (`i`)
) ENGINE=HEAP DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
...
...
@@ -444,7 +444,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
KEY `i`
TYPE
BTREE (`i`)
KEY `i`
USING
BTREE (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
...
...
@@ -467,14 +467,14 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
KEY `i`
TYPE
BTREE (`i`)
KEY `i`
USING
BTREE (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
KEY `i`
TYPE
BTREE (`i`)
KEY `i`
USING
BTREE (`i`)
) ENGINE=HEAP DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(
...
...
@@ -498,3 +498,18 @@ def Comment 253 255 0 N 129 31 63
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 field1 A 0 1000 NULL BTREE
drop table t1;
create table t1 (
c1 int NOT NULL,
c2 int NOT NULL,
PRIMARY KEY USING HASH (c1),
INDEX USING BTREE(c2)
);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL default '0',
`c2` int(11) NOT NULL default '0',
PRIMARY KEY USING HASH (`c1`),
KEY `c2` USING BTREE (`c2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
mysql-test/r/sql_mode.result
View file @
a8efd33a
...
...
@@ -17,7 +17,7 @@ t1 CREATE TABLE `t1` (
`pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY (`a`),
UNIQUE KEY `email`
TYPE
BTREE (`email`)
UNIQUE KEY `email`
USING
BTREE (`email`)
) ENGINE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set @@sql_mode="ansi_quotes";
show variables like 'sql_mode';
...
...
@@ -30,7 +30,7 @@ t1 CREATE TABLE "t1" (
"pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY ("a"),
UNIQUE KEY "email"
TYPE
BTREE ("email")
UNIQUE KEY "email"
USING
BTREE ("email")
) ENGINE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set @@sql_mode="no_table_options";
show variables like 'sql_mode';
...
...
@@ -43,7 +43,7 @@ t1 CREATE TABLE `t1` (
`pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY (`a`),
UNIQUE KEY `email`
TYPE
BTREE (`email`)
UNIQUE KEY `email`
USING
BTREE (`email`)
)
set @@sql_mode="no_key_options";
show variables like 'sql_mode';
...
...
mysql-test/t/show_check.test
View file @
a8efd33a
...
...
@@ -368,3 +368,12 @@ show index from t1;
--
disable_metadata
drop
table
t1
;
# Test for BUG#11635: mysqldump exports TYPE instead of USING for HASH
create
table
t1
(
c1
int
NOT
NULL
,
c2
int
NOT
NULL
,
PRIMARY
KEY
USING
HASH
(
c1
),
INDEX
USING
BTREE
(
c2
)
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
sql/sql_show.cc
View file @
a8efd33a
...
...
@@ -1414,15 +1414,15 @@ store_create_info(THD *thd, TABLE *table, String *packet)
!
limited_mysql_mode
&&
!
foreign_db_mode
)
{
if
(
key_info
->
algorithm
==
HA_KEY_ALG_BTREE
)
packet
->
append
(
"
TYPE BTREE"
,
11
);
packet
->
append
(
"
USING BTREE"
,
12
);
if
(
key_info
->
algorithm
==
HA_KEY_ALG_HASH
)
packet
->
append
(
"
TYPE HASH"
,
10
);
packet
->
append
(
"
USING HASH"
,
11
);
// +BAR: send USING only in non-default case: non-spatial rtree
if
((
key_info
->
algorithm
==
HA_KEY_ALG_RTREE
)
&&
!
(
key_info
->
flags
&
HA_SPATIAL
))
packet
->
append
(
"
TYPE RTREE"
,
11
);
packet
->
append
(
"
USING RTREE"
,
12
);
// No need to send TYPE FULLTEXT, it is sent as FULLTEXT KEY
}
...
...
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