X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdbi.c;h=ce4cd02f551a5cc1f47aca54d1a2c5425764dd11;hb=b5ed3c9b617ba78a98f3ef279bb3efa325536080;hp=d970938e0fff0d616c93eeaa435a09a3805d45e5;hpb=9b38f5f412d6b33cd0e5be812d830f09bef72647;p=collectd.git diff --git a/src/dbi.c b/src/dbi.c index d970938e..ce4cd02f 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -126,10 +126,19 @@ static int cdbi_result_get_field (dbi_result res, /* {{{ */ else sstrncpy (buffer, value, buffer_size); } + /* DBI_TYPE_BINARY */ + /* DBI_TYPE_DATETIME */ else { - ERROR ("dbi plugin: cdbi_result_get: Don't know how to handle " - "source type %hu.", src_type); + const char *field_name; + + field_name = dbi_result_get_field_name (res, index); + if (field_name == NULL) + field_name = ""; + + ERROR ("dbi plugin: Column `%s': Don't know how to handle " + "source type %hu.", + field_name, src_type); return (-1); } @@ -357,7 +366,7 @@ static int cdbi_config (oconfig_item_t *ci) /* {{{ */ oconfig_item_t *child = ci->children + i; if (strcasecmp ("Query", child->key) == 0) udb_query_create (&queries, &queries_num, child, - /* callback = */ NULL); + /* callback = */ NULL, /* legacy mode = */ 0); else if (strcasecmp ("Database", child->key) == 0) cdbi_config_add_database (child); else