From 38cae36c878abe35eb266f50bc390a9330a3d0ec Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Thu, 11 Nov 2004 21:17:44 +0200 Subject: [PATCH 1/3] trx0purge.c: Remove duplicated innodb max purge lag code --- innobase/trx/trx0purge.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c index 6726d7ca609..5c62640e011 100644 --- a/innobase/trx/trx0purge.c +++ b/innobase/trx/trx0purge.c @@ -1069,30 +1069,6 @@ trx_purge(void) } } - /* Determine how much data manipulation language (DML) statements - need to be delayed in order to reduce the lagging of the purge - thread. */ - srv_dml_needed_delay = 0; /* in microseconds; default: no delay */ - - /* If we cannot advance the 'purge view' because of an old - 'consistent read view', then the DML statements cannot be delayed. - Also, srv_max_purge_lag <= 0 means 'infinity'. */ - if (srv_max_purge_lag > 0 - && !UT_LIST_GET_LAST(trx_sys->view_list)) { - float ratio = (float) trx_sys->rseg_history_len - / srv_max_purge_lag; - if (ratio > ULINT_MAX / 10000) { - /* Avoid overflow: maximum delay is 4295 seconds */ - srv_dml_needed_delay = ULINT_MAX; - } else if (ratio > 1) { - /* If the history list length exceeds the - innodb_max_purge_lag, the - data manipulation statements are delayed - by at least 5000 microseconds. */ - srv_dml_needed_delay = (ulint) ((ratio - .5) * 10000); - } - } - purge_sys->view = read_view_oldest_copy_or_open_new(NULL, purge_sys->heap); mutex_exit(&kernel_mutex); From 0be3c55594b2ca0307f5e35ceb6150312660fb18 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Thu, 11 Nov 2004 21:26:24 +0100 Subject: [PATCH 2/3] mi_write: fix for ft2 when found word (in the tree) has different length as the word to insert --- myisam/mi_check.c | 8 ++++++++ myisam/mi_write.c | 1 + 2 files changed, 9 insertions(+) diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 1df518a2712..bf684270c0a 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -656,6 +656,14 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, if (chk_index_down(param,info,&info->s->ft2_keyinfo,record, temp_buff,&tmp_keys,key_checksum,1)) goto err; + if (tmp_keys + subkeys) + { + mi_check_print_error(param,"Number of words in the 2nd level tree " + "does not match the number in the header. " + "Parent word in on the page %s, offset %d", + llstr(page,llbuff), old_keypos-buff); + goto err; + } (*keys)+=tmp_keys-1; continue; } diff --git a/myisam/mi_write.c b/myisam/mi_write.c index dc596672a84..e059bbb569f 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -372,6 +372,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, /* popular word. two-level tree. going down */ my_off_t root=info->dupp_key_pos; keyinfo=&info->s->ft2_keyinfo; + get_key_full_length_rdonly(off, key); key+=off; keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */ error=_mi_ck_real_write_btree(info, keyinfo, key, 0, From af8d3612174ee18abd02c3e2b289b82ea669365e Mon Sep 17 00:00:00 2001 From: "paul@kite-hub.kitebird.com" <> Date: Thu, 11 Nov 2004 14:55:55 -0600 Subject: [PATCH 3/3] mysqldump.c: Reorder options, revise --hex-blob help string. --- client/mysqldump.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index dbc11f1ab90..864fe38a204 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -150,6 +150,9 @@ static struct my_option my_long_options[] = {"character-sets-dir", OPT_CHARSETS_DIR, "Directory where character sets are.", (gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"comments", 'i', "Write additional information.", + (gptr*) &opt_comments, (gptr*) &opt_comments, 0, GET_BOOL, NO_ARG, + 1, 0, 0, 0, 0, 0}, {"compatible", OPT_COMPATIBLE, "Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.", (gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0, @@ -225,6 +228,9 @@ static struct my_option my_long_options[] = 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, " + "VARBINARY, BLOB) in hexadecimal format.", + (gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", (gptr*) ¤t_host, (gptr*) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...", @@ -344,13 +350,7 @@ static struct my_option my_long_options[] = {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", (gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L, - MALLOC_OVERHEAD-1024, 1024, 0}, - {"comments", 'i', "Write additional information.", - (gptr*) &opt_comments, (gptr*) &opt_comments, 0, GET_BOOL, NO_ARG, - 1, 0, 0, 0, 0, 0}, - {"hex-blob", OPT_HEXBLOB, "Dump BLOBs in HEX.", - (gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} + MALLOC_OVERHEAD-1024, 1024, 0} }; static const char *load_default_groups[]= { "mysqldump","client",0 };