Commit 43a4d55e authored by unknown's avatar unknown

set table->charset to default for 3.22 .frm files (bug #1161)


sql/unireg.cc:
  cleanup
parent 864571fd
...@@ -137,10 +137,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, ...@@ -137,10 +137,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
outparam->raid_type= head[41]; outparam->raid_type= head[41];
outparam->raid_chunks= head[42]; outparam->raid_chunks= head[42];
outparam->raid_chunksize= uint4korr(head+43); outparam->raid_chunksize= uint4korr(head+43);
if (!(outparam->table_charset=get_charset((uint) head[38],MYF(0)))) outparam->table_charset=get_charset((uint) head[38],MYF(0));
outparam->table_charset=default_charset_info; // QQ display error message?
null_field_first=1; null_field_first=1;
} }
if (!outparam->table_charset) /* unknown charset in head[38] or pre-3.23 frm */
outparam->table_charset=default_charset_info;
outparam->db_record_offset=1; outparam->db_record_offset=1;
if (db_create_options & HA_OPTION_LONG_BLOB_PTR) if (db_create_options & HA_OPTION_LONG_BLOB_PTR)
outparam->blob_ptr_size=portable_sizeof_char_ptr; outparam->blob_ptr_size=portable_sizeof_char_ptr;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
static uchar * pack_screens(List<create_field> &create_fields, static uchar * pack_screens(List<create_field> &create_fields,
uint *info_length, uint *screens, bool small_file); uint *info_length, uint *screens, bool small_file);
static uint pack_keys(uchar *keybuff,uint key_count, KEY *key_info); static uint pack_keys(uchar *keybuff,uint key_count, KEY *key_info);
static bool pack_header(uchar *forminfo, enum db_type table_type, static bool pack_header(uchar *forminfo,enum db_type table_type,
List<create_field> &create_fields, List<create_field> &create_fields,
uint info_length, uint screens, uint table_options, uint info_length, uint screens, uint table_options,
handler *file); handler *file);
......
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