diff options
author | Danil Onishchenko <[email protected]> | 2013-01-11 14:39:18 +0800 |
---|---|---|
committer | Danil Onishchenko <[email protected]> | 2013-01-11 14:39:18 +0800 |
commit | 01618e765dc032ae928a2129fb053fbb0f1f1fd4 (patch) | |
tree | 8932522c42ae6d5d25e3475e5fedd5e22cb47e23 /lib/odbc | |
parent | 12c4a0b0c8963c03806613bb73487fdc14733db9 (diff) | |
download | otp-01618e765dc032ae928a2129fb053fbb0f1f1fd4.tar.gz otp-01618e765dc032ae928a2129fb053fbb0f1f1fd4.tar.bz2 otp-01618e765dc032ae928a2129fb053fbb0f1f1fd4.zip |
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", []).
Diffstat (limited to 'lib/odbc')
-rw-r--r-- | lib/odbc/src/odbc.erl | 4 |
1 files changed, 3 insertions, 1 deletions
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. %%------------------------------------------------------------------------- |