diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-04-20 15:02:24 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-04-20 15:02:24 +0200 |
commit | a9f4cb486a76f9369386b3750c8571304f4503c6 (patch) | |
tree | 6878e83ceed246000305f0545616f0100c439da1 /pgsql.c | |
parent | c3d9180d29a2ef7972420c6e1a558715285682e4 (diff) | |
download | pgfuse-a9f4cb486a76f9369386b3750c8571304f4503c6.tar.gz pgfuse-a9f4cb486a76f9369386b3750c8571304f4503c6.tar.bz2 |
-
Diffstat (limited to 'pgsql.c')
-rw-r--r-- | pgsql.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -483,7 +483,7 @@ update_again: } else if( offset == 0 && len < STANDARD_BLOCK_SIZE ) { sprintf( sql, "UPDATE data set data = $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::int4 AND block_no=$2::int4", - len + 1, STANDARD_BLOCK_SIZE - (unsigned int)len ); + (unsigned int)len + 1, STANDARD_BLOCK_SIZE - (unsigned int)len ); /* keep data on the left */ } else if( offset > 0 && offset + len == STANDARD_BLOCK_SIZE ) { @@ -496,7 +496,7 @@ update_again: sprintf( sql, "UPDATE data set data = substring( data from %d for %d ) || $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::int4 AND block_no=$2::int4", 1, (unsigned int)offset, - (unsigned int)offset + len + 1, STANDARD_BLOCK_SIZE - ( (unsigned int)offset + (unsigned int)len ) ); + (unsigned int)offset + (unsigned int)len + 1, STANDARD_BLOCK_SIZE - ( (unsigned int)offset + (unsigned int)len ) ); /* we should never get here */ } else { |