diff options
author | unknown <gluh@mysql.com/gluh.(none)> | 2006-10-05 16:38:21 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com/gluh.(none)> | 2006-10-05 16:38:21 +0500 |
commit | 287b027ed89e1c026576adda1c55b8386c6180de (patch) | |
tree | bb96e074869c17c0c81263693267ed76e7b52af4 /sql/table.cc | |
parent | 568eeb26bf039fd2a6c6d6edd8b11c1b8effce83 (diff) | |
parent | 5549ed3a4a5bfe84ff6a0561cab4e0cda7c470bc (diff) | |
download | mariadb-git-287b027ed89e1c026576adda1c55b8386c6180de.tar.gz |
Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1-kt
include/m_ctype.h:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sql/table.cc b/sql/table.cc index f22caf36679..0682bcf8998 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -77,6 +77,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, my_string record; const char **int_array; bool use_hash, null_field_first; + bool error_reported= FALSE; File file; Field **field_ptr,*reg_field; KEY *keyinfo; @@ -805,6 +806,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, error= 1; my_errno= ENOENT; } + else + { + outparam->file->print_error(err, MYF(0)); + error_reported= TRUE; + } goto err_not_open; /* purecov: inspected */ } } @@ -826,7 +832,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, err_end: /* Here when no file */ delete crypted; *root_ptr= old_root; - frm_error(error, outparam, name, ME_ERROR + ME_WAITTANG, errarg); + if (!error_reported) + frm_error(error, outparam, name, ME_ERROR + ME_WAITTANG, errarg); delete outparam->file; outparam->file=0; // For easyer errorchecking outparam->db_stat=0; @@ -1427,7 +1434,7 @@ char *get_field(MEM_ROOT *mem, Field *field) bool check_db_name(char *name) { - uint name_length= 0; // name length in symbols + char *start= name; /* Used to catch empty names and names with end space */ bool last_char_is_space= TRUE; @@ -1444,7 +1451,6 @@ bool check_db_name(char *name) name+system_charset_info->mbmaxlen); if (len) { - name_length++; name += len; continue; } @@ -1452,13 +1458,12 @@ bool check_db_name(char *name) #else last_char_is_space= *name==' '; #endif - name_length++; if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR || *name == FN_EXTCHAR) return 1; name++; } - return (last_char_is_space || name_length > NAME_LEN); + return last_char_is_space || (uint) (name - start) > NAME_LEN; } |