提交 4bbd9a4c authored 作者: Jeff Lenk's avatar Jeff Lenk

FS-2825 add additional info when fail

上级 0a0e79e1
...@@ -702,8 +702,11 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_ ...@@ -702,8 +702,11 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_
if (runtime.odbc_dbtype == DBTYPE_DEFAULT) { if (runtime.odbc_dbtype == DBTYPE_DEFAULT) {
switch_cache_db_execute_sql_real(dbh, "BEGIN", &errmsg); switch_cache_db_execute_sql_real(dbh, "BEGIN", &errmsg);
} else { } else {
if (switch_odbc_SQLSetAutoCommitAttr(dbh->native_handle.odbc_dbh, 0) != SWITCH_ODBC_SUCCESS) { switch_odbc_status_t result;
errmsg = strdup("Unable to Set AutoCommit Off.");; if ((result = switch_odbc_SQLSetAutoCommitAttr(dbh->native_handle.odbc_dbh, 0)) != SWITCH_ODBC_SUCCESS) {
char tmp[100];
switch_snprintf(tmp, sizeof(tmp), "%s-%i", "Unable to Set AutoCommit Off", result);
errmsg = strdup(tmp);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论