Module: kamailio
Branch: 5.2
Commit: 5f8114102fb64510b283ceba7f10a3345e632d70
URL:
https://github.com/kamailio/kamailio/commit/5f8114102fb64510b283ceba7f10a33…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: 2019-05-10T10:12:30-04:00
db_text: throw an error and abort instead of silently truncate tables
(cherry picked from commit 3ed1fcdbb9247b1eb10d8d544f2a67b277bd1031)
---
Modified: src/modules/db_text/dbt_base.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5f8114102fb64510b283ceba7f10a33…
Patch:
https://github.com/kamailio/kamailio/commit/5f8114102fb64510b283ceba7f10a33…
---
diff --git a/src/modules/db_text/dbt_base.c b/src/modules/db_text/dbt_base.c
index c850501952..d6d9d73f21 100644
--- a/src/modules/db_text/dbt_base.c
+++ b/src/modules/db_text/dbt_base.c
@@ -296,6 +296,11 @@ int dbt_query(db1_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t*
_v,
}
_drp = _drp->next;
}
+ if (_drp && counter == _db_text_max_result_rows)
+ {
+ LM_ERR("Truncated table at [%d] rows. Please increase 'max_result_rows'
param!\n", counter);
+ goto error;
+ }
if (_o_l)
{