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
9a9faeb0
Commit
9a9faeb0
authored
Jan 13, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b2361
parents
0c91129a
646d6925
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+9
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+9
-0
sql/sql_table.cc
sql/sql_table.cc
+5
-3
No files found.
mysql-test/r/alter_table.result
View file @
9a9faeb0
...
@@ -412,3 +412,12 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
...
@@ -412,3 +412,12 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int UNIQUE);
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL,
UNIQUE KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
mysql-test/t/alter_table.test
View file @
9a9faeb0
...
@@ -244,3 +244,12 @@ LOCK TABLES t1 WRITE;
...
@@ -244,3 +244,12 @@ LOCK TABLES t1 WRITE;
ALTER
TABLE
t1
DISABLE
KEYS
;
ALTER
TABLE
t1
DISABLE
KEYS
;
SHOW
INDEX
FROM
t1
;
SHOW
INDEX
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug 2361
#
CREATE
TABLE
t1
(
a
int
UNIQUE
);
ALTER
TABLE
t1
DROP
PRIMARY
KEY
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
sql/sql_table.cc
View file @
9a9faeb0
...
@@ -2242,13 +2242,15 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -2242,13 +2242,15 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
KEY
*
key_info
=
table
->
key_info
;
KEY
*
key_info
=
table
->
key_info
;
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
{
{
if
(
drop_primary
&&
(
key_info
->
flags
&
HA_NOSAME
))
char
*
key_name
=
key_info
->
name
;
if
(
drop_primary
&&
!
my_strcasecmp
(
system_charset_info
,
key_name
,
"PRIMARY"
))
{
{
drop_primary
=
0
;
drop_primary
=
0
;
continue
;
continue
;
}
}
char
*
key_name
=
key_info
->
name
;
Alter_drop
*
drop
;
Alter_drop
*
drop
;
drop_it
.
rewind
();
drop_it
.
rewind
();
while
((
drop
=
drop_it
++
))
while
((
drop
=
drop_it
++
))
...
...
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