summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-12-14 19:11:02 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-12-14 19:11:02 +0300
commitab5ec0f346a8244e99067fab0fbd6b48f23cee9c (patch)
treec6bc2bfb6fd9f6b67a26c89746dcd5af5c0f2a51 /sql/sql_delete.cc
parentf96815fe97fb079b164cad95b6d23e17d86009ee (diff)
downloadmariadb-git-ab5ec0f346a8244e99067fab0fbd6b48f23cee9c.tar.gz
SQL: disable truncate history on partitioned [fixes #399]
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 2ea2af73743..118066e7d93 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -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);