SNOW-1619625: Insufficient character unescaping #1868
Labels
bug
status-in_progress
Issue is worked on by the driver team
status-triage_done
Initial triage done, will be further handled by the driver team
What version of JDBC driver are you using?
latest from git
What operating system and processor architecture are you using?
Fedora 40, amd64
What version of Java are you using?
OpenJDK 64-Bit Server VM (Red_Hat-21.0.4.0.7-2) (build 21.0.4+7, mixed mode, sharing)
What did you do?
Snowflake Query Monitor reveals the following queries being executed:
What did you expect to see?
The first SQL statement is expected and correct. Two backslashes are required for the sequence to be interpreted as an escaping of the underscore character.
The second SQL statement is unexpected. Now that that metadata call results not in a
LIKE
operation but in a statement expecting a valid schema name, both backslash characters should have been 'unescaped'.The problem can be traced back to
SnowflakeDatabaseMetaData::unescapeChars(...)
.The function is only removing one of the two backslahes.
Fix
I had success with switching the order of statements as follows:
However, I might be missing other edge cases now.
The text was updated successfully, but these errors were encountered: