Also print a warning when a table is opened or created which contains
a column description with OSL_RBTREE set but OSL_UNIQUE unset. Future
versions of osl might reject such table descriptions. But in order
to not break existing applications, we can not make such a change
without a deprecation period. So a warning has to suffice for now.
ret = -E_OSL_BAD_STORAGE_FLAGS;
if (st == OSL_DISK_STORAGE && sf & OSL_RBTREE)
goto err;
+ if ((sf & OSL_RBTREE) && !(sf & OSL_UNIQUE))
+ WARNING_LOG("invalid storage flags for column %s: "
+ "OSL_RBTREE && !OSL_UNIQUE\n", cd->name);
ret = -E_OSL_BAD_STORAGE_SIZE;
if (sf & OSL_FIXED_SIZE && !cd->data_size)
goto err;
OSL_RBTREE = 1,
/** The data for this column will have constant size. */
OSL_FIXED_SIZE = 2,
- /** All values of this column will be different. */
+ /** All values are different. Must be set if \p OSL_RBTREE is set. */
OSL_UNIQUE = 4,
/** Do not free the data for this column (\p OSL_NO_STORAGE). */
OSL_DONT_FREE = 8