From: Sebastian Harl Date: Tue, 3 Sep 2013 09:05:38 +0000 (+0200) Subject: t/utils/dbi_test: Added missing cases in dbi_result_get_field_length_idx(). X-Git-Tag: sysdb-0.1.0~359 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e7888309bfc2573cc1026b2e461e71be4fc5497c;p=sysdb.git t/utils/dbi_test: Added missing cases in dbi_result_get_field_length_idx(). --- diff --git a/t/utils/dbi_test.c b/t/utils/dbi_test.c index f6a860c..1666d6e 100644 --- a/t/utils/dbi_test.c +++ b/t/utils/dbi_test.c @@ -304,12 +304,16 @@ dbi_result_get_field_length_idx(dbi_result res, unsigned int i) switch (current_query->field_types[i]) { case DBI_TYPE_INTEGER: + return sizeof(long long); break; case DBI_TYPE_DECIMAL: + return sizeof(double); break; case DBI_TYPE_STRING: + return strlen(get_golden_data(res, i).string) + 1; break; case DBI_TYPE_DATETIME: + return sizeof(time_t); break; case DBI_TYPE_BINARY: return get_golden_data(res, i).binary.length;