Description:
http://dev.mysql.com/doc/refman/5.5/en/select.html
"If you use INTO DUMPFILE instead of INTO OUTFILE, MySQL writes only one row into the file, without any column or line termination and without performing any escape processing."
However, the following proves that two rows can be written out to file a.txt
whereas 3 or more fails with error.
mysql> create table t1(a int)engine=myisam;
Query OK, 0 rows affected (0.01 sec)
mysql> insert into t1 values (1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select * from t1 into dumpfile 'a.txt';
Query OK, 2 rows affected (0.00 sec)
mysql> insert into t1 values (3);
Query OK, 1 row affected (0.00 sec)
mysql> select * from t1 into dumpfile 'b.txt';
ERROR 1172 (42000): Result consisted of more than one row
I think both the selects should yield an error, and they should only
write 1 row, not two concatted rows.
How to repeat:
drop table if exists t1;
create table t1(a int)engine=myisam;
insert into t1 values (1),(2);
select * from t1 into dumpfile 'a.txt';
insert into t1 values (3);
select * from t1 into dumpfile 'b.txt';