microsoft / Extensible-Storage-Engine

ESE is an embedded / ISAM-based database engine, that provides rudimentary table and indexed access. However the library provides many other strongly layered and and thus reusable sub-facilities as well: A Synchronization / Locking library, a Data-structures / STL-like library, an OS-abstraction layer, and a Cache Manager, as well the full blown database engine itself
MIT License
819 stars 62 forks source link

cpage_test.cxx: Fix build error caused by mismatching defines #15

Closed evgenykotkov closed 3 years ago

evgenykotkov commented 3 years ago

The PageValidationBig() test uses #ifdef DEBUG and #ifndef RTM as if they were interchangeable, but this is not so at least in the RelWithDebInfo cmake configuration.

This currently causes the following errors when building the RelWithDebInfo configuration:

error C2065: 'fPreviouslySet': undeclared identifier

This PR fixes it by consistently using #ifndef RTM, as it's already being used in the other similar tests in cpage_test.cxx.

(Perhaps, the RelWithDebInfo configuration could use the same defines as Release, but the code discrepancy seems to be worth fixing by itself.)

2BitSalute commented 3 years ago

Yeah, I remember looking at this test and fixing something else related to these #defs. Internally, we only build retail or debug, so this is not something we would have discovered.