diff --git a/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java b/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java index 6030afc5a158..fe51d6468fd5 100644 --- a/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java +++ b/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java @@ -81,7 +81,8 @@ public class PyInjectionUtil { */ @NotNull public static InjectionResult registerStringLiteralInjection(@NotNull PsiElement element, @NotNull MultiHostRegistrar registrar) { - return processStringLiteral(element, registrar, "", "", Formatting.NONE); + // Assume percent formatting since the MySQL parser cannot handle Python-style substitutions + return processStringLiteral(element, registrar, "", "", Formatting.PERCENT); } private static boolean isStringLiteralPart(@NotNull PsiElement element, @Nullable PsiElement context) {