summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-09-28 18:47:22 +0200
committerunknown <serg@serg.mylan>2003-09-28 18:47:22 +0200
commit43a4d55eefaf7409f708377b712ff306c28cc1e1 (patch)
tree295f47d97e9be8136366acc6496aabaab87d8830
parent864571fd97f2b4b58ddef08b0f71e85525514bc2 (diff)
downloadmariadb-git-43a4d55eefaf7409f708377b712ff306c28cc1e1.tar.gz
set table->charset to default for 3.22 .frm files (bug #1161)
sql/unireg.cc: cleanup
-rw-r--r--sql/table.cc5
-rw-r--r--sql/unireg.cc2
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 5e7991436a1..986a82cf9d2 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -137,10 +137,11 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
outparam->raid_type= head[41];
outparam->raid_chunks= head[42];
outparam->raid_chunksize= uint4korr(head+43);
- if (!(outparam->table_charset=get_charset((uint) head[38],MYF(0))))
- outparam->table_charset=default_charset_info; // QQ display error message?
+ outparam->table_charset=get_charset((uint) head[38],MYF(0));
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;
if (db_create_options & HA_OPTION_LONG_BLOB_PTR)
outparam->blob_ptr_size=portable_sizeof_char_ptr;
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 3e634f54b4f..be14448bd1d 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -33,7 +33,7 @@
static uchar * pack_screens(List<create_field> &create_fields,
uint *info_length, uint *screens, bool small_file);
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,
uint info_length, uint screens, uint table_options,
handler *file);