Below is the list of changes that have just been committed into a local
5.1 repository of bar. When bar 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.2014 05/12/31 09:02:56 bar@stripped +2 -0
Merge abarkov@stripped:/home/bk/mysql-5.1-new
into mysql.com:/usr/home/bar/mysql-5.1-new.fscs3
sql/table.cc
1.198 05/12/31 09:02:47 bar@stripped +0 -0
Auto merged
sql/mysqld.cc
1.511 05/12/31 09:02:47 bar@stripped +0 -0
Auto merged
# 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: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.1-new.fscs3/RESYNC
--- 1.510/sql/mysqld.cc 2005-12-30 15:07:49 +04:00
+++ 1.511/sql/mysqld.cc 2005-12-31 09:02:47 +04:00
@@ -511,7 +511,7 @@
language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN],
*opt_init_file, *opt_tc_log_file,
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
-
+uint reg_ext_length;
const key_map key_map_empty(0);
key_map key_map_full(0); // Will be initialized later
@@ -7455,7 +7455,7 @@
dir=tmp_path;
}
return !fn_format(to, name, dir, extension,
- MY_REPLACE_EXT | MY_UNPACK_FILENAME | MY_SAFE_PATH);
+ MY_APPEND_EXT | MY_UNPACK_FILENAME | MY_SAFE_PATH);
}
--- 1.197/sql/table.cc 2005-12-29 17:27:44 +04:00
+++ 1.198/sql/table.cc 2005-12-31 09:02:47 +04:00
@@ -43,6 +43,37 @@
}
+
+/*
+ Returns pointer to '.frm' extension of the file name.
+
+ SYNOPSIS
+ fn_rext()
+ name file name
+
+ DESCRIPTION
+ Checks file name part starting with the rightmost '.' character,
+ and returns it if it is equal to '.frm'.
+
+ TODO
+ It is a good idea to get rid of this function modifying the code
+ to garantee that the functions presently calling fn_rext() always
+ get arguments in the same format: either with '.frm' or without '.frm'.
+
+ RETURN VALUES
+ Pointer to the '.frm' extension. If there is no extension,
+ or extension is not '.frm', pointer at the end of file name.
+*/
+
+char *fn_rext(char *name)
+{
+ char *res= strrchr(name, '.');
+ if (res && !strcmp(res, ".frm"))
+ return res;
+ return name + strlen(name);
+}
+
+
/*
Allocate a setup TABLE_SHARE structure
@@ -65,9 +96,13 @@
char path[FN_REFLEN], normalized_path[FN_REFLEN];
uint path_length, normalized_length;
- path_length= (uint) (strxmov(path, mysql_data_home, "/", table_list->db,
- "/", table_list->table_name, NullS) - path);
- normalized_length= unpack_filename(normalized_path, path);
+ path_length= build_table_filename(path, sizeof(path) - 1,
+ table_list->db,
+ table_list->table_name, "");
+ normalized_length= build_table_filename(normalized_path,
+ sizeof(normalized_path) - 1,
+ table_list->db,
+ table_list->table_name, "");
init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
if ((share= (TABLE_SHARE*) alloc_root(&mem_root,
@@ -1883,6 +1918,7 @@
res->append('\'');
}
+
/* Create a .frm file */
File create_frm(THD *thd, const char *name, const char *db,
@@ -2103,9 +2139,6 @@
#else
last_char_is_space= *name==' ';
#endif
- if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
- *name == FN_EXTCHAR)
- return 1;
name++;
}
return last_char_is_space || (uint) (name - start) > NAME_LEN;
@@ -2114,8 +2147,7 @@
/*
Allow anything as a table name, as long as it doesn't contain an
- a '/', or a '.' character
- or ' ' at the end
+ ' ' at the end
returns 1 on error
*/
@@ -2146,8 +2178,6 @@
}
}
#endif
- if (*name == '/' || *name == '\\' || *name == FN_EXTCHAR)
- return 1;
name++;
}
#if defined(USE_MB) && defined(USE_MB_IDENT)
| Thread |
|---|
| • bk commit into 5.1 tree (bar:1.2014) | bar | 31 Dec |