~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/loaddata.test

  • Committer: Lee Bieber
  • Date: 2010-08-26 21:56:15 UTC
  • mto: (1733.1.1 build) (1734.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: lbieber@kalebral-2.local-20100826215615-98moemwu1u9u9x4y
change tests to use enum values instead of error numbers

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c));
107
107
select * from t1;
108
108
# and this should bark
109
 
--error 1409 
 
109
--error ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 
110
110
load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b);
111
111
 
112
112
# Now let us test LOAD DATA with subselect
125
125
show variables like "secure_file_pri%";
126
126
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
127
127
select @@secure_file_priv;
128
 
--error 1238
 
128
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
129
129
set @@secure_file_priv= 0;
130
130
 
131
131
# Test "load data"
132
132
truncate table t1;
133
133
--replace_result $DRIZZLE_TEST_DIR DRIZZLE_TEST_DIR
134
 
--error 1290
 
134
--error ER_OPTION_PREVENTS_STATEMENT
135
135
eval load data infile '$DRIZZLE_TEST_DIR/t/loaddata.test' into table t1;
136
136
select * from t1;
137
137
 
151
151
insert into t2 values(1),(2);
152
152
disable_query_log;
153
153
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
154
 
--error 1261
 
154
--error ER_WARN_TOO_FEW_RECORDS
155
155
eval load data infile '$MYSQLTEST_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;
161
161
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
162
162
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
163
163
FROM t2;
164
 
--error 1261
 
164
--error ER_WARN_TOO_FEW_RECORDS
165
165
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1
166
166
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
167
167
enable_query_log;