Skip to content

Commit

Permalink
Merge pull request #1515 from x3ntrix/#1114
Browse files Browse the repository at this point in the history
Limited query to current database to fix #1114
  • Loading branch information
jzabroski committed Sep 21, 2021
2 parents 550f809 + 26214f3 commit a2eac60
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -208,7 +208,7 @@ public override void Process(RenameColumnExpression expression)
IF(COLUMN_COMMENT = '', '', CONCAT('COMMENT ', QUOTE(COLUMN_COMMENT), ' ')),
UPPER(extra))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '{0}' AND COLUMN_NAME = '{1}'", FormatHelper.FormatSqlEscape(expression.TableName), FormatHelper.FormatSqlEscape(expression.OldName));
WHERE TABLE_NAME = '{0}' AND COLUMN_NAME = '{1}' AND TABLE_SCHEMA = database()", FormatHelper.FormatSqlEscape(expression.TableName), FormatHelper.FormatSqlEscape(expression.OldName));

var fieldValue = Read(columnDefinitionSql).Tables[0].Rows[0][0];
var columnDefinition = fieldValue as string;
Expand Down

0 comments on commit a2eac60

Please sign in to comment.