summaryrefslogtreecommitdiff
path: root/storage/maria/ma_checksum.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2007-09-09 19:15:10 +0300
committerunknown <monty@mysql.com/nosik.monty.fi>2007-09-09 19:15:10 +0300
commit155193a6e27b22e5557e536dd9189e26bbb8fb3a (patch)
tree2fc6f1290733619db80ad29eb78ed30f4cec06b6 /storage/maria/ma_checksum.c
parent58ac5254fabb2e571af18f15aba874121a92a05f (diff)
downloadmariadb-git-155193a6e27b22e5557e536dd9189e26bbb8fb3a.tar.gz
Added applying of undo for updates
Fixed bug in duplicate key handling for block records during repair All read-row methods now return error number in case of error Don't calculate checksum for null fields Fixed bug when running maria_read_log with -o BUILD/SETUP.sh: Added STACK_DIRECTION BUILD/compile-pentium-debug-max: Moved STACK_DIRECTION to SETUP include/myisam.h: Added extra parameter to write_key storage/maria/ma_blockrec.c: Added applying of undo for updates Fixed indentation Removed some not needed casts Fixed wrong logging of CLR record Split ma_update_block_record to two functions to be able to reuse it from undo-applying Simplify filling of packed fields ma_record_block_record) now returns error number on failure Sligtly changed log record information for undo-update storage/maria/ma_check.c: Fixed bug in duplicate key handling for block records during repair storage/maria/ma_checksum.c: Don't calculate checksum for null fields storage/maria/ma_dynrec.c: _ma_read_dynamic_reocrd() now returns error number on error Rest of the changes are code simplification and indentation fixes storage/maria/ma_locking.c: Added comment storage/maria/ma_loghandler.c: More debugging Removed printing of total_record_length as this was always same as record_length storage/maria/ma_open.c: Allocate bitmap for changed fields storage/maria/ma_packrec.c: read_record now returns error number on error storage/maria/ma_recovery.c: Fixed wrong arguments to undo_row_update storage/maria/ma_statrec.c: read_record now returns error number on error (not 1) Code simplification storage/maria/ma_test1.c: Added exit possibility after update phase (to test undo of updates) storage/maria/maria_def.h: Include bitmap header file storage/maria/maria_read_log.c: Fixed bug when running with -o
Diffstat (limited to 'storage/maria/ma_checksum.c')
-rw-r--r--storage/maria/ma_checksum.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/maria/ma_checksum.c b/storage/maria/ma_checksum.c
index 30921ad8213..9076b3ebb86 100644
--- a/storage/maria/ma_checksum.c
+++ b/storage/maria/ma_checksum.c
@@ -31,6 +31,9 @@ ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
const uchar *pos= record + column->offset;
ulong length;
+ if (record[column->null_pos] & column->null_bit)
+ continue; /* Null field */
+
switch (column->type) {
case FIELD_BLOB:
{
@@ -45,12 +48,12 @@ ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
}
case FIELD_VARCHAR:
{
- uint pack_length= HA_VARCHAR_PACKLENGTH(column->length-1);
+ uint pack_length= column->fill_length;
if (pack_length == 1)
length= (ulong) *(uchar*) pos;
else
length= uint2korr(pos);
- pos+= pack_length;
+ pos+= pack_length; /* Skip length information */
break;
}
default: