From 3e0242025628ffecb554f0508f1c35de1aa42c2c Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Thu, 5 Oct 2017 23:50:47 +0200 Subject: [PATCH] Escape new schema name when altering a table When moving a table to another schema with a name which needs to be escaped, this would have generated an error prior to this commit. --- src/sqlitedb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sqlitedb.cpp b/src/sqlitedb.cpp index 801bdd9c4..416408604 100644 --- a/src/sqlitedb.cpp +++ b/src/sqlitedb.cpp @@ -1168,7 +1168,7 @@ bool DBBrowserDB::renameColumn(const sqlb::ObjectIdentifier& tablename, const sq // Copy the data from the old table to the new one if(!executeSQL(QString("INSERT INTO %1.sqlitebrowser_rename_column_new_table SELECT %2 FROM %3;") - .arg(newSchemaName) + .arg(sqlb::escapeIdentifier(newSchemaName)) .arg(select_cols) .arg(tablename.toString()))) {