Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load data sql be routed to mysql has been truncated #1248

Closed
yexiaoli88 opened this issue Jun 27, 2019 · 2 comments
Closed

load data sql be routed to mysql has been truncated #1248

yexiaoli88 opened this issue Jun 27, 2019 · 2 comments
Assignees
Labels
doc-it differ with mysql, and let it go load-data resolve problem has been fixed by developer
Milestone

Comments

@yexiaoli88
Copy link

yexiaoli88 commented Jun 27, 2019

  • dble version:5.6.29-dble-9.9.9.9-16ae8083a9edeb67ab102cded51446e27d7ee2f5-20190627073912
  • preconditions :
 CREATE TABLE sharding_four(ID INT NOT NULL,FirstName VARCHAR(20),LastName VARCHAR(20),Department VARCHAR(20),Salary INT);

test.txt:

201     "Mazojys        ddd     ggg"    "Fxoj"  "Finance"       7800
  • configs:

schema.xml

<schema name="testdb" sqlMaxLimit="100" dataNode="dn4">
        <table name="sharding_four" dataNode="dn1,dn2,dn3,dn4" rule="hash-four"/>
    </schema>

rule.xml

<tableRule name="hash-four">
        <rule>
            <columns>id</columns>
            <algorithm>four-long</algorithm>
        </rule>
  </tableRule>
 <function name="four-long" class="Hash">
        <property name="partitionCount">4</property>
        <property name="partitionLength">1</property>
    </function>


  • steps:
    1.load data in dble with listing all column names:
load data infile "/opt/test.txt" into table sharding_four (ID,FirstName,LastName,Department,Salary) FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINNATED BY '\n';
Query OK, 1 row affected, 2 warnings (0.01 sec)

2.check general.log

2019-08-01T10:03:50.101693Z	 1001 Query	LOAD DATA LOCAL INFILE '/opt/test.txt' INTO TABLE sharding_four (ID, FirstName, LastName, Department, Salary)
  • expect result:
  1. the sql route to mysql should not be truncated
  • real result:
  1. the sql route to mysql has been truncated
  • supplements:
    1.
@yanhuqing666 yanhuqing666 added this to the 2.19.07.0 milestone Jul 4, 2019
@yexiaoli88 yexiaoli88 changed the title load data error with listing column names in sharding table load data sql be routed to mysql has been truncated Aug 1, 2019
@PanternBao
Copy link
Member

PanternBao commented Aug 7, 2019

durid will skip the error part of sql when load data grammar is error.

durid issue:
alibaba/druid#3396

update doc :
https://github.com/actiontech/dble-docs-cn/blob/develop/3.SQL_Syntax/3.2_DML/3.2.09_LOAD_DATA.md

@PanternBao PanternBao added doc-it differ with mysql, and let it go resolve problem has been fixed by developer labels Aug 9, 2019
@PanternBao PanternBao assigned wjl1619 and unassigned PanternBao Aug 14, 2019
@wjl1619
Copy link
Member

wjl1619 commented Aug 21, 2019

verified on version: 5.6.29-dble-9.9.9.9-0d3c776cbd7993a4287108af0ac140be4693ca58-20190820021310

@wjl1619 wjl1619 closed this as completed Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-it differ with mysql, and let it go load-data resolve problem has been fixed by developer
Projects
None yet
Development

No branches or pull requests

4 participants