# HG changeset patch # User Timo Sirainen # Date 1502796460 -10800 # Node ID b6c3fc6d0cc057a106e13300bce80a9d5139e918 # Parent 7d189977dfe3b99189ed478c133ef667d831e57f dict-sql: Change "uint" type to mean 64bit instead of 32bit integer. This is likely what is usually wanted (especially in e.g. quotas). If someone actually wants it to be restricted to 32bit, we could add uint32 later on. diff -r 7d189977dfe3 -r b6c3fc6d0cc0 src/lib-dict/dict-sql.c --- a/src/lib-dict/dict-sql.c Tue Aug 22 11:37:17 2017 +0300 +++ b/src/lib-dict/dict-sql.c Tue Aug 15 14:27:40 2017 +0300 @@ -231,7 +231,7 @@ const char **error_r) { buffer_t *buf; - unsigned int num; + uint64_t num; switch (value_type) { case DICT_SQL_TYPE_STRING: @@ -239,13 +239,13 @@ value_suffix); return 0; case DICT_SQL_TYPE_UINT: - if (value_suffix[0] != '\0' || str_to_uint(value, &num) < 0) { + if (value_suffix[0] != '\0' || str_to_uint64(value, &num) < 0) { *error_r = t_strdup_printf( - "%s field's value isn't unsigned integer: %s%s (in pattern: %s)", + "%s field's value isn't 64bit unsigned integer: %s%s (in pattern: %s)", field_name, value, value_suffix, map->pattern); return -1; } - str_printfa(str, "%u", num); + str_printfa(str, "%llu", (unsigned long long)num); return 0; case DICT_SQL_TYPE_HEXBLOB: break;