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
ab5ec0f3
Commit
ab5ec0f3
authored
Dec 14, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: disable truncate history on partitioned [fixes #399]
parent
f96815fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
mysql-test/suite/versioning/r/truncate.result
mysql-test/suite/versioning/r/truncate.result
+9
-0
mysql-test/suite/versioning/t/truncate.opt
mysql-test/suite/versioning/t/truncate.opt
+1
-0
mysql-test/suite/versioning/t/truncate.test
mysql-test/suite/versioning/t/truncate.test
+12
-0
sql/sql_delete.cc
sql/sql_delete.cc
+8
-0
No files found.
mysql-test/suite/versioning/r/truncate.result
View file @
ab5ec0f3
...
...
@@ -34,4 +34,13 @@ select * from t for system_time all;
a
11
22
### Issue #399, truncate partitioned table is now unimplemented
create or replace table t (a int)
with system versioning
engine myisam
partition by system_time (
partition p0 versioning,
partition pn as of current_timestamp);
truncate table t to system_time current_timestamp;
ERROR 42000: The used command is not allowed with this MariaDB version
drop table t;
mysql-test/suite/versioning/t/truncate.opt
View file @
ab5ec0f3
--versioning-hide=implicit
--partition
mysql-test/suite/versioning/t/truncate.test
View file @
ab5ec0f3
...
...
@@ -28,4 +28,16 @@ select * from t for system_time all;
truncate
table
t
to
system_time
timestamp
now
(
6
);
select
*
from
t
for
system_time
all
;
--
echo
### Issue #399, truncate partitioned table is now unimplemented
create
or
replace
table
t
(
a
int
)
with
system
versioning
engine
myisam
partition
by
system_time
(
partition
p0
versioning
,
partition
pn
as
of
current_timestamp
);
--
error
ER_NOT_ALLOWED_COMMAND
truncate
table
t
to
system_time
current_timestamp
;
drop
table
t
;
sql/sql_delete.cc
View file @
ab5ec0f3
...
...
@@ -315,6 +315,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
TABLE
*
table
=
table_list
->
table
;
DBUG_ASSERT
(
table
);
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
table
->
part_info
)
{
my_error
(
ER_NOT_ALLOWED_COMMAND
,
MYF
(
0
));
DBUG_RETURN
(
true
);
}
#endif
DBUG_ASSERT
(
!
conds
);
if
(
select_lex
->
vers_setup_conds
(
thd
,
table_list
,
&
conds
))
DBUG_RETURN
(
TRUE
);
...
...
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