Skip to content

Commit 963217f

Browse files
fix: resolved physical tables must be clones, not references
Signed-off-by: Andreas Reichel <[email protected]>
1 parent 066e1bb commit 963217f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/net/sf/jsqlparser/schema/Column.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ public Table getResolvedTable() {
243243
* @return this column
244244
*/
245245
public Column setResolvedTable(Table resolvedTable) {
246-
this.resolvedTable = resolvedTable;
246+
// clone, not reference
247+
this.resolvedTable = new Table(resolvedTable.getFullyQualifiedName());
247248
return this;
248249
}
249250
}

src/main/java/net/sf/jsqlparser/schema/Table.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ public Table getResolvedTable() {
421421
* @return this table
422422
*/
423423
public Table setResolvedTable(Table resolvedTable) {
424-
this.resolvedTable = resolvedTable;
424+
// clone, not reference
425+
this.resolvedTable = new Table(resolvedTable.getFullyQualifiedName());
425426
return this;
426427
}
427428
}

0 commit comments

Comments
 (0)