summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-08-01 19:24:55 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2016-08-03 21:37:19 +0200
commit86975e0492c03535271aea67e0b5e7e8fd0b1b78 (patch)
tree6e443c8f8842145bdd118917d3eb2da0916979a6 /storage/xtradb
parentba4ed3ee8478830fb94e99dcd5a5acfcc3e2c3ea (diff)
downloadmariadb-git-86975e0492c03535271aea67e0b5e7e8fd0b1b78.tar.gz
MDEV-7901: re-implement analyze table for low impact
Table before collecting engine independent statistics now is reopened in read mode, InnoDB allow write operations in this case.
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/handler/ha_innodb.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 2c71488c18b..292d498ebfb 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -16247,7 +16247,7 @@ ha_innobase::store_lock(
/* Use consistent read for checksum table */
if (sql_command == SQLCOM_CHECKSUM
- || sql_command == SQLCOM_CHECKSUM
+ || (sql_command == SQLCOM_ANALYZE && lock_type == TL_READ)
|| ((srv_locks_unsafe_for_binlog
|| trx->isolation_level <= TRX_ISO_READ_COMMITTED)
&& trx->isolation_level != TRX_ISO_SERIALIZABLE