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
c847089e
Commit
c847089e
authored
7 years ago
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cannot DROP VERSIONING without dropping all visible AS ROW fields
parent
f3a49e70
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
mysql-test/suite/versioning/r/alter.result
mysql-test/suite/versioning/r/alter.result
+2
-0
mysql-test/suite/versioning/t/alter.test
mysql-test/suite/versioning/t/alter.test
+3
-0
sql/sql_table.cc
sql/sql_table.cc
+7
-0
No files found.
mysql-test/suite/versioning/r/alter.result
View file @
c847089e
...
...
@@ -64,6 +64,8 @@ t CREATE TABLE `t` (
`trx_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
PERIOD FOR SYSTEM_TIME (`trx_start`, `trx_end`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t drop system versioning;
ERROR HY000: System versioning field `trx_start` exists
alter table t drop column trx_start, drop column trx_end;
alter table t drop system versioning;
show create table t;
...
...
This diff is collapsed.
Click to expand it.
mysql-test/suite/versioning/t/alter.test
View file @
c847089e
...
...
@@ -53,6 +53,9 @@ alter table t
add
system
versioning
;
show
create
table
t
;
--
error
ER_VERS_SYS_FIELD_EXISTS
alter
table
t
drop
system
versioning
;
alter
table
t
drop
column
trx_start
,
drop
column
trx_end
;
alter
table
t
drop
system
versioning
;
show
create
table
t
;
...
...
This diff is collapsed.
Click to expand it.
sql/sql_table.cc
View file @
c847089e
...
...
@@ -8009,6 +8009,13 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
def_it
.
remove
();
}
}
else
if
(
alter_info
->
flags
&
Alter_info
::
ALTER_DROP_SYSTEM_VERSIONING
&&
field
->
flags
&
VERS_SYSTEM_FIELD
&&
field
->
invisible
<
INVISIBLE_SYSTEM
)
{
my_error
(
ER_VERS_SYS_FIELD_EXISTS
,
MYF
(
0
),
field
->
field_name
.
str
);
goto
err
;
}
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