- DEBUG ("dbi plugin: cdbi_connect_database (%s): "
- "key = %s; value = %s;",
- db->name,
- db->driver_options[i].key,
- db->driver_options[i].value);
+ if (db->driver_options[i].is_numeric)
+ {
+ status = dbi_conn_set_option_numeric (connection,
+ db->driver_options[i].key, db->driver_options[i].value.numeric);
+ if (status != 0)
+ {
+ char errbuf[1024];
+ ERROR ("dbi plugin: cdbi_connect_database (%s): "
+ "dbi_conn_set_option_numeric (\"%s\", %i) failed: %s.",
+ db->name,
+ db->driver_options[i].key, db->driver_options[i].value.numeric,
+ cdbi_strerror (connection, errbuf, sizeof (errbuf)));
+ }
+ }
+ else
+ {
+ status = dbi_conn_set_option (connection,
+ db->driver_options[i].key, db->driver_options[i].value.string);
+ if (status != 0)
+ {
+ char errbuf[1024];
+ ERROR ("dbi plugin: cdbi_connect_database (%s): "
+ "dbi_conn_set_option (\"%s\", \"%s\") failed: %s.",
+ db->name,
+ db->driver_options[i].key, db->driver_options[i].value.string,
+ cdbi_strerror (connection, errbuf, sizeof (errbuf)));
+ }
+ }