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
45b7a010
Commit
45b7a010
authored
1 year ago
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.9' into 10.10
parents
ced243a0
21465411
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
0 deletions
+56
-0
mysql-test/suite/vcol/r/innodb_virtual_fk.result
mysql-test/suite/vcol/r/innodb_virtual_fk.result
+19
-0
mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
+9
-0
mysql-test/suite/vcol/t/innodb_virtual_fk.test
mysql-test/suite/vcol/t/innodb_virtual_fk.test
+10
-0
sql/sql_alter.cc
sql/sql_alter.cc
+7
-0
storage/mroonga/ha_mroonga.cpp
storage/mroonga/ha_mroonga.cpp
+11
-0
No files found.
mysql-test/suite/vcol/r/innodb_virtual_fk.result
View file @
45b7a010
...
@@ -78,5 +78,24 @@ drop table if exists t2, t1;
...
@@ -78,5 +78,24 @@ drop table if exists t2, t1;
Warnings:
Warnings:
Note 1051 Unknown table 'test.t2'
Note 1051 Unknown table 'test.t2'
#
#
# MDEV-31853 Assertion failure in Column_definition::check_vcol_for_key upon adding FK
#
create table t (a int, b int, c int generated always as (a), key(b), key(c));
alter table t add foreign key (a) references t (b) on update set null, algorithm=nocopy;
ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Adding foreign keys needs foreign_key_checks=OFF. Try ALGORITHM=COPY
alter table t add foreign key (a) references t (b);
show create table t;
Table Create Table
t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL,
KEY `b` (`b`),
KEY `c` (`c`),
KEY `a` (`a`),
CONSTRAINT `t_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t;
#
# End of 10.5 tests
# End of 10.5 tests
#
#
This diff is collapsed.
Click to expand it.
mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
View file @
45b7a010
...
@@ -73,6 +73,9 @@ t1 CREATE TABLE `t1` (
...
@@ -73,6 +73,9 @@ t1 CREATE TABLE `t1` (
`a` char(5) DEFAULT NULL,
`a` char(5) DEFAULT NULL,
`v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
`v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
SELECT * FROM t1;
SELECT * FROM t1;
a v
a v
1 1
1 1
...
@@ -86,6 +89,9 @@ a v
...
@@ -86,6 +89,9 @@ a v
1 1
1 1
2 2
2 2
3 3
3 3
Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
DROP TABLE t1;
DROP TABLE t1;
#
#
# Fixing a Maria-10.2.26 table with a stored VARCHAR column
# Fixing a Maria-10.2.26 table with a stored VARCHAR column
...
@@ -201,6 +207,9 @@ a v
...
@@ -201,6 +207,9 @@ a v
1 1
1 1
2 2
2 2
3 3
3 3
Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
DROP TABLE t1;
DROP TABLE t1;
#
#
# Fixing a Maria-10.2.26 table with a virtual VARCHAR column
# Fixing a Maria-10.2.26 table with a virtual VARCHAR column
...
...
This diff is collapsed.
Click to expand it.
mysql-test/suite/vcol/t/innodb_virtual_fk.test
View file @
45b7a010
...
@@ -100,6 +100,16 @@ create or replace table t2 (id int, id2 int as (id) virtual, check (id2), foreig
...
@@ -100,6 +100,16 @@ create or replace table t2 (id int, id2 int as (id) virtual, check (id2), foreig
drop
table
if
exists
t2
,
t1
;
drop
table
if
exists
t2
,
t1
;
--
echo
#
--
echo
# MDEV-31853 Assertion failure in Column_definition::check_vcol_for_key upon adding FK
--
echo
#
create
table
t
(
a
int
,
b
int
,
c
int
generated
always
as
(
a
),
key
(
b
),
key
(
c
));
--
error
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter
table
t
add
foreign
key
(
a
)
references
t
(
b
)
on
update
set
null
,
algorithm
=
nocopy
;
alter
table
t
add
foreign
key
(
a
)
references
t
(
b
);
show
create
table
t
;
drop
table
t
;
--
echo
#
--
echo
#
--
echo
# End of 10.5 tests
--
echo
# End of 10.5 tests
--
echo
#
--
echo
#
This diff is collapsed.
Click to expand it.
sql/sql_alter.cc
View file @
45b7a010
...
@@ -258,6 +258,13 @@ Alter_info::algorithm(const THD *thd) const
...
@@ -258,6 +258,13 @@ Alter_info::algorithm(const THD *thd) const
uint
Alter_info
::
check_vcol_field
(
Item_field
*
item
)
const
uint
Alter_info
::
check_vcol_field
(
Item_field
*
item
)
const
{
{
/*
vcol->flags are modified in-place, so we'll need to reset them
if ALTER fails for any reason
*/
if
(
item
->
field
&&
!
item
->
field
->
table
->
needs_reopen
())
item
->
field
->
table
->
mark_table_for_reopen
();
if
(
!
item
->
field
&&
if
(
!
item
->
field
&&
((
item
->
db_name
.
length
&&
!
db
.
streq
(
item
->
db_name
))
||
((
item
->
db_name
.
length
&&
!
db
.
streq
(
item
->
db_name
))
||
(
item
->
table_name
.
length
&&
!
table_name
.
streq
(
item
->
table_name
))))
(
item
->
table_name
.
length
&&
!
table_name
.
streq
(
item
->
table_name
))))
...
...
This diff is collapsed.
Click to expand it.
storage/mroonga/ha_mroonga.cpp
View file @
45b7a010
...
@@ -4963,6 +4963,17 @@ int ha_mroonga::wrapper_close()
...
@@ -4963,6 +4963,17 @@ int ha_mroonga::wrapper_close()
MRN_DBUG_ENTER_METHOD
();
MRN_DBUG_ENTER_METHOD
();
MRN_SET_WRAP_SHARE_KEY
(
share
,
table
->
s
);
MRN_SET_WRAP_SHARE_KEY
(
share
,
table
->
s
);
MRN_SET_WRAP_TABLE_KEY
(
this
,
table
);
MRN_SET_WRAP_TABLE_KEY
(
this
,
table
);
#ifdef MRN_HANDLER_HAVE_CHECK_IF_SUPPORTED_INPLACE_ALTER
if
(
alter_key_info_buffer
)
{
my_free
(
alter_key_info_buffer
);
alter_key_info_buffer
=
NULL
;
}
#else
if
(
wrap_alter_key_info
)
{
my_free
(
wrap_alter_key_info
);
wrap_alter_key_info
=
NULL
;
}
#endif
#ifdef MRN_HANDLER_HAVE_HA_CLOSE
#ifdef MRN_HANDLER_HAVE_HA_CLOSE
error
=
wrap_handler
->
ha_close
();
error
=
wrap_handler
->
ha_close
();
#else
#else
...
...
This diff is collapsed.
Click to expand 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