diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-06-21 23:54:55 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-06-21 23:54:55 -0400 |
commit | 46024098be1d7887134a3a3d8d289dd7711c56dc (patch) | |
tree | c175b6b9f5913b2c2424ca4fa799b1c545e3d9a5 /sql/sql_partition_admin.cc | |
parent | 41d40029875bfd7f4cd6a5255e05a3c93103220f (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-46024098be1d7887134a3a3d8d289dd7711c56dc.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-galera
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r-- | sql/sql_partition_admin.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index ac67291fbd1..029744b63f5 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -837,9 +837,16 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) log. The exception is a unimplemented truncate method or failure before any call to handler::truncate() is done. Also, it is logged in statement format, regardless of the binlog format. + + Since we've changed data within the table, we also have to invalidate + the query cache for it. */ - if (error != HA_ERR_WRONG_COMMAND && binlog_stmt) - error|= write_bin_log(thd, !error, thd->query(), thd->query_length()); + if (error != HA_ERR_WRONG_COMMAND) + { + query_cache_invalidate3(thd, first_table, FALSE); + if (binlog_stmt) + error|= write_bin_log(thd, !error, thd->query(), thd->query_length()); + } /* A locked table ticket was upgraded to a exclusive lock. After the |