Bug #64883 | ROW_COUNT() returns -1 for LOAD DATA INFILE | ||
---|---|---|---|
Submitted: | 5 Apr 2012 22:35 | Modified: | 6 Apr 2012 4:07 |
Reporter: | David Berg | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.1.61, 5.5.22 | OS: | Any (Windows 7 (64 bit), Mac OS X) |
Assigned to: | CPU Architecture: | Any | |
Tags: | LOAD DATA INFILE, row_count() |
[5 Apr 2012 22:35]
David Berg
[6 Apr 2012 4:07]
Valeriy Kravchuk
Thank you for the problem report. Verified with 5.1.61 on Mac OS X also: macbook-pro:5.1 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.1.61-debug Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create table tab1(c1 int); Query OK, 0 rows affected (0.45 sec) mysql> load data local infile '/tmp/test.txt' into table tab1; Query OK, 1 row affected (0.51 sec) Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 mysql> select row_count(); +-------------+ | row_count() | +-------------+ | -1 | +-------------+ 1 row in set (0.09 sec) mysql> select * from tab1; +------+ | c1 | +------+ | 1 | +------+ 1 row in set (0.09 sec)
[6 Apr 2012 5:51]
Davi Arnaut
It might be worth replacing all references to "LOAD DATA INFILE" with "LOAD DATA LOCAL INFILE".