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
b0a43818
Commit
b0a43818
authored
Sep 04, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
2325f8f3
59952b26
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
4 deletions
+28
-4
mysql-test/suite/innodb/r/fk_col_alter.result
mysql-test/suite/innodb/r/fk_col_alter.result
+10
-0
mysql-test/suite/innodb/t/fk_col_alter.test
mysql-test/suite/innodb/t/fk_col_alter.test
+11
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+2
-2
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+3
-2
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+2
-0
No files found.
mysql-test/suite/innodb/r/fk_col_alter.result
View file @
b0a43818
...
@@ -81,4 +81,14 @@ DROP TABLE t2, t1;
...
@@ -81,4 +81,14 @@ DROP TABLE t2, t1;
CREATE TABLE t (a VARCHAR(40), b INT, C INT) ENGINE=InnoDB;
CREATE TABLE t (a VARCHAR(40), b INT, C INT) ENGINE=InnoDB;
ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
DROP TABLE t;
DROP TABLE t;
#
# MDEV-32060 Server aborts when table doesn't
# have referenced index
#
SET SESSION FOREIGN_KEY_CHECKS = OFF;
CREATE TABLE t1 (a VARCHAR(16) KEY, FOREIGN KEY(a) REFERENCES t2(b)) ENGINE=InnoDB;
CREATE TABLE t2 (b VARCHAR(8)) ENGINE=InnoDB;
SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t2 MODIFY b VARCHAR(16), ADD KEY(b);
DROP TABLE t1, t2;
# End of 10.4 tests
# End of 10.4 tests
mysql-test/suite/innodb/t/fk_col_alter.test
View file @
b0a43818
...
@@ -111,4 +111,15 @@ DROP TABLE t2, t1;
...
@@ -111,4 +111,15 @@ DROP TABLE t2, t1;
CREATE
TABLE
t
(
a
VARCHAR
(
40
),
b
INT
,
C
INT
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t
(
a
VARCHAR
(
40
),
b
INT
,
C
INT
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t
MODIFY
a
VARCHAR
(
50
),
DROP
b
;
ALTER
TABLE
t
MODIFY
a
VARCHAR
(
50
),
DROP
b
;
DROP
TABLE
t
;
DROP
TABLE
t
;
--
echo
#
--
echo
# MDEV-32060 Server aborts when table doesn't
--
echo
# have referenced index
--
echo
#
SET
SESSION
FOREIGN_KEY_CHECKS
=
OFF
;
CREATE
TABLE
t1
(
a
VARCHAR
(
16
)
KEY
,
FOREIGN
KEY
(
a
)
REFERENCES
t2
(
b
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
b
VARCHAR
(
8
))
ENGINE
=
InnoDB
;
SET
SESSION
FOREIGN_KEY_CHECKS
=
ON
;
ALTER
TABLE
t2
MODIFY
b
VARCHAR
(
16
),
ADD
KEY
(
b
);
DROP
TABLE
t1
,
t2
;
--
echo
# End of 10.4 tests
--
echo
# End of 10.4 tests
sql/CMakeLists.txt
View file @
b0a43818
...
@@ -179,8 +179,8 @@ SET (SQL_SOURCE
...
@@ -179,8 +179,8 @@ SET (SQL_SOURCE
${
MYSYS_LIBWRAP_SOURCE
}
${
MYSYS_LIBWRAP_SOURCE
}
)
)
IF
(
CMAKE_C_COMPILER_ID MATCHES
"Clang"
AND
MY_CHECK_CXX_COMPILER_FLAG
(
-Wno-unused-but-set-variable
)
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS
"13.0.0"
)
IF
(
have_CXX__Wno_unused_but_set_variable
)
ADD_COMPILE_FLAGS
(
${
CMAKE_CURRENT_BINARY_DIR
}
/yy_mariadb.cc
ADD_COMPILE_FLAGS
(
${
CMAKE_CURRENT_BINARY_DIR
}
/yy_mariadb.cc
${
CMAKE_CURRENT_BINARY_DIR
}
/yy_oracle.cc
${
CMAKE_CURRENT_BINARY_DIR
}
/yy_oracle.cc
COMPILE_FLAGS
"-Wno-unused-but-set-variable"
)
COMPILE_FLAGS
"-Wno-unused-but-set-variable"
)
...
...
storage/innobase/CMakeLists.txt
View file @
b0a43818
...
@@ -510,8 +510,9 @@ IF(MSVC)
...
@@ -510,8 +510,9 @@ IF(MSVC)
# on generated file.
# on generated file.
TARGET_COMPILE_OPTIONS
(
innobase PRIVATE
"/wd4065"
)
TARGET_COMPILE_OPTIONS
(
innobase PRIVATE
"/wd4065"
)
ENDIF
()
ENDIF
()
IF
(
CMAKE_C_COMPILER_ID MATCHES
"Clang"
AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS
"13.0.0"
)
MY_CHECK_CXX_COMPILER_FLAG
(
-Wno-unused-but-set-variable
)
IF
(
have_CXX__Wno_unused_but_set_variable
)
ADD_COMPILE_FLAGS
(
pars/pars0grm.cc fts/fts0pars.cc
ADD_COMPILE_FLAGS
(
pars/pars0grm.cc fts/fts0pars.cc
COMPILE_FLAGS
"-Wno-unused-but-set-variable"
)
COMPILE_FLAGS
"-Wno-unused-but-set-variable"
)
ENDIF
()
ENDIF
()
...
...
storage/innobase/handler/handler0alter.cc
View file @
b0a43818
...
@@ -7776,6 +7776,8 @@ bool check_col_is_in_fk_indexes(
...
@@ -7776,6 +7776,8 @@ bool check_col_is_in_fk_indexes(
{
{
for
(
ulint
i
=
0
;
i
<
f
->
n_fields
;
i
++
)
for
(
ulint
i
=
0
;
i
<
f
->
n_fields
;
i
++
)
{
{
if
(
!
f
->
referenced_index
)
continue
;
if
(
f
->
referenced_index
->
fields
[
i
].
col
==
col
)
if
(
f
->
referenced_index
->
fields
[
i
].
col
==
col
)
{
{
my_error
(
ER_FK_COLUMN_CANNOT_CHANGE_CHILD
,
MYF
(
0
),
my_error
(
ER_FK_COLUMN_CANNOT_CHANGE_CHILD
,
MYF
(
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