Commit 6e4b2136 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Fix after MERGE

Fixed use of unitialized key
parent 2faee462
...@@ -83,11 +83,11 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group, ...@@ -83,11 +83,11 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group,
innobase_log_file_size, innobase_log_buffer_size, innobase_log_file_size, innobase_log_buffer_size,
innobase_buffer_pool_size, innobase_additional_mem_pool_size, innobase_buffer_pool_size, innobase_additional_mem_pool_size,
innobase_file_io_threads, innobase_lock_wait_timeout, innobase_file_io_threads, innobase_lock_wait_timeout,
innobase_thread_concurrency, innobase_force_recovery;
/* The default values for the following char* start-up parameters /* The default values for the following char* start-up parameters
are determined in innobase_init below: */ are determined in innobase_init below: */
/* innobase_data_file_path=ibdata:15,idata2:1,... */
char* innobase_data_home_dir = NULL; char* innobase_data_home_dir = NULL;
char* innobase_log_group_home_dir = NULL; char* innobase_log_group_home_dir = NULL;
char* innobase_log_arch_dir = NULL; char* innobase_log_arch_dir = NULL;
...@@ -106,8 +106,10 @@ my_bool innobase_fast_shutdown = TRUE; ...@@ -106,8 +106,10 @@ my_bool innobase_fast_shutdown = TRUE;
can use InnoDB without having to specify any startup options. can use InnoDB without having to specify any startup options.
*/ */
/* innobase_data_file_path=ibdata:15,idata2:1,... */
char *innobase_data_file_path= (char*) "ibdata1:64M:autoextend"; char *innobase_data_file_path= (char*) "ibdata1:64M:autoextend";
char *internal_innobase_data_file_path=0; static char *internal_innobase_data_file_path=0;
/* The following counter is used to convey information to InnoDB /* The following counter is used to convey information to InnoDB
about server activity: in selects it is not sensible to call about server activity: in selects it is not sensible to call
...@@ -1918,7 +1920,7 @@ ha_innobase::change_active_index( ...@@ -1918,7 +1920,7 @@ ha_innobase::change_active_index(
InnoDB */ InnoDB */
{ {
row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
KEY* key; KEY* key=0;
statistic_increment(ha_read_key_count, &LOCK_status); statistic_increment(ha_read_key_count, &LOCK_status);
DBUG_ENTER("change_active_index"); DBUG_ENTER("change_active_index");
...@@ -1929,15 +1931,16 @@ ha_innobase::change_active_index( ...@@ -1929,15 +1931,16 @@ ha_innobase::change_active_index(
key = table->key_info + active_index; key = table->key_info + active_index;
prebuilt->index = dict_table_get_index_noninline( prebuilt->index = dict_table_get_index_noninline(
prebuilt->table, key->name); prebuilt->table,
key->name);
} else { } else {
prebuilt->index = dict_table_get_first_index_noninline( prebuilt->index = dict_table_get_first_index_noninline(
prebuilt->table); prebuilt->table);
} }
if (!prebuilt->index) { if (!prebuilt->index) {
sql_print_error("Innodb could not find key n:o %u with name %s from dict cache for table %s", keynr, key->name, prebuilt->table->name); sql_print_error("Innodb could not find key n:o %u with name %s from dict cache for table %s", keynr, key ? key->name : "NULL", prebuilt->table->name);
return(1); DBUG_RETURN(1);
} }
assert(prebuilt->search_tuple != 0); assert(prebuilt->search_tuple != 0);
......
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