mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for MySqlParameterizedOutputVisitor sharding support.
This commit is contained in:
@@ -654,6 +654,24 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isNumber) {
|
||||
int pos2 = name.lastIndexOf('_', pos - 1);
|
||||
if (pos2 != -1) {
|
||||
boolean isNumber2 = true;
|
||||
for (int i = pos2 + 1; i < pos; ++i) {
|
||||
char ch = name.charAt(i);
|
||||
if (ch < '0' || ch > '9') {
|
||||
isNumber2 = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isNumber2) {
|
||||
pos = pos2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isNumber) {
|
||||
boolean isAlias = false;
|
||||
for (SQLObject parent = x.getParent();parent != null; parent = parent.getParent()) {
|
||||
|
||||
Reference in New Issue
Block a user