add current databasefilter when querying index

This commit is contained in:
Francis Cao
2023-01-24 10:35:36 -08:00
parent 1758ae782d
commit 51e79be23d

View File

@@ -68,7 +68,8 @@ CREATE PROCEDURE `UmamiRenameIndexIfExists`(
INFORMATION_SCHEMA.STATISTICS
WHERE
TABLE_NAME = @tableName
AND INDEX_NAME = @currentIndexName;
AND INDEX_NAME = @currentIndexName
AND TABLE_SCHEMA = database();
SET @query = CONCAT(
'ALTER TABLE `', @tableName, '` RENAME INDEX `', @currentIndexName, '` TO `', @newIndexName, '`;'