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
6fdc6846
Commit
6fdc6846
authored
Aug 15, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mariadb-10.4.31 into 10.4
parents
9c8ae6dc
2aea9387
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
mysql-test/suite/innodb/r/fk_col_alter.result
mysql-test/suite/innodb/r/fk_col_alter.result
+7
-0
mysql-test/suite/innodb/t/fk_col_alter.test
mysql-test/suite/innodb/t/fk_col_alter.test
+8
-0
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+13
-6
No files found.
mysql-test/suite/innodb/r/fk_col_alter.result
View file @
6fdc6846
...
...
@@ -75,3 +75,10 @@ ALTER TABLE t1 MODIFY msg VARCHAR(200) CHARSET utf8mb4, ALGORITHM=COPY;
ALTER TABLE t2 ADD CONSTRAINT FOREIGN KEY (msg) REFERENCES t1(msg), aLGORITHM=INPLACE;
SET FOREIGN_KEY_CHECKS=1;
DROP TABLE t2, t1;
#
# MDEV-31869 Server aborts when table does drop column
#
CREATE TABLE t (a VARCHAR(40), b INT, C INT) ENGINE=InnoDB;
ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
DROP TABLE t;
# End of 10.4 tests
mysql-test/suite/innodb/t/fk_col_alter.test
View file @
6fdc6846
...
...
@@ -104,3 +104,11 @@ ALTER TABLE t2 ADD CONSTRAINT FOREIGN KEY (msg) REFERENCES t1(msg), aLGORITHM=IN
SET
FOREIGN_KEY_CHECKS
=
1
;
DROP
TABLE
t2
,
t1
;
--
echo
#
--
echo
# MDEV-31869 Server aborts when table does drop column
--
echo
#
CREATE
TABLE
t
(
a
VARCHAR
(
40
),
b
INT
,
C
INT
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t
MODIFY
a
VARCHAR
(
50
),
DROP
b
;
DROP
TABLE
t
;
--
echo
# End of 10.4 tests
storage/innobase/handler/handler0alter.cc
View file @
6fdc6846
...
...
@@ -8330,14 +8330,21 @@ ha_innobase::prepare_inplace_alter_table(
index columns are modified */
if
(
ha_alter_info
->
handler_flags
&
ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
)
{
List_iterator
<
Create_field
>
it
(
ha_alter_info
->
alter_info
->
create_list
);
for
(
uint
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
for
(
uint
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
Field
*
field
=
table
->
field
[
i
];
Create_field
*
f
=
it
++
;
if
(
!
f
->
field
||
field
->
is_equal
(
*
f
))
continue
;
for
(
const
Create_field
&
new_field
:
ha_alter_info
->
alter_info
->
create_list
)
{
if
(
new_field
.
field
==
field
)
{
if
(
!
field
->
is_equal
(
new_field
))
{
goto
field_changed
;
}
break
;
}
}
continue
;
field_changed:
const
char
*
col_name
=
field
->
field_name
.
str
;
dict_col_t
*
col
=
dict_table_get_nth_col
(
m_prebuilt
->
table
,
i
);
...
...
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