Kevin,
the patch looks good. However I would still like to see a check for -1
and not for < 0.
Can you please update your patch?
On Di, 2008-12-16 at 20:03 +0100, Kevin Lewis wrote:
> 2936 Kevin Lewis 2008-12-16
> Bug#41035 - It is possible for record objects to contain a
> recordNumber == -1. Table::getSyncPrior() is not prepared
> for this and will return a bad pointer.
> modified:
> storage/falcon/Table.cpp
>
> === modified file 'storage/falcon/Table.cpp'
> --- a/storage/falcon/Table.cpp 2008-11-20 17:05:50 +0000
> +++ b/storage/falcon/Table.cpp 2008-12-16 16:00:51 +0000
> @@ -3808,7 +3808,8 @@ void Table::deleteRecordBacklog(int32 re
>
> SyncObject* Table::getSyncPrior(Record* record)
> {
> - int lockNumber = record->recordNumber % SYNC_VERSIONS_SIZE;
> + int recNumber = (record->recordNumber < 0) ? 0 : record->recordNumber;
> + int lockNumber = recNumber % SYNC_VERSIONS_SIZE;
> return syncPriorVersions + lockNumber;
> }
>
>
>
--
Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160
98953296
Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 49.011, 8.376