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
1919d238
Commit
1919d238
authored
Feb 01, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mbp.local:/Users/kaa/src/opt/bug25162/my50-bug25162
into mbp.local:/Users/kaa/src/opt/mysql-5.0-opt
parents
754c3f51
4d794c23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
mysql-test/r/create.result
mysql-test/r/create.result
+14
-0
mysql-test/t/create.test
mysql-test/t/create.test
+24
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-3
No files found.
mysql-test/r/create.result
View file @
1919d238
...
...
@@ -1532,4 +1532,18 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 7
drop table t1,t2;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
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 c1 1 c1 NULL 0 NULL NULL YES HASH
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
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 c1 1 c1 A NULL NULL NULL YES BTREE
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/create.test
View file @
1919d238
...
...
@@ -1148,4 +1148,28 @@ create table t2 select sql_big_result f1,count(f2) from t1 group by f1;
show
status
like
'handler_read%'
;
drop
table
t1
,
t2
;
#
# Bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs on table creates
#
# Show that the old syntax for index type is supported
CREATE
TABLE
t1
(
c1
VARCHAR
(
33
),
KEY
USING
BTREE
(
c1
));
DROP
TABLE
t1
;
# Show that the new syntax for index type is supported
CREATE
TABLE
t1
(
c1
VARCHAR
(
33
),
KEY
(
c1
)
USING
BTREE
);
DROP
TABLE
t1
;
# Show that in case of multiple index type definitions, the last one takes
# precedence
CREATE
TABLE
t1
(
c1
VARCHAR
(
33
),
KEY
USING
BTREE
(
c1
)
USING
HASH
)
ENGINE
=
MEMORY
;
SHOW
INDEX
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
c1
VARCHAR
(
33
),
KEY
USING
HASH
(
c1
)
USING
BTREE
)
ENGINE
=
MEMORY
;
SHOW
INDEX
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/sql_yacc.yy
View file @
1919d238
...
...
@@ -2982,15 +2982,15 @@ column_def:
;
key_def:
key_type opt_ident key_alg '(' key_list ')'
key_type opt_ident key_alg '(' key_list ')'
key_alg
{
LEX *lex=Lex;
Key *key= new Key($1, $2, $3, 0, lex->col_list);
Key *key= new Key($1, $2, $
7 ? $7 : $
3, 0, lex->col_list);
lex->alter_info.key_list.push_back(key);
lex->col_list.empty(); /* Alloced by sql_alloc */
}
| opt_constraint constraint_key_type opt_ident key_alg '(' key_list ')'
| opt_constraint constraint_key_type opt_ident key_alg '(' key_list ')'
key_alg
{
LEX *lex=Lex;
const char *key_name= $3 ? $3:$1;
...
...
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