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
aa9e173e
Commit
aa9e173e
authored
Jul 04, 2022
by
Nikita Malyavin
Committed by
Sergei Golubchik
Aug 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29021 add test case from MDEV-29013
This test case was also fixed by adding update_virtual_columns.
parent
b0db7239
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
2 deletions
+46
-2
mysql-test/main/alter_table_online_debug.result
mysql-test/main/alter_table_online_debug.result
+19
-1
mysql-test/main/alter_table_online_debug.test
mysql-test/main/alter_table_online_debug.test
+27
-1
No files found.
mysql-test/main/alter_table_online_debug.result
View file @
aa9e173e
...
...
@@ -650,7 +650,7 @@ set debug_sync= reset;
#
# MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped and added
#
create table t1 (a char(9), b char(9) as (a) stored)
engine=InnoDB
;
create table t1 (a char(9), b char(9) as (a) stored);
insert into t1(a) values ('foobar');
set debug_sync= 'now wait_for downgraded';
connection con2;
...
...
@@ -708,6 +708,24 @@ connection default;
drop table t1;
set debug_sync= reset;
#
# DELETE with added virtual column
#
CREATE TABLE t1 (a CHAR(3), b CHAR(3) AS (a));
INSERT INTO t1 (a) VALUES ('foo'),('bar');
set debug_sync= 'now wait_for downgraded';
connection con2;
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
ALTER TABLE t1 ADD c INT, ALGORITHM=COPY, LOCK=NONE;
connection default;
DELETE FROM t1;
set debug_sync= 'now signal goforit';
connection con2;
select * from t1;
a b c
connection default;
DROP TABLE t1;
set debug_sync= reset;
#
# Do not ignore sql_mode when replicating
#
create table t1 (a int);
...
...
mysql-test/main/alter_table_online_debug.test
View file @
aa9e173e
...
...
@@ -804,7 +804,7 @@ set debug_sync= reset;
--
echo
#
--
echo
# MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped and added
--
echo
#
create
table
t1
(
a
char
(
9
),
b
char
(
9
)
as
(
a
)
stored
)
engine
=
InnoDB
;
create
table
t1
(
a
char
(
9
),
b
char
(
9
)
as
(
a
)
stored
);
insert
into
t1
(
a
)
values
(
'foobar'
);
--
send
set
debug_sync
=
'now wait_for downgraded'
...
...
@@ -875,6 +875,32 @@ show create table t1;
drop
table
t1
;
set
debug_sync
=
reset
;
--
echo
#
--
echo
# DELETE with added virtual column
--
echo
#
CREATE
TABLE
t1
(
a
CHAR
(
3
),
b
CHAR
(
3
)
AS
(
a
));
INSERT
INTO
t1
(
a
)
VALUES
(
'foo'
),(
'bar'
);
--
send
set
debug_sync
=
'now wait_for downgraded'
;
--
connection
con2
set
debug_sync
=
'alter_table_online_downgraded signal downgraded wait_for goforit'
;
--
send
ALTER
TABLE
t1
ADD
c
INT
,
ALGORITHM
=
COPY
,
LOCK
=
NONE
;
--
connection
default
--
reap
DELETE
FROM
t1
;
set
debug_sync
=
'now signal goforit'
;
--
connection
con2
--
reap
select
*
from
t1
;
--
connection
default
DROP
TABLE
t1
;
set
debug_sync
=
reset
;
--
echo
#
--
echo
# Do not ignore sql_mode when replicating
--
echo
#
...
...
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