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
23e90e9a
Commit
23e90e9a
authored
Apr 10, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'MDEV-7816' of
git://github.com/f4rnham/server
into 10.1
parents
37e87b58
4feaa06c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+10
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+8
-0
sql/sql_table.cc
sql/sql_table.cc
+7
-0
No files found.
mysql-test/r/alter_table.result
View file @
23e90e9a
...
...
@@ -2007,3 +2007,13 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
INSERT INTO t1 SELECT a.* FROM t1 a, t1 b, t1 c, t1 d, t1 e;
ALTER TABLE t1 MODIFY i FLOAT;
DROP TABLE t1;
CREATE TABLE t1(a INT);
CREATE INDEX i1 ON t1(a) COMMENT 'comment1';
ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
KEY `i1` (`a`) COMMENT 'comment2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
mysql-test/t/alter_table.test
View file @
23e90e9a
...
...
@@ -1697,3 +1697,11 @@ INSERT INTO t1 SELECT a.* FROM t1 a, t1 b, t1 c, t1 d, t1 e;
ALTER
TABLE
t1
MODIFY
i
FLOAT
;
DROP
TABLE
t1
;
#
# MDEV-7816 ALTER with DROP INDEX and ADD INDEX .. COMMENT='comment2' ignores the new comment
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
INDEX
i1
ON
t1
(
a
)
COMMENT
'comment1'
;
ALTER
TABLE
t1
DROP
INDEX
i1
,
ADD
INDEX
i1
(
a
)
COMMENT
'comment2'
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
sql/sql_table.cc
View file @
23e90e9a
...
...
@@ -6383,6 +6383,13 @@ static bool fill_alter_inplace_info(THD *thd,
new_field
->
field
->
field_index
!=
key_part
->
fieldnr
-
1
)
goto
index_changed
;
}
/* Check that key comment is not changed. */
if
(
table_key
->
comment
.
length
!=
new_key
->
comment
.
length
||
(
table_key
->
comment
.
length
&&
strcmp
(
table_key
->
comment
.
str
,
new_key
->
comment
.
str
)
!=
0
))
goto
index_changed
;
continue
;
index_changed:
...
...
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