lwtdev commented on issue #7548:
URL: https://github.com/apache/shardingsphere/issues/7548#issuecomment-696557749


   I have just try create table after proxy start, it's also cause an npe
   ```sql
    create table customer(id bigint(23) primary key );
   ERROR 10002 (C1000): 2Unknown exception: [null]
   ```
   - log
   ```
   java.lang.NullPointerException: null
           at 
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContextBuilder.getPrimaryKeyColumns(ExecutionContextBuilder.java:129)
           at 
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContextBuilder.getSQLRuntimeContext(ExecutionContextBuilder.java:81)
           at 
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContextBuilder.build(ExecutionContextBuilder.java:71)
           at 
org.apache.shardingsphere.infra.executor.sql.context.ExecutionContextBuilder.build(ExecutionContextBuilder.java:57)
           at 
org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:53)
           at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:67)
           at 
org.apache.shardingsphere.proxy.backend.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:64)
           at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:62)
           at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:100)
           at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
           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)
   ```
   
   In proxy 4.1.1 it was works well
   
   ```sql
   mysql> create table customer(id bigint(23) primary key );
   Query OK, 0 rows affected (0.14 sec)
   
   mysql> show tables;
   +---------------------------------+
   | Tables_in_spsqltest_sharding_00 |
   +---------------------------------+
   | customer                        |
   ```


----------------------------------------------------------------
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]


Reply via email to