Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Do a slow-path in GetVarint32() for varints that do not fit in 32 bits. This will only happen when trying to interpret a corrupt database file so speed is not critical. (CVS 5129) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6a6b9437367b66c3b6f710cf3abbdb98 |
User & Date: | drh 2008-05-13 16:41:50.000 |
Context
2008-05-13
| ||
19:41 | On instruction from DRH, only do malloc failure tests for O/S ops on non-Windows systems. Better test fixture code will be introduced in 3.6.0 to add this coverage back in for Windows. (CVS 5130) (check-in: e4aab15004 user: shane tags: trunk) | |
16:41 | Do a slow-path in GetVarint32() for varints that do not fit in 32 bits. This will only happen when trying to interpret a corrupt database file so speed is not critical. (CVS 5129) (check-in: 6a6b943736 user: drh tags: trunk) | |
13:27 | Make the benign-fault setting recursive. Make all malloc failures during a rollback benign since there is nothing we can do about them. (CVS 5128) (check-in: a9d1d93135 user: drh tags: trunk) | |
Changes
Changes to src/util.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** ** $Id: util.c,v 1.229 2008/05/13 16:41:50 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> #include <ctype.h> /* |
︙ | ︙ | |||
776 777 778 779 780 781 782 | a &= (0x7f<<28)|(0x7f<<14)|(0x7f); b &= (0x7f<<28)|(0x7f<<14)|(0x7f); b = b<<7; *v = a | b; return 5; } | | | > | < < < < < < < < | < < | < < | < < | | < < | < < < < < < < < < | | < < < < < < < < < < < | 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | a &= (0x7f<<28)|(0x7f<<14)|(0x7f); b &= (0x7f<<28)|(0x7f<<14)|(0x7f); b = b<<7; *v = a | b; return 5; } /* We can only reach this point when reading a corrupt database ** file. In that case we are not in any hurry. Use the (relatively ** slow) general-purpose sqlite3GetVarint() routine to extract the ** value. */ { u64 v64; int n; p -= 4; n = sqlite3GetVarint(p, &v64); assert( n>5 && n<=9 ); *v = (u32)v64; return n; } } /* ** Return the number of bytes that will be needed to store the given ** 64-bit integer. */ int sqlite3VarintLen(u64 v){ |
︙ | ︙ |