secondary index: fix yet another case sensitivity bug
When the secondary index code builds a "%s IS NOT NULL" clause for a CQL statement, it needs to quote the column name if it needs to be (not only lowercase, digits and _). Fixes #3401. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20180429221857.6248-7-nyh@scylladb.com>
This commit is contained in:
committed by
Duarte Nunes
parent
8012f231ca
commit
46d4f6f352
@@ -42,6 +42,7 @@
|
||||
#include "index/secondary_index_manager.hh"
|
||||
|
||||
#include "cql3/statements/index_target.hh"
|
||||
#include "cql3/util.hh"
|
||||
#include "index/target_parser.hh"
|
||||
#include "db/query_context.hh"
|
||||
#include "schema_builder.hh"
|
||||
@@ -117,7 +118,7 @@ view_ptr secondary_index_manager::create_view_for_index(const index_metadata& im
|
||||
}
|
||||
builder.with_column(col.name(), col.type, column_kind::clustering_key);
|
||||
}
|
||||
const sstring where_clause = sprint("%s IS NOT NULL", index_target_name);
|
||||
const sstring where_clause = sprint("%s IS NOT NULL", cql3::util::maybe_quote(index_target_name));
|
||||
builder.with_view_info(*schema, false, where_clause);
|
||||
return view_ptr{builder.build()};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user