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
39db1165
Commit
39db1165
authored
Aug 13, 2019
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18862 Unfortunate error message upon attempt to drop system versioning
Fix error code.
parent
65d48b4a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
mysql-test/suite/versioning/r/alter.result
mysql-test/suite/versioning/r/alter.result
+2
-2
mysql-test/suite/versioning/t/alter.test
mysql-test/suite/versioning/t/alter.test
+2
-2
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+0
-2
sql/sql_table.cc
sql/sql_table.cc
+1
-1
No files found.
mysql-test/suite/versioning/r/alter.result
View file @
39db1165
...
...
@@ -622,9 +622,9 @@ set sql_mode= default;
set system_versioning_alter_history= keep;
create or replace table t1 (x int) with system versioning;
alter table t1 drop column `row_start`, drop column `row_end`, drop period for system_time, drop system versioning;
ERROR
HY000: No 'PERIOD FOR SYSTEM_TIME' in system-versioned `t1`
ERROR
42000: Can't DROP PERIOD FOR SYSTEM_TIME on `t1`; check that it exists
alter table t1 drop period for system_time;
ERROR
HY000: No 'PERIOD FOR SYSTEM_TIME' in system-versioned `t1`
ERROR
42000: Can't DROP PERIOD FOR SYSTEM_TIME on `t1`; check that it exists
alter table t1 drop column `row_start`, drop column `row_end`, drop system versioning;
ERROR 42000: Can't DROP COLUMN `row_start`; check that it exists
alter table t1 drop column `row_end`;
...
...
mysql-test/suite/versioning/t/alter.test
View file @
39db1165
...
...
@@ -519,9 +519,9 @@ set sql_mode= default;
--
echo
#
set
system_versioning_alter_history
=
keep
;
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
--
error
ER_
VERS_NO_PERIOD
--
error
ER_
CANT_DROP_FIELD_OR_KEY
alter
table
t1
drop
column
`row_start`
,
drop
column
`row_end`
,
drop
period
for
system_time
,
drop
system
versioning
;
--
error
ER_
VERS_NO_PERIOD
--
error
ER_
CANT_DROP_FIELD_OR_KEY
alter
table
t1
drop
period
for
system_time
;
--
error
ER_CANT_DROP_FIELD_OR_KEY
alter
table
t1
drop
column
`row_start`
,
drop
column
`row_end`
,
drop
system
versioning
;
...
...
sql/share/errmsg-utf8.txt
View file @
39db1165
...
...
@@ -7898,5 +7898,3 @@ ER_KEY_DOESNT_SUPPORT
eng "%s index %`s does not support this operation"
ER_ALTER_OPERATION_TABLE_OPTIONS_NEED_REBUILD
eng "Changing table options requires the table to be rebuilt"
ER_VERS_NO_PERIOD
eng "No 'PERIOD FOR SYSTEM_TIME' in system-versioned %`s"
sql/sql_table.cc
View file @
39db1165
...
...
@@ -8078,7 +8078,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
else
if
(
alter_info
->
flags
&
ALTER_DROP_PERIOD
&&
vers_system_invisible
)
{
my_error
(
ER_
VERS_NO_PERIOD
,
MYF
(
0
)
,
table
->
s
->
table_name
.
str
);
my_error
(
ER_
CANT_DROP_FIELD_OR_KEY
,
MYF
(
0
),
"PERIOD FOR SYSTEM_TIME on"
,
table
->
s
->
table_name
.
str
);
goto
err
;
}
alter_info
->
flags
&=
~
(
ALTER_DROP_PERIOD
|
ALTER_ADD_PERIOD
);
...
...
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