Commit 9d2fe138 authored by marko's avatar marko

branches/zip: Merge revisions 2854:2929 from branches/5.1,

except r2924, which was merged from branches/zip r2866 to branches/5.1
and except r2879 which was merged separately by Calvin:

  ------------------------------------------------------------------------
  r2902 | vasil | 2008-10-28 12:10:25 +0200 (Tue, 28 Oct 2008) | 10 lines

  branches/5.1:

  Fix Bug#38189 innodb_stats_on_metadata missing

  Make the variable innodb_stats_on_metadata visible to the users and
  also settable at runtime. Previously it was only "visible" as a command
  line startup option to mysqld.

  Approved by:    Marko (https://svn.innodb.com/rb/r/36)
  ------------------------------------------------------------------------
  r2929 | marko | 2008-10-29 21:26:14 +0200 (Wed, 29 Oct 2008) | 13 lines

  branches/5.1: dtype_get_sql_null_size(): return the correct storage
  size of a SQL NULL column. (Bug #40369)

  When MySQL Bug #20877 was fixed in r834, this function was
  accidentally modified to return 0 or 1. Apparently, the only impact of
  this bug is that fixed-length columns cannot be updated in-place from
  or to SQL NULL, even in ROW_FORMAT=REDUNDANT.  After this fix,
  fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
  storage size as they should, no matter if NULL or non-NULL.  The bug
  caused fixed-length NULL columns to occupy 1 byte.

  rb://37 approved by Heikki over IM.
  ------------------------------------------------------------------------
parent 4c7b3cb7
...@@ -2083,8 +2083,6 @@ innobase_init( ...@@ -2083,8 +2083,6 @@ innobase_init(
srv_max_n_open_files = (ulint) innobase_open_files; srv_max_n_open_files = (ulint) innobase_open_files;
srv_innodb_status = (ibool) innobase_create_status_file; srv_innodb_status = (ibool) innobase_create_status_file;
srv_stats_on_metadata = (ibool) innobase_stats_on_metadata;
btr_search_disabled = (ibool) !innobase_adaptive_hash_index; btr_search_disabled = (ibool) !innobase_adaptive_hash_index;
srv_print_verbose_log = mysqld_embedded ? 0 : 1; srv_print_verbose_log = mysqld_embedded ? 0 : 1;
...@@ -6876,7 +6874,7 @@ ha_innobase::info( ...@@ -6876,7 +6874,7 @@ ha_innobase::info(
ib_table = prebuilt->table; ib_table = prebuilt->table;
if (flag & HA_STATUS_TIME) { if (flag & HA_STATUS_TIME) {
if (srv_stats_on_metadata) { if (innobase_stats_on_metadata) {
/* In sql_show we call with this flag: update /* In sql_show we call with this flag: update
then statistics so that they are up-to-date */ then statistics so that they are up-to-date */
...@@ -9442,7 +9440,7 @@ static MYSQL_SYSVAR_BOOL(status_file, innobase_create_status_file, ...@@ -9442,7 +9440,7 @@ static MYSQL_SYSVAR_BOOL(status_file, innobase_create_status_file,
NULL, NULL, FALSE); NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata, static MYSQL_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_NOSYSVAR, PLUGIN_VAR_OPCMDARG,
"Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)", "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)",
NULL, NULL, TRUE); NULL, NULL, TRUE);
......
...@@ -567,5 +567,5 @@ dtype_get_sql_null_size( ...@@ -567,5 +567,5 @@ dtype_get_sql_null_size(
const dtype_t* type) /* in: type */ const dtype_t* type) /* in: type */
{ {
return(dtype_get_fixed_size_low(type->mtype, type->prtype, type->len, return(dtype_get_fixed_size_low(type->mtype, type->prtype, type->len,
type->mbminlen, type->mbmaxlen) > 0); type->mbminlen, type->mbmaxlen));
} }
...@@ -132,8 +132,6 @@ extern ulint srv_fast_shutdown; /* If this is 1, do not do a ...@@ -132,8 +132,6 @@ extern ulint srv_fast_shutdown; /* If this is 1, do not do a
transactions). */ transactions). */
extern ibool srv_innodb_status; extern ibool srv_innodb_status;
extern ibool srv_stats_on_metadata;
extern unsigned long long srv_stats_sample_pages; extern unsigned long long srv_stats_sample_pages;
extern ibool srv_use_doublewrite_buf; extern ibool srv_use_doublewrite_buf;
......
...@@ -299,8 +299,6 @@ UNIV_INTERN ulint srv_fast_shutdown = 0; ...@@ -299,8 +299,6 @@ UNIV_INTERN ulint srv_fast_shutdown = 0;
/* Generate a innodb_status.<pid> file */ /* Generate a innodb_status.<pid> file */
UNIV_INTERN ibool srv_innodb_status = FALSE; UNIV_INTERN ibool srv_innodb_status = FALSE;
UNIV_INTERN ibool srv_stats_on_metadata = TRUE;
/* When estimating number of different key values in an index, sample /* When estimating number of different key values in an index, sample
this many index pages */ this many index pages */
UNIV_INTERN unsigned long long srv_stats_sample_pages = 8; UNIV_INTERN unsigned long long srv_stats_sample_pages = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment