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
9c2a961a
Commit
9c2a961a
authored
Jun 23, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and test case for BUG#3899
parent
ac688684
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+6
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+8
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/alter_table.result
View file @
9c2a961a
...
...
@@ -470,3 +470,9 @@ t1 CREATE TABLE `t1` (
ALTER TABLE t1 DROP PRIMARY KEY;
ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists
DROP TABLE t1;
create table t1 (a int, b int, key(a));
insert into t1 values (1,1), (2,2);
alter table t1 drop key no_such_key;
ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists
alter table t1 drop key a;
drop table t1;
mysql-test/t/alter_table.test
View file @
9c2a961a
...
...
@@ -304,3 +304,11 @@ SHOW CREATE TABLE t1;
--
error
1091
ALTER
TABLE
t1
DROP
PRIMARY
KEY
;
DROP
TABLE
t1
;
# BUG#3899
create
table
t1
(
a
int
,
b
int
,
key
(
a
));
insert
into
t1
values
(
1
,
1
),
(
2
,
2
);
--
error
1091
alter
table
t1
drop
key
no_such_key
;
alter
table
t1
drop
key
a
;
drop
table
t1
;
sql/sql_yacc.yy
View file @
9c2a961a
...
...
@@ -1817,7 +1817,7 @@ alter:
lex->create_info.db_type= DB_TYPE_DEFAULT;
lex->create_info.default_table_charset= thd->variables.collation_database;
lex->create_info.row_type= ROW_TYPE_NOT_USED;
lex->alter_info.
clear
();
lex->alter_info.
reset
();
lex->alter_info.is_simple= 1;
lex->alter_info.flags= 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