Skip to content

query [load data ...] without default database got npe #776

@irene-coming

Description

@irene-coming
  • dble version:
    5.6.29-dble-2.18.10.0-6cbccd3-20181020142155

  • preconditions :
    global table test already crea
    ted with:
    create table test(id int)

  • configs:

schema.xml

 <table dataNode="dn1,dn2,dn3,dn4" name="test" type="global" />
  • steps:
    step1. login dble without given default database
    mysql -P8066 -u test -p111111 -h 127.0.0.1
    step2. create file file.txt and fill contents
1,
step3. execute query 'load data ... '
mysql> load data local infile "./file.txt" into table test fields terminated by',' lines terminated by '\n';
ERROR 3009 (HY000):
  • expect result:
    1. ERROR 1046 (3D000): No database selected
  • real result:
    1. step3 query fail
  • supplements:
    1.dble log:
2018-10-22 03:06:53.099 DEBUG [BusinessExecutor0] (com.actiontech.dble.server.ServerQueryHandler.query(ServerQueryHandler.java:44)) - ServerConnection [id=1, schema=null, host=127.0.0.1, user=test,txIsolation=3, autocommit=true, schema=null]load data local infile "./file.txt" into table test fields terminated by',' lines terminated by '\n'
2018-10-22 03:06:53.120  INFO [BusinessExecutor0] (com.actiontech.dble.net.FrontendConnection.loadDataInfileStart(FrontendConnection.java:256)) - load data error
java.lang.NullPointerException: null
        at com.actiontech.dble.server.handler.ServerLoadDataInfileHandler.start(ServerLoadDataInfileHandler.java:157) ~[dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.FrontendConnection.loadDataInfileStart(FrontendConnection.java:254) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.server.ServerQueryHandler.query(ServerQueryHandler.java:134) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.FrontendConnection.query(FrontendConnection.java:319) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.FrontendConnection.query(FrontendConnection.java:335) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.handler.FrontendCommandHandler.handleData(FrontendCommandHandler.java:77) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:55) [dble-2.18.10.0.jar:?]
        at com.actiontech.dble.net.handler.FrontEndHandlerRunnable.run(FrontEndHandlerRunnable.java:44) [dble-2.18.10.0.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

/label ~BUG

Metadata

Metadata

Labels

load-dataresolveproblem has been fixed by developer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions