From 01618e765dc032ae928a2129fb053fbb0f1f1fd4 Mon Sep 17 00:00:00 2001 From: Danil Onishchenko Date: Fri, 11 Jan 2013 14:39:18 +0800 Subject: Fix odbc:param_query/3 and odbc:param_query/4. Issue: Calling odbc:param_query/3 and odbc:param_query/4 with unparameterized query string and empty parameters list causes error in pattern matching in function param_values/1. This patch fixes this problem and allow to do things such as odbc:param_query(ConRef, "select * from some_table", []). --- lib/odbc/src/odbc.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/odbc/src/odbc.erl b/lib/odbc/src/odbc.erl index 3eabec9ec3..dde96907e5 100644 --- a/lib/odbc/src/odbc.erl +++ b/lib/odbc/src/odbc.erl @@ -902,7 +902,9 @@ param_values(Params) -> [{_, Values} | _] -> Values; [{_, _, Values} | _] -> - Values + Values; + [] -> + [] end. %%------------------------------------------------------------------------- -- cgit v1.2.3