summaryrefslogtreecommitdiff
path: root/sql/table.cc
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 /sql/table.cc
parent864571fd97f2b4b58ddef08b0f71e85525514bc2 (diff)
downloadmariadb-git-43a4d55eefaf7409f708377b712ff306c28cc1e1.tar.gz
set table->charset to default for 3.22 .frm files (bug #1161)
sql/unireg.cc: cleanup
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc5
1 files changed, 3 insertions, 2 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;