~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/include/loaddata_autocom.inc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Test if the engine does autocommit in LOAD DATA INFILE, or not
 
2
# (NDB wants to do, others don't).
 
3
 
 
4
eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
 
5
 
 
6
--disable_warnings
 
7
drop table if exists t1;
 
8
--enable_warnings
 
9
 
 
10
let $load_file= $MYSQLTEST_VARDIR/std_data/loaddata2.dat;
 
11
 
 
12
# NDB does not support the create option 'Binlog of table with BLOB attribute and no PK'
 
13
# So use a dummy PK here.
 
14
create table t1 (id int unsigned not null auto_increment primary key, a text, b text);
 
15
start transaction;
 
16
--replace_result $load_file LOAD_FILE
 
17
eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b);
 
18
commit;
 
19
select count(*) from t1;
 
20
truncate table t1;
 
21
start transaction;
 
22
--replace_result $load_file LOAD_FILE
 
23
eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b);
 
24
rollback;
 
25
select count(*) from t1;
 
26
 
 
27
drop table t1;