From: Date: May 26 2005 7:01pm Subject: bk commit into 4.1 tree (jimw:1.2292) BUG#9660 List-Archive: http://lists.mysql.com/internals/25318 X-Bug: 9660 Message-Id: <20050526170130.6E50DA8367@rama.trainedmonkey.com> Below is the list of changes that have just been committed into a local 4.1 repository of jimw. When jimw does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2292 05/05/26 10:01:26 jimw@stripped +1 -0 Cleanups to patch for bug #9660 after review by Monty. sql/sql_table.cc 1.283 05/05/26 09:51:05 jimw@stripped +10 -9 Make return value of build_table_path() useful Eliminate some unnecessary casts # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jimw # Host: rama.(none) # Root: /home/jimw/my/mysql-4.1-9660 --- 1.282/sql/sql_table.cc 2005-05-25 20:26:38 -07:00 +++ 1.283/sql/sql_table.cc 2005-05-26 09:51:05 -07:00 @@ -54,16 +54,16 @@ ext Filename extension RETURN - FALSE Always -- see usage in mysql_create_indexes() + 0 Error + # Size of path */ -static bool build_table_path(char *buff, size_t bufflen, const char *db, +static uint build_table_path(char *buff, size_t bufflen, const char *db, const char *table, const char *ext) { strxnmov(buff, bufflen-1, mysql_data_home, "/", db, "/", table, ext, NullS); - unpack_filename(buff,buff); - return FALSE; + return unpack_filename(buff,buff); } @@ -1611,14 +1611,13 @@ to_base= lc_to; } - if (!(error=file->rename_table((const char*) from_base, - (const char *) to_base))) + if (!(error=file->rename_table(from_base, to_base))) { if (rename_file_ext(from,to,reg_ext)) { error=my_errno; /* Restore old file name */ - file->rename_table((const char*) to_base, (const char *) from_base); + file->rename_table(to_base, from_base); } } delete file; @@ -2600,7 +2599,8 @@ if (table->file->add_index(table, key_info_buffer, key_count)|| build_table_path(path, sizeof(path), table_list->db, (lower_case_table_names == 2) ? - table_list->alias : table_list->real_name, reg_ext) || + table_list->alias : table_list->real_name, + reg_ext) != 0 || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /* don't need to free((gptr) key_info_buffer);*/ @@ -2700,7 +2700,8 @@ /*select_field_count*/ 0)|| build_table_path(path, sizeof(path), table_list->db, (lower_case_table_names == 2) ? - table_list->alias : table_list->real_name, reg_ext) || + table_list->alias : table_list->real_name, + reg_ext) != 0 || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /*don't need to free((gptr) key_numbers);*/