Skip to content

dble convert string to int throws error with [load data ...] query while mysql does not #770

@irene-coming

Description

@irene-coming
  • dble version:
    5.6.29-dble-2.18.10.0-c683b99-20181015051308
  • preconditions :
    no
  • configs:

schema.xml

<table dataNode="dn1,dn2,dn3,dn4" name="test" rule="hash-four" />
  • steps:
    step1. create file 'file1.txt' and fill contents in both dble and mysql seperately:
a,a,1,1
step2. execute sqls in both dble and mysql seperately
create table test(id int, c1 char(5), c2 int, c3 int);
load data local infile './file1.txt' into table test fields terminated by ',' lines terminated by '\n';
select * from test order by id;
step3.dble and mysql results : 

dble resultsets:

mysql> load data local infile "./file1.txt" into table test fields terminated by',' lines terminated by '\n';                                                       
ERROR 1136 (HY000): row data can't not calculate a sharding value,columnValue:a Please eliminate any quote and non number within it.

mysql resultsets:

mysql> load data local infile "./file1.txt" into table test fields terminated by',' lines terminated by '\n';
Query OK, 1 row affected, 1 warning (0.00 sec)
Records: 1  Deleted: 0  Skipped: 0  Warnings: 1

mysql> show warnings;
+---------+------+-------------------------------------------------------+
| Level   | Code | Message                                               |
+---------+------+-------------------------------------------------------+
| Warning | 1366 | Incorrect integer value: 'a' for column 'id' at row 1 |
+---------+------+-------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select * from test;
+------+------+------+------+
| id   | c1   | c2   | c3   |
+------+------+------+------+
|    0 | a    |    5 | 5    |
+------+------+------+------+
1 row in set (0.00 sec)
  • expect result:
    1. step3 dble get same result with mysql
  • real result:
    1. step3 dble get different result with mysql
  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Labels

doc-itdiffer with mysql, and let it goload-dataresolveproblem has been fixed by developerwontfix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions