mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 06:05:53 +00:00
We had another case-sensitivity bug in materialized views, where if a case-sensitive (quoted) column name was listed explicitly on "SELECT" (instead of implicitly, e.g., in "SELECT *") the column name was incorrectly folded to lower-case and inserts would fail. This patch fixes the code, where a "SELECT" statement was built using the desired column names, but column names that needed quoting were not being quoted. The bug was in a helper function build_select_statement() which took column name strings and failed to quote them. We clean up this function to take column definitions instead of strings - and take care of the quoting itself. It also needs to quote the table's name in the select statement being built. Fixes #3391. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20180429221857.6248-6-nyh@scylladb.com>