mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad
"rows examined" estimates". This change implements "innodb_stats_method" with options of "nulls_equal", "nulls_unequal" and "null_ignored". rb://553 approved by Marko
This commit is contained in:
@ -154,6 +154,11 @@ capacity. PCT_IO(5) -> returns the number of IO operations that
|
||||
is 5% of the max where max is srv_io_capacity. */
|
||||
#define PCT_IO(p) ((ulong) (srv_io_capacity * ((double) p / 100.0)))
|
||||
|
||||
/* The "innodb_stats_method" setting, decides how InnoDB is going
|
||||
to treat NULL value when collecting statistics. It is not defined
|
||||
as enum type because the configure option takes unsigned integer type. */
|
||||
extern ulong srv_innodb_stats_method;
|
||||
|
||||
#ifdef UNIV_LOG_ARCHIVE
|
||||
extern ibool srv_log_archive_on;
|
||||
extern ibool srv_archive_recovery;
|
||||
@ -363,6 +368,19 @@ enum {
|
||||
in connection with recovery */
|
||||
};
|
||||
|
||||
/* Alternatives for srv_innodb_stats_method, which could be changed by
|
||||
setting innodb_stats_method */
|
||||
enum srv_stats_method_name_enum {
|
||||
SRV_STATS_NULLS_EQUAL, /* All NULL values are treated as
|
||||
equal. This is the default setting
|
||||
for innodb_stats_method */
|
||||
SRV_STATS_NULLS_UNEQUAL, /* All NULL values are treated as
|
||||
NOT equal. */
|
||||
SRV_STATS_NULLS_IGNORED /* NULL values are ignored */
|
||||
};
|
||||
|
||||
typedef enum srv_stats_method_name_enum srv_stats_method_name_t;
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/** Types of threads existing in the system. */
|
||||
enum srv_thread_type {
|
||||
|
Reference in New Issue
Block a user