diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-05-02 13:09:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-05-07 18:40:36 +0200 |
commit | ffb83ba65026e2af547b44601c4894437e4f031c (patch) | |
tree | 02c7c81c6ffb615514048b8613e067668d0cac27 /storage | |
parent | 651a43e0a0361098c35164a128ca588a2989d8e1 (diff) | |
download | mariadb-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')
-rw-r--r-- | storage/maria/ha_maria.cc | 7 | ||||
-rw-r--r-- | storage/maria/ha_maria.h | 1 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 7 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.h | 1 |
4 files changed, 2 insertions, 14 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 10ec7ad4d67..db423825d9e 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2528,6 +2528,7 @@ int ha_maria::info(uint flag) stats.delete_length= maria_info.delete_length; stats.check_time= maria_info.check_time; stats.mean_rec_length= maria_info.mean_reclength; + stats.checksum= file->state->checksum; } if (flag & HA_STATUS_CONST) { @@ -3277,12 +3278,6 @@ int ha_maria::ft_read(uchar * buf) } -uint ha_maria::checksum() const -{ - return (uint) file->state->checksum; -} - - bool ha_maria::check_if_incompatible_data(HA_CREATE_INFO *create_info, uint table_changes) { diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index e67907039a1..81ba673c748 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -68,7 +68,6 @@ public: uint max_supported_key_part_length() const { return max_supported_key_length(); } enum row_type get_row_type() const; - uint checksum() const; void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); virtual double scan_time(); 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); |