~mdcallag/mysql-patch/5.0-map

« back to all changes in this revision

Viewing changes to mysql-test/t/csv.test

  • Committer: Mark Callaghan
  • Date: 2009-03-08 23:10:48 UTC
  • mfrom: (2676.15.35 merge-5.0-bugteam)
  • Revision ID: mdcallag@gmail.com-20090308231048-98m2y0h6lck93gn1
mergeĀ fromĀ 5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1460
1460
select * from t1;
1461
1461
drop table t1;
1462
1462
 
 
1463
#
 
1464
# Bug #39616 Missing quotes from .CSV crashes server
 
1465
#
 
1466
# Editing the .CSV file and leaving out quotes from around an integer field 
 
1467
# crashes the server.
 
1468
#
 
1469
 
 
1470
#
 
1471
# Test for the integers and strings enclosed in quotes, not enclosed in quotes,
 
1472
# \X  characters.
 
1473
#
 
1474
create table bug39616_1(id int NOT NULL, d varchar(50) NOT NULL) ENGINE=csv;
 
1475
 
 
1476
--remove_file $MYSQLTEST_VARDIR/master-data/test/bug39616_1.CSV
 
1477
--write_file $MYSQLTEST_VARDIR/master-data/test/bug39616_1.CSV
 
1478
1,"integer sans quotes"
 
1479
1,string sans quotes
 
1480
1,string end quotes"
 
1481
1,quotes"in between" strings 
 
1482
"1",Integer with quote and string with no quote
 
1483
1,"escape sequence \n \" \\ \r \a within quotes"
 
1484
EOF
 
1485
 
 
1486
select * from bug39616_1;
 
1487
 
 
1488
drop table bug39616_1; 
 
1489
 
 
1490
#
 
1491
# Test for he case when a field begins with a quote, but does not end in a
 
1492
# quote.
 
1493
# Note: This results in an empty set.
 
1494
#
 
1495
create table bug39616_1(id int NOT NULL, d varchar(50) NOT NULL) ENGINE=csv;
 
1496
 
 
1497
--remove_file $MYSQLTEST_VARDIR/master-data/test/bug39616_1.CSV
 
1498
--write_file $MYSQLTEST_VARDIR/master-data/test/bug39616_1.CSV
 
1499
1,"string only at the beginning quotes
 
1500
EOF
 
1501
 
 
1502
select * from bug39616_1;
 
1503
 
 
1504
drop table bug39616_1; 
 
1505
 
1463
1506
--echo End of 5.0 tests