summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-02-07 15:47:24 +0200
committermonty@mashka.mysql.fi <>2003-02-07 15:47:24 +0200
commit25de9c19b2b76ff56bfa69b99033b14262f974ff (patch)
tree0661c54a51aa711947173e8a8e27e2e46cfa971c /sql/unireg.cc
parent023d6dd39b9068ab8096c5ec60ab82bd10dbcee2 (diff)
downloadmariadb-git-25de9c19b2b76ff56bfa69b99033b14262f974ff.tar.gz
After merge fixes & remove compiler warnings
Added lengths for all MYSQL_FIELD string parameters Changed field length to 2 byte in .frm files
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index a171ba42ff3..1cd38d4d161 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -28,7 +28,7 @@
#include "mysql_priv.h"
#include <m_ctype.h>
-#define FCOMP 15 /* Bytes for a packed field */
+#define FCOMP 17 /* Bytes for a packed field */
static uchar * pack_screens(List<create_field> &create_fields,
uint *info_length, uint *screens, bool small_file);
@@ -451,15 +451,15 @@ static bool pack_fields(File file,List<create_field> &create_fields)
buff[0]= (uchar) field->row;
buff[1]= (uchar) field->col;
buff[2]= (uchar) field->sc_length;
- buff[3]= (uchar) field->length;
+ int2store(buff+3, field->length);
uint recpos=(uint) field->offset+1;
- int2store(buff+4,recpos);
- int2store(buff+6,field->pack_flag);
- int2store(buff+8,field->unireg_check);
- buff[10]= (uchar) field->interval_id;
- buff[11]= (uchar) field->sql_type;
- buff[12]= (uchar) field->charset->number;
- int2store(buff+13, field->comment.length);
+ int3store(buff+5,recpos);
+ int2store(buff+8,field->pack_flag);
+ int2store(buff+10,field->unireg_check);
+ buff[12]= (uchar) field->interval_id;
+ buff[13]= (uchar) field->sql_type;
+ buff[14]= (uchar) field->charset->number;
+ int2store(buff+15, field->comment.length);
comment_length+= field->comment.length;
set_if_bigger(int_count,field->interval_id);
if (my_write(file,(byte*) buff,FCOMP,MYF_RW))