~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/outfile.test

Cleanup around SAFEMALLOC

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
# End of 4.1 tests
69
69
 
70
70
#
71
 
# Bug#13202  SELECT * INTO OUTFILE ... FROM data_dictionary.schemas now fails
 
71
# Bug#13202  SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails
72
72
#
73
73
disable_query_log;
74
74
eval SELECT * INTO OUTFILE "../tmp/outfile-test.4"
75
75
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
76
 
FROM data_dictionary.schemas LIMIT 0, 5;
 
76
FROM information_schema.schemata LIMIT 0, 5;
77
77
# enable_query_log;
78
78
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
79
79
 
80
 
use data_dictionary;
 
80
use information_schema;
81
81
# disable_query_log;
82
82
eval SELECT * INTO OUTFILE "../tmp/outfile-test.4"
83
83
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
84
 
FROM schemas LIMIT 0, 5;
 
84
FROM schemata LIMIT 0, 5;
85
85
enable_query_log;
86
86
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
87
87
use test;
95
95
--error 1290
96
96
eval select * into outfile "$DRIZZLE_TEST_DIR/outfile-test1" from t1;
97
97
drop table t1;
 
98
 
 
99
#
 
100
# Bug#28181 Access denied to 'information_schema when
 
101
# select into out file (regression)
 
102
#
 
103
create database mysqltest;
 
104
create user user_1@localhost;
 
105
grant all on mysqltest.* to user_1@localhost;
 
106
connect (con28181_1,localhost,user_1,,mysqltest);
 
107
 
 
108
--error ER_ACCESS_DENIED_ERROR 
 
109
eval select schema_name
 
110
into outfile "../tmp/outfile-test.4"
 
111
fields terminated by ',' optionally enclosed by '"'
 
112
 lines terminated by '\n'
 
113
from information_schema.schemata
 
114
where schema_name like 'mysqltest';
 
115
 
 
116
connection default;
 
117
grant file on *.* to user_1@localhost;
 
118
 
 
119
connect (con28181_2,localhost,user_1,,mysqltest);
 
120
eval select schema_name
 
121
into outfile "../tmp/outfile-test.4"
 
122
fields terminated by ',' optionally enclosed by '"'
 
123
 lines terminated by '\n'
 
124
from information_schema.schemata
 
125
where schema_name like 'mysqltest';
 
126
 
 
127
connection default;
 
128
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4
 
129
use test;
 
130
revoke all privileges on *.* from user_1@localhost;
 
131
drop user user_1@localhost;
 
132
drop database mysqltest;
 
133