Loading sql/ha_innobase.cc +18 −49 Original line number Diff line number Diff line Loading @@ -267,35 +267,6 @@ innobase_mysql_print_thd( thd = (THD*) input_thd; buf += sprintf(buf, "MySQL thread id %lu, query id %lu", thd->thread_id, thd->query_id); if (thd->host) { buf += sprintf(buf, " %.30s", thd->host); } if (thd->ip) { buf += sprintf(buf, " %.20s", thd->ip); } if (thd->user) { buf += sprintf(buf, " %.20s", thd->user); } if (thd->proc_info) { buf += sprintf(buf, " %.50s", thd->proc_info); } if (thd->query) { buf += sprintf(buf, "\n%.150s", thd->query); } buf += sprintf(buf, "\n"); #ifdef notdefined /* July 30, 2002 Revert Monty's changes because they seem to make control characters sometimes appear in the output */ /* We can't use value of sprintf() as this is not portable */ buf+= my_sprintf(buf, (buf, "MySQL thread id %lu", Loading Loading @@ -330,7 +301,6 @@ innobase_mysql_print_thd( buf=strnmov(buf, thd->query, 150); } *buf='\n'; #endif } } Loading Loading @@ -478,8 +448,7 @@ innobase_init(void) &srv_auto_extend_last_data_file, &srv_last_file_size_max); if (ret == FALSE) { fprintf(stderr, "InnoDB: syntax error in innodb_data_file_path\n"); sql_print_error("InnoDB: syntax error in innodb_data_file_path"); DBUG_RETURN(TRUE); } Loading Loading @@ -925,12 +894,12 @@ ha_innobase::open( norm_name, NULL); if (NULL == ib_table) { fprintf(stderr, "InnoDB: Error: cannot find table %s from the internal data dictionary\n" "InnoDB: of InnoDB though the .frm file for the table exists. Maybe you\n" "InnoDB: have deleted and recreated InnoDB data files but have forgotten\n" "InnoDB: to delete the corresponding .frm files of InnoDB tables, or you\n" "InnoDB: have moved .frm files to another database?\n", sql_print_error("InnoDB error:\n\ Cannot find table %s from the internal data dictionary\n\ of InnoDB though the .frm file for the table exists. Maybe you\n\ have deleted and recreated InnoDB data files but have forgotten\n\ to delete the corresponding .frm files of InnoDB tables, or you\n\ have moved .frm files to another database?", norm_name); free_share(share); Loading Loading @@ -1269,7 +1238,6 @@ ha_innobase::store_key_val_for_row( equal */ bzero(buff, (ref_length - (uint) (buff - buff_start))); DBUG_RETURN(ref_length); } Loading Loading @@ -2124,10 +2092,7 @@ ha_innobase::change_active_index( } if (!prebuilt->index) { fprintf(stderr, "InnoDB: Could not find key n:o %u with name %s from dict cache\n" "InnoDB: for table %s\n", keynr, key ? key->name : "NULL", 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); DBUG_RETURN(1); } Loading Loading @@ -2425,6 +2390,7 @@ ha_innobase::rnd_pos( } if (error) { DBUG_PRINT("error",("Got error: %ld",error)); DBUG_RETURN(error); } Loading @@ -2432,6 +2398,10 @@ ha_innobase::rnd_pos( for the table, and it is == ref_length */ error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT); if (error) { DBUG_PRINT("error",("Got error: %ld",error)); } change_active_index(keynr); Loading @@ -2442,7 +2412,6 @@ ha_innobase::rnd_pos( Stores a reference to the current row to 'ref' field of the handle. Note that in the case where we have generated the clustered index for the table, the function parameter is illogical: we MUST ASSUME that 'record' is the current 'position' of the handle, because if row ref is actually the row id internally generated in InnoDB, then 'record' does not contain it. We just guess that the row id must be for the record where the handle was positioned the last time. */ Loading Loading @@ -2691,7 +2660,7 @@ ha_innobase::create( /* Our function row_get_mysql_key_number_for_index assumes the primary key is always number 0, if it exists */ assert(primary_key_no == -1 || primary_key_no == 0); DBUG_ASSERT(primary_key_no == -1 || primary_key_no == 0); /* Create the keys */ Loading Loading @@ -2772,7 +2741,7 @@ ha_innobase::create( innobase_table = dict_table_get(norm_name, NULL); assert(innobase_table != 0); DBUG_ASSERT(innobase_table != 0); /* Tell the InnoDB server that there might be work for utility threads: */ Loading sql/sql_show.cc +0 −3 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ int mysqld_show_open_tables(THD *thd,const char *db,const char *wild) if (list_open_tables(thd,&tables,db,wild)) DBUG_RETURN(-1); pthread_mutex_lock(&LOCK_open); List_iterator<char> it(tables); while ((table_name=it++)) { Loading @@ -126,11 +125,9 @@ int mysqld_show_open_tables(THD *thd,const char *db,const char *wild) net_store_data(&thd->packet,query_table_status(thd,db,table_name)); if (my_net_write(&thd->net,(char*) thd->packet.ptr(),thd->packet.length())) { pthread_mutex_unlock(&LOCK_open); DBUG_RETURN(-1); } } pthread_mutex_unlock(&LOCK_open); send_eof(&thd->net); DBUG_RETURN(0); } Loading Loading
sql/ha_innobase.cc +18 −49 Original line number Diff line number Diff line Loading @@ -267,35 +267,6 @@ innobase_mysql_print_thd( thd = (THD*) input_thd; buf += sprintf(buf, "MySQL thread id %lu, query id %lu", thd->thread_id, thd->query_id); if (thd->host) { buf += sprintf(buf, " %.30s", thd->host); } if (thd->ip) { buf += sprintf(buf, " %.20s", thd->ip); } if (thd->user) { buf += sprintf(buf, " %.20s", thd->user); } if (thd->proc_info) { buf += sprintf(buf, " %.50s", thd->proc_info); } if (thd->query) { buf += sprintf(buf, "\n%.150s", thd->query); } buf += sprintf(buf, "\n"); #ifdef notdefined /* July 30, 2002 Revert Monty's changes because they seem to make control characters sometimes appear in the output */ /* We can't use value of sprintf() as this is not portable */ buf+= my_sprintf(buf, (buf, "MySQL thread id %lu", Loading Loading @@ -330,7 +301,6 @@ innobase_mysql_print_thd( buf=strnmov(buf, thd->query, 150); } *buf='\n'; #endif } } Loading Loading @@ -478,8 +448,7 @@ innobase_init(void) &srv_auto_extend_last_data_file, &srv_last_file_size_max); if (ret == FALSE) { fprintf(stderr, "InnoDB: syntax error in innodb_data_file_path\n"); sql_print_error("InnoDB: syntax error in innodb_data_file_path"); DBUG_RETURN(TRUE); } Loading Loading @@ -925,12 +894,12 @@ ha_innobase::open( norm_name, NULL); if (NULL == ib_table) { fprintf(stderr, "InnoDB: Error: cannot find table %s from the internal data dictionary\n" "InnoDB: of InnoDB though the .frm file for the table exists. Maybe you\n" "InnoDB: have deleted and recreated InnoDB data files but have forgotten\n" "InnoDB: to delete the corresponding .frm files of InnoDB tables, or you\n" "InnoDB: have moved .frm files to another database?\n", sql_print_error("InnoDB error:\n\ Cannot find table %s from the internal data dictionary\n\ of InnoDB though the .frm file for the table exists. Maybe you\n\ have deleted and recreated InnoDB data files but have forgotten\n\ to delete the corresponding .frm files of InnoDB tables, or you\n\ have moved .frm files to another database?", norm_name); free_share(share); Loading Loading @@ -1269,7 +1238,6 @@ ha_innobase::store_key_val_for_row( equal */ bzero(buff, (ref_length - (uint) (buff - buff_start))); DBUG_RETURN(ref_length); } Loading Loading @@ -2124,10 +2092,7 @@ ha_innobase::change_active_index( } if (!prebuilt->index) { fprintf(stderr, "InnoDB: Could not find key n:o %u with name %s from dict cache\n" "InnoDB: for table %s\n", keynr, key ? key->name : "NULL", 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); DBUG_RETURN(1); } Loading Loading @@ -2425,6 +2390,7 @@ ha_innobase::rnd_pos( } if (error) { DBUG_PRINT("error",("Got error: %ld",error)); DBUG_RETURN(error); } Loading @@ -2432,6 +2398,10 @@ ha_innobase::rnd_pos( for the table, and it is == ref_length */ error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT); if (error) { DBUG_PRINT("error",("Got error: %ld",error)); } change_active_index(keynr); Loading @@ -2442,7 +2412,6 @@ ha_innobase::rnd_pos( Stores a reference to the current row to 'ref' field of the handle. Note that in the case where we have generated the clustered index for the table, the function parameter is illogical: we MUST ASSUME that 'record' is the current 'position' of the handle, because if row ref is actually the row id internally generated in InnoDB, then 'record' does not contain it. We just guess that the row id must be for the record where the handle was positioned the last time. */ Loading Loading @@ -2691,7 +2660,7 @@ ha_innobase::create( /* Our function row_get_mysql_key_number_for_index assumes the primary key is always number 0, if it exists */ assert(primary_key_no == -1 || primary_key_no == 0); DBUG_ASSERT(primary_key_no == -1 || primary_key_no == 0); /* Create the keys */ Loading Loading @@ -2772,7 +2741,7 @@ ha_innobase::create( innobase_table = dict_table_get(norm_name, NULL); assert(innobase_table != 0); DBUG_ASSERT(innobase_table != 0); /* Tell the InnoDB server that there might be work for utility threads: */ Loading
sql/sql_show.cc +0 −3 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ int mysqld_show_open_tables(THD *thd,const char *db,const char *wild) if (list_open_tables(thd,&tables,db,wild)) DBUG_RETURN(-1); pthread_mutex_lock(&LOCK_open); List_iterator<char> it(tables); while ((table_name=it++)) { Loading @@ -126,11 +125,9 @@ int mysqld_show_open_tables(THD *thd,const char *db,const char *wild) net_store_data(&thd->packet,query_table_status(thd,db,table_name)); if (my_net_write(&thd->net,(char*) thd->packet.ptr(),thd->packet.length())) { pthread_mutex_unlock(&LOCK_open); DBUG_RETURN(-1); } } pthread_mutex_unlock(&LOCK_open); send_eof(&thd->net); DBUG_RETURN(0); } Loading