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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cca95478
Commit
cca95478
authored
Oct 16, 2023
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post fix for MDEV-32449
parent
1c554459
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
mysql-test/main/alter_table.result
mysql-test/main/alter_table.result
+6
-0
mysql-test/main/alter_table.test
mysql-test/main/alter_table.test
+8
-0
sql/sql_table.cc
sql/sql_table.cc
+3
-2
No files found.
mysql-test/main/alter_table.result
View file @
cca95478
...
@@ -3118,6 +3118,12 @@ t2 CREATE TABLE `t2` (
...
@@ -3118,6 +3118,12 @@ t2 CREATE TABLE `t2` (
KEY `altcol1` (`altcol1`(2300))
KEY `altcol1` (`altcol1`(2300))
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
drop table t1,t2;
drop table t1,t2;
# Another test for MDEV-32449
CREATE TABLE t1 (a POINT, b POINT, KEY(a)) ENGINE=Aria;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t (b);
CREATE TEMPORARY TABLE t2 LIKE t1;
DROP TEMPORARY TABLE t2;
DROP TABLE t1;
#
#
# End of 10.6 tests
# End of 10.6 tests
#
#
mysql-test/main/alter_table.test
View file @
cca95478
...
@@ -2397,6 +2397,14 @@ show create table t1;
...
@@ -2397,6 +2397,14 @@ show create table t1;
show
create
table
t2
;
show
create
table
t2
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
--
echo
# Another test for MDEV-32449
CREATE
TABLE
t1
(
a
POINT
,
b
POINT
,
KEY
(
a
))
ENGINE
=
Aria
;
ALTER
TABLE
t1
ADD
FOREIGN
KEY
(
a
)
REFERENCES
t
(
b
);
CREATE
TEMPORARY
TABLE
t2
LIKE
t1
;
DROP
TEMPORARY
TABLE
t2
;
DROP
TABLE
t1
;
--
echo
#
--
echo
#
--
echo
# End of 10.6 tests
--
echo
# End of 10.6 tests
--
echo
#
--
echo
#
sql/sql_table.cc
View file @
cca95478
...
@@ -2898,10 +2898,11 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -2898,10 +2898,11 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
key_iterator
.
rewind
();
key_iterator
.
rewind
();
while
((
key
=
key_iterator
++
))
while
((
key
=
key_iterator
++
))
{
{
if
(
key
->
type
==
Key
::
IGNORE_KEY
&&
!
create_info
->
tmp_table
()
)
if
(
key
->
type
==
Key
::
IGNORE_KEY
)
{
{
/* The key was replaced by another key */
/* The key was replaced by another key */
if
(
alter_info
->
add_stat_drop_index
(
thd
,
&
key
->
name
))
if
(
!
create_info
->
tmp_table
()
&&
alter_info
->
add_stat_drop_index
(
thd
,
&
key
->
name
))
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
continue
;
continue
;
}
}
...
...
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