summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-05-02 13:09:27 +0200
committerSergei Golubchik <serg@mariadb.org>2019-05-07 18:40:36 +0200
commitffb83ba65026e2af547b44601c4894437e4f031c (patch)
tree02c7c81c6ffb615514048b8613e067668d0cac27 /storage/myisam
parent651a43e0a0361098c35164a128ca588a2989d8e1 (diff)
downloadmariadb-git-ffb83ba65026e2af547b44601c4894437e4f031c.tar.gz
cleanup: move checksum code to handler class
make live checksum to be returned in handler::info(), and slow table-scan checksum to be calculated in handler::checksum(). part of MDEV-16249 CHECKSUM TABLE for a spider table is not parallel and saves all data in memory in the spider head by default
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc7
-rw-r--r--storage/myisam/ha_myisam.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index da930f67ef4..50ba5bdaff3 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -2000,6 +2000,7 @@ int ha_myisam::info(uint flag)
stats.delete_length= misam_info.delete_length;
stats.check_time= (ulong) misam_info.check_time;
stats.mean_rec_length= misam_info.mean_reclength;
+ stats.checksum= file->state->checksum;
}
if (flag & HA_STATUS_CONST)
{
@@ -2304,12 +2305,6 @@ int ha_myisam::ft_read(uchar *buf)
return error;
}
-uint ha_myisam::checksum() const
-{
- return (uint)file->state->checksum;
-}
-
-
enum_alter_inplace_result
ha_myisam::check_if_supported_inplace_alter(TABLE *new_table,
Alter_inplace_info *alter_info)
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index 804963f5efc..1e47734f579 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -66,7 +66,6 @@ class ha_myisam: public handler
uint max_supported_key_parts() const { return HA_MAX_KEY_SEG; }
uint max_supported_key_length() const { return HA_MAX_KEY_LENGTH; }
uint max_supported_key_part_length() const { return HA_MAX_KEY_LENGTH; }
- uint checksum() const;
void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share);
int open(const char *name, int mode, uint test_if_locked);
int close(void);