summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_dynrec.c
diff options
context:
space:
mode:
authorunknown <antony@pcg5ppc.xiphis.org>2008-03-07 13:46:29 -0800
committerunknown <antony@pcg5ppc.xiphis.org>2008-03-07 13:46:29 -0800
commit7b5da0aa77b070d997f40cdc73d1bf8ccd503ed7 (patch)
tree5eca346659ddf3033d7dcf7b2af9b45a8f391a92 /storage/myisam/mi_dynrec.c
parent6c2420ed3c0e074fc3b7f47ce00e7ce220906e2c (diff)
parente0075179c3b69770ad7d8a5a9d1373ff1657e79f (diff)
downloadmariadb-git-7b5da0aa77b070d997f40cdc73d1bf8ccd503ed7.tar.gz
Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1 configure.in: Auto merged include/mysql/plugin.h: Auto merged mysql-test/r/information_schema.result: Auto merged mysql-test/r/partition_innodb.result: Auto merged mysql-test/t/information_schema.test: Auto merged mysql-test/t/partition_innodb.test: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_partition.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged storage/myisam/mi_dynrec.c: Auto merged
Diffstat (limited to 'storage/myisam/mi_dynrec.c')
-rw-r--r--storage/myisam/mi_dynrec.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c
index 7e5f710c02c..8b9fa445a96 100644
--- a/storage/myisam/mi_dynrec.c
+++ b/storage/myisam/mi_dynrec.c
@@ -1006,12 +1006,12 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
{
if (rec->length > 255 && new_length > 127)
{
- to[0]=(char) ((new_length & 127)+128);
- to[1]=(char) (new_length >> 7);
- to+=2;
- }
- else
- *to++= (char) new_length;
+ to[0]= (uchar) ((new_length & 127) + 128);
+ to[1]= (uchar) (new_length >> 7);
+ to+=2;
+ }
+ else
+ *to++= (uchar) new_length;
memcpy((uchar*) to,pos,(size_t) new_length); to+=new_length;
flag|=bit;
}
@@ -1045,7 +1045,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
}
if ((bit= bit << 1) >= 256)
{
- *packpos++ = (char) (uchar) flag;
+ *packpos++= (uchar) flag;
bit=1; flag=0;
}
}
@@ -1055,9 +1055,9 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
}
}
if (bit != 1)
- *packpos= (char) (uchar) flag;
+ *packpos= (uchar) flag;
if (info->s->calc_checksum)
- *to++=(char) info->checksum;
+ *to++= (uchar) info->checksum;
DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos)));
DBUG_RETURN((uint) (to-startpos));
} /* _mi_rec_pack */
@@ -1128,12 +1128,14 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff,
goto err;
if (rec->length > 255 && new_length > 127)
{
- if (to[0] != (char) ((new_length & 127)+128) ||
- to[1] != (char) (new_length >> 7))
- goto err;
- to+=2;
- }
- else if (*to++ != (char) new_length)
+ /* purecov: begin inspected */
+ if (to[0] != (uchar) ((new_length & 127) + 128) ||
+ to[1] != (uchar) (new_length >> 7))
+ goto err;
+ to+=2;
+ /* purecov: end */
+ }
+ else if (*to++ != (uchar) new_length)
goto err;
to+=new_length;
}