fengyunhe commented on issue #5274:
URL: https://github.com/apache/shardingsphere/issues/5274#issuecomment-618153554
I tried to verify your problem. When I added a varchar type column at run
time, I would get an error when querying again, but when I restarted the Proxy,
the error disappeared.
console in log:
```
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Rule
Type: sharding
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Logic
SQL: select * from `order` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL -
SQLStatement:
SelectSQLStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4fd19152,
tablesContext=TablesContext(tables=[Table(name=order,
alias=Optional.absent())], schema=Optional.absent())),
projectionsContext=ProjectionsContext(startIndex=7, stopIndex=7,
distinctRow=false, projections=[ShorthandProjection(owner=Optional.absent())],
columnLabels=[id, user_id, fee, create_time]),
groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@411676d8,
orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@4529fa22,
paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@2b7ce3,
containsSubquery=false)
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds4 ::: select * from `order0` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds4 ::: select * from `order1` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds5 ::: select * from `order0` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds5 ::: select * from `order1` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds6 ::: select * from `order0` order by note desc limit 10
[INFO ] 03:14:11.766 [ShardingSphere-Command-21] ShardingSphere-SQL - Actual
SQL: ds6 ::: select * from `order1` order by note desc limit 10
[ERROR] 03:14:11.790 [ShardingSphere-Command-21]
o.a.s.s.f.c.CommandExecutorTask - Exception occur:
java.lang.NullPointerException: null
at
org.apache.shardingsphere.shardingproxy.backend.response.query.QueryHeader.<init>(QueryHeader.java:67)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.execute.callback.ProxySQLExecuteCallback.getQueryHeaders(ProxySQLExecuteCallback.java:89)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.execute.callback.ProxySQLExecuteCallback.executeSQL(ProxySQLExecuteCallback.java:81)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.execute.callback.ProxySQLExecuteCallback.executeSQL(ProxySQLExecuteCallback.java:73)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.execute.callback.ProxySQLExecuteCallback.executeSQL(ProxySQLExecuteCallback.java:45)
at
org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:79)
at
org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:61)
at
org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:125)
at
org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.parallelExecute(ShardingExecuteEngine.java:102)
at
org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:83)
at
org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:73)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.execute.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:82)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:99)
at
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:84)
at
org.apache.shardingsphere.shardingproxy.backend.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:54)
at
org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:73)
at
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92)
at
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]