Commit 536d15e
committed
Use "@default" for currentSchema and currentCatalog (when it could be null).
The problematic case that this change addresses is:
Imagine the connection is "fresh", and the connection-string defines something like schema=S1
So the current schema of the connection would be S1, but currentSchema is still null. So we prepare a statement for S1, but the cache key contains null.
If we then invoke setSchema(null) the connection is in schema-less state. Preparing the same statement would retrieve the one from above, which is prepared for S1.
---
The FIX for this case, use "@default" instead of null, such that the cache key isn't problematic for the above case.1 parent b3077ee commit 536d15e
File tree
1 file changed
+2
-0
lines changed- ebean-datasource/src/main/java/io/ebean/datasource/pool
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments