~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/loaddata.test

  • Committer: patrick crews
  • Date: 2010-10-07 21:20:57 UTC
  • mto: (1819.2.4 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1825.
  • Revision ID: gleebix@gmail.com-20101007212057-l1aq2xq8vfidi6cv
Adjustments to tests to deal with the name changes.  Also fixed passed/failed reporting post-run in test-run.pl

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
  ('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.');
62
62
SELECT * FROM t1;
63
63
 
64
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
65
 
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1;
66
 
cat_file $MYSQLTEST_VARDIR/tmp/t1;
 
64
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
 
65
eval SELECT * INTO OUTFILE '$DRIZZLETEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1;
 
66
cat_file $DRIZZLETEST_VARDIR/tmp/t1;
67
67
 
68
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
69
 
eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r';
 
68
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
 
69
eval LOAD DATA INFILE '$DRIZZLETEST_VARDIR/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r';
70
70
SELECT t1.id, c1, c2 FROM t1 LEFT  JOIN t2 ON t1.id=t2.id WHERE c1 != c2;
71
71
SELECT t1.id, c1, c2 FROM t1 RIGHT JOIN t2 ON t1.id=t2.id WHERE c1 != c2;
72
72
 
73
 
remove_file $MYSQLTEST_VARDIR/tmp/t1;
 
73
remove_file $DRIZZLETEST_VARDIR/tmp/t1;
74
74
DROP TABLE t1,t2;
75
75
 
76
76
# End of 4.1 tests
121
121
#
122
122
# It should not be possible to load from a file outside of vardir
123
123
 
124
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 
124
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
125
125
show variables like "secure_file_pri%";
126
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 
126
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
127
127
select @@secure_file_priv;
128
128
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
129
129
set @@secure_file_priv= 0;
150
150
create table t2(f1 int);
151
151
insert into t2 values(1),(2);
152
152
disable_query_log;
153
 
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
 
153
eval select * into outfile '$DRIZZLETEST_VARDIR/tmp/t2' from t2;
154
154
--error ER_WARN_TOO_FEW_RECORDS
155
 
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1;
 
155
eval load data infile '$DRIZZLETEST_VARDIR/tmp/t2' into table t1;
156
156
enable_query_log;
157
157
select f1 from t1 where f2 IS NOT NULL order by f1;
158
 
remove_file $MYSQLTEST_VARDIR/tmp/t2;
 
158
remove_file $DRIZZLETEST_VARDIR/tmp/t2;
159
159
delete from t1;
160
160
disable_query_log;
161
 
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
 
161
eval SELECT * INTO OUTFILE '$DRIZZLETEST_VARDIR/tmp/t2'
162
162
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
163
163
FROM t2;
164
164
--error ER_WARN_TOO_FEW_RECORDS
165
 
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1
 
165
eval load data infile '$DRIZZLETEST_VARDIR/tmp/t2' into table t1
166
166
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
167
167
enable_query_log;
168
168
select f1 from t1 where f2 IS NOT NULL order by f1;
169
 
remove_file $MYSQLTEST_VARDIR/tmp/t2;
 
169
remove_file $DRIZZLETEST_VARDIR/tmp/t2;
170
170
drop table t1,t2;
171
171
 
172
172
#
179
179
INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100);
180
180
SELECT * FROM t1;
181
181
 
182
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
183
 
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
184
 
#cat_file $MYSQLTEST_VARDIR/tmp/t1;
 
182
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
 
183
eval SELECT * INTO OUTFILE '$DRIZZLETEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
 
184
#cat_file $DRIZZLETEST_VARDIR/tmp/t1;
185
185
echo EOF;
186
186
 
187
187
TRUNCATE t1;
188
188
 
189
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
190
 
eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-';
 
189
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR
 
190
eval LOAD DATA INFILE '$DRIZZLETEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-';
191
191
SELECT * FROM t1;
192
192
 
193
 
remove_file $MYSQLTEST_VARDIR/tmp/t1;
 
193
remove_file $DRIZZLETEST_VARDIR/tmp/t1;
194
194
DROP TABLE t1;