diff --git a/dbms/programs/server/HTTPHandler.cpp b/dbms/programs/server/HTTPHandler.cpp index 690c426f929..9b1160d9796 100644 --- a/dbms/programs/server/HTTPHandler.cpp +++ b/dbms/programs/server/HTTPHandler.cpp @@ -501,11 +501,11 @@ void HTTPHandler::processQuery( else if (param_could_be_skipped(key)) { } - else if (startsWith(it->first, "param_")) + else if (startsWith(key, "param_")) { /// Save name and values of substitution in dictionary. - const String parameter_name = it->first.substr(strlen("param_")); - context.setParameterSubstitution(parameter_name, it->second); + const String parameter_name = key.substr(strlen("param_")); + context.setParameterSubstitution(parameter_name, value); } else { diff --git a/dbms/tests/queries/0_stateless/00955_complex_prepared_statements.sh b/dbms/tests/queries/0_stateless/00955_complex_prepared_statements.sh old mode 100644 new mode 100755