Skip to content

Commit

Permalink
Fix for Bug#63992 (Bug#14598872), getTables did not return a result f…
Browse files Browse the repository at this point in the history
…or table names with a dot in it.

Change-Id: I868738c07cbd01a9040572abccf649cf0aa4aab8
  • Loading branch information
fjssilva committed Dec 9, 2024
1 parent 8f12103 commit a718b2d
Show file tree
Hide file tree
Showing 6 changed files with 999 additions and 995 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Version 9.2.0

- Fix for Bug#63992 (Bug#14598872), getTables did not return a result for table names with a dot in it.

- WL#16558, Upgrade 3rd party libraries and tools.

- Fix for Bug#37125271, RPM depends on java-headless 1:1.8.0 which makes java8 unnessessarily be installed.
Expand Down
20 changes: 7 additions & 13 deletions src/main/core-api/java/com/mysql/cj/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1324,22 +1324,16 @@ public static int indexOfQuoteDoubleAware(String searchIn, String quoteChar, int
return -1;
}

int lastIndex = searchIn.length() - 1;

int beginPos = startFrom;
int stopAt = searchIn.length() - 1;
int startPos = startFrom;
int pos = -1;

boolean next = true;
while (next) {
pos = searchIn.indexOf(quoteChar, beginPos);
if (pos == -1 || pos == lastIndex || !searchIn.startsWith(quoteChar, pos + 1)) {
next = false;
} else {
beginPos = pos + 2;
while (true) {
pos = searchIn.indexOf(quoteChar, startPos);
if (pos == -1 || pos == stopAt || !searchIn.startsWith(quoteChar, pos + 1)) {
return pos;
}
startPos = pos + 2;
}

return pos;
}

public static String toString(byte[] value, int offset, int length, String encoding) {
Expand Down
Loading

0 comments on commit a718b2d

Please sign in to comment.