Skip to content

Client get lost connection when try to load data local for a empty file #683

Closed
@sunsun314

Description

  • dble version: 2.18.09-release

  • preconditions :

  • configs:

schema.xml
default

rule.xml
default

server.xml
default

  • steps:
    execute sql
    use testdb
    load data local infile "C:/workspace/test.txt" into table table_a fields terminated by',' lines terminated by '/n';
  • expect result:
    Query OK, 0 rows affected (2.95 sec)
    Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
  • real result:
    ERROR 2013 (HY000): Lost connection to MySQL server during query

/label ~BUG

Activity

added this to the 2.18.10.0 milestone on Sep 4, 2018
irene-coming

irene-coming commented on Sep 4, 2018

@irene-coming
Member

bug found on version:5.6.29-dble-9.9.9.9-18e8b31-20180903030245

irene-coming

irene-coming commented on Sep 4, 2018

@irene-coming
Member

dble commit version:5.6.29-dble-2.18.09.1-2b298cd-20180904021034
case1. with no lines in test.txt:
dble:

mysql> load data local infile "/opt/dble/test.txt" into table table_a fields terminated by ',' lines terminated by '\n';
Query OK, 0 rows affected (0.00 sec)
Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
mysql> load data infile "/opt/dble/test.txt" into table table_a fields terminated by ',' lines terminated by '/n';
ERROR 1046 (HY000): No dataNode found ,please check tables defined in schema:mytest
mysql> use mytest
Database changed
mysql> load data infile "/opt/dble/test.txt" into table table_a fields terminated by ',' lines terminated by '/n';
ERROR 1046 (HY000): No dataNode found ,please check tables defined in schema:mytest

case2. with 1 empty line in test.txt (echo> test.txt)
dble:

mysql> load data local infile "/opt/dble/test.txt" into table table_a fields terminated by ',' lines terminated by '/n';
ERROR 2013 (HY000): Lost connection to MySQL server during query

mysql:

mysql> select * from table_a;
Empty set (0.01 sec)
mysql> load data local infile "/opt/test.txt" into table table_a fields terminated by ','lines terminated by '\n';
Query OK, 1 row affected, 2 warnings (0.00 sec)
Records: 1  Deleted: 0  Skipped: 0  Warnings: 2
mysql> show warnings;
+---------+------+------------------------------------------------------+
| Level   | Code | Message                                              |
+---------+------+------------------------------------------------------+
| Warning | 1366 | Incorrect integer value: '' for column 'id' at row 1 |
| Warning | 1261 | Row 1 doesn't contain data for all columns           |
+---------+------+------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> select * from table_a;
+------+------+
| id   | aa   |
+------+------+
|    0 | NULL |
+------+------+
1 row in set (0.00 sec)

case3. with 2 lines data in test.txt

3,333
4,444

dble:

mysql> truncate table table_a;
Query OK, 0 rows affected (0.04 sec)
mysql> load data local infile "/opt/dble/test.txt" into table table_a fields terminated by ',' lines terminated by '\n';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> load data infile "test.txt" into table table_a fields terminated by',' lines terminated by '\n';
ERROR 1146 (42S02): Table 'mytest.TABLE_A' doesn't exist
mysql> load data infile "/opt/dble/test.txt" into table table_a fields terminated by',' lines terminated by '\n';
ERROR 1046 (HY000): No dataNode found ,please check tables defined in schema:mytest
mysql>
mysql> use mytest
ERROR 1146 (42S02): Table 'mytest.TABLE_A' doesn't exist

mysql:

mysql> truncate table table_a;
Query OK, 0 rows affected (0.04 sec)
mysql> load data local infile "/opt/test.txt" into table table_a fields terminated by ',' lines terminated by '\n'; Query OK, 2 rows affected (0.00 sec)
Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
mysql> select * from table_a;
+------+------+
| id   | aa   |
+------+------+
|    3 |  333 |
|    4 |  444 |
+------+------+
2 rows in set (0.00 sec)

resolved:verified dble version: 5.6.29-dble-2.18.09.1-1748fd0-20180904095646

irene-coming

irene-coming commented on Sep 4, 2018

@irene-coming
Member

dble commit version:5.6.29-dble-2.18.09.1-2b298cd-20180904021034
with multi-times operation as above, other queries( not "load data ...") are affected:

image

irene-coming

irene-coming commented on Sep 5, 2018

@irene-coming
Member

dble commit version: 5.6.29-dble-2.18.09.1-1748fd0-20180904095646
preconditions: test.txt has no lines, table_a does not exist
case:

mysql> load data infile "test.txt" into table table_a fields terminated by',' lines terminated by '\n';
Query OK, 0 rows affected (0.07 sec)
Records: 0  Deleted: 0  Skipped: 0  Warnings: 0

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

expect: ERROR 1146 (42S02): Table 'table_a' doesn't exist
real: query success

resolved:
verified on dble version:dble version: 5.6.29-dble-2.18.09.1-0752712-20180905032631

added a commit that references this issue on Sep 5, 2018

15 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Priority/Highexpect fix as quickly as possibleresolveproblem has been fixed by developer

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Client get lost connection when try to load data local for a empty file · Issue #683 · actiontech/dble