mirror of
https://github.com/apache/nifi.git
synced 2025-02-10 12:05:22 +00:00
QueryDatabaseTable and GenerateTableFetch processors were not able to use max value state as expected, if max value column was wrapped with escape characters. Due to a mis-match between computed state keys and actual keys used in the managed state. State keys computed by getStateKey method included escape characters while actual stored keys did not. Resulted querying the same dataset again and again. This commit added unwrapIdentifier method to DatabaseAdapter class to remove database specific escape characters for identifiers such as table and column names, so that max value state keys are populated correctly even if identifiers are wrapped with escape characters. This commit also added new DatabaseAdapter for MySQL, to handle MySQL specific identifier escape with back-ticks. This closes #2424 Signed-off-by: Mike Thomsen <mikerthomsen@gmail.com>