]> git.ipfire.org Git - thirdparty/bacula.git/commit
Fix #7247 About incorrect variable substitution with the query command
authorEric Bollengier <eric@baculasystems.com>
Wed, 6 Jan 2021 12:41:24 +0000 (13:41 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
commite66abc15f5f4ee7f1eace74c46829d90754a7f66
tree7fee9123bcd251d3ada14954874e6ea88728dda9
parentaa01935a792a0113397d823d8d5a028a3e12d943
Fix #7247 About incorrect variable substitution with the query command

Description:
-----------

The following query.sql file was generating an incorrect SQL command

# 1
:Query to test substitutions
*Enter a
*Enter b
*Enter c
SELECT '%1' as "a", '%2' as "b", '%3' as "c", '%1' as "a", '%2' as "b", '%3' as "c";

Workaround:
----------

Do not reuse variable in the SQL command (add a new one) or tweak SQL to not reuse variables.
bacula/src/dird/ua_query.c