1
by brian
clean slate |
1 |
disable_query_log; |
1786.3.2
by Monty Taylor
Cleaned up the initial pass at this. It's not perfect, but it does work. |
2 |
# Server are started in "var/master-data/local", so "../../tmp" will be "var/tmp"
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
3 |
eval set @tmpdir="$DRIZZLETEST_VARDIR/tmp"; |
1
by brian
clean slate |
4 |
enable_query_log; |
5 |
||
6 |
#
|
|
7 |
# test of into outfile|dumpfile
|
|
8 |
#
|
|
9 |
||
10 |
--disable_warnings |
|
11 |
drop table if exists t1; |
|
12 |
--enable_warnings |
|
13 |
||
14 |
create table t1 (`a` blob); |
|
15 |
insert into t1 values("hello world"),("Hello mars"),(NULL); |
|
16 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
17 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
18 |
eval select * into outfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.1" from t1; |
|
1
by brian
clean slate |
19 |
enable_query_log; |
20 |
select load_file(concat(@tmpdir,"/outfile-test.1")); |
|
21 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
22 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
23 |
eval select * into dumpfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.2" from t1 limit 1; |
|
1
by brian
clean slate |
24 |
enable_query_log; |
25 |
select load_file(concat(@tmpdir,"/outfile-test.2")); |
|
26 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
27 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
28 |
eval select * into dumpfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.3" from t1 where a is null; |
|
1
by brian
clean slate |
29 |
enable_query_log; |
30 |
select load_file(concat(@tmpdir,"/outfile-test.3")); |
|
31 |
||
32 |
# the following should give errors
|
|
33 |
||
34 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
35 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
36 |
--error ER_FILE_EXISTS_ERROR |
|
37 |
eval select * into outfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.1" from t1; |
|
38 |
||
39 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
|
40 |
--error ER_FILE_EXISTS_ERROR |
|
41 |
eval select * into dumpfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.2" from t1; |
|
42 |
||
43 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
|
44 |
--error ER_FILE_EXISTS_ERROR |
|
45 |
eval select * into dumpfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.3" from t1; |
|
1
by brian
clean slate |
46 |
enable_query_log; |
1878.8.3
by patrick crews
Tweaked a couple of tests to deal with failures caused by error message truncation when path names were in the 100 char range. The truncation caused diffs |
47 |
|
48 |
# The test below drastically shortens $DRIZZLETEST_VARDIR
|
|
49 |
# to just VAR and uses a less informative file name
|
|
50 |
# This is done to accomodate longer file paths
|
|
51 |
# We were seeing error message truncation when
|
|
52 |
# the path to the server under test was long (110+ chars)
|
|
53 |
||
1878.8.4
by patrick crews
Tweaked outfile .test + .result to avoid use of variable output |
54 |
--disable_query_log |
1878.8.5
by patrick crews
Tweak func_str and outfile to deal with the limitations of only 128 chars available for filename + path in error messages |
55 |
let $bad_test_file ="$DRIZZLETEST_VARDIR/tmp/bad"; |
1878.8.4
by patrick crews
Tweaked outfile .test + .result to avoid use of variable output |
56 |
--enable_query_log |
1878.8.5
by patrick crews
Tweak func_str and outfile to deal with the limitations of only 128 chars available for filename + path in error messages |
57 |
let $replace_substring = `SELECT SUBSTRING($bad_test_file,1,128)`; |
58 |
--replace_result $replace_substring DRIZZLETEST_BAD_FILE $bad_test_file DRIZZLETEST_BAD_FILE |
|
1813.2.12
by Monty Taylor
Made load_file work properly with throwing errors and opening files. |
59 |
--error ER_TEXTFILE_NOT_READABLE |
1878.8.5
by patrick crews
Tweak func_str and outfile to deal with the limitations of only 128 chars available for filename + path in error messages |
60 |
eval select load_file($bad_test_file); |
1819.2.2
by patrick crews
Adjustments to tests to deal with the name changes. Also fixed passed/failed reporting post-run in test-run.pl |
61 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.1 |
62 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.2 |
|
63 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.3 |
|
1
by brian
clean slate |
64 |
drop table t1; |
65 |
||
66 |
# Bug#8191
|
|
67 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
68 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
69 |
eval select 1 into outfile "$DRIZZLETEST_VARDIR/tmp/outfile-test.4"; |
|
1
by brian
clean slate |
70 |
enable_query_log; |
1813.2.9
by Monty Taylor
Made data_home be fs::path natively. |
71 |
--replace_result $DRIZZLE_TEST_DIR DRIZZLE_TEST_DIR |
1
by brian
clean slate |
72 |
select load_file(concat(@tmpdir,"/outfile-test.4")); |
1819.2.2
by patrick crews
Adjustments to tests to deal with the name changes. Also fixed passed/failed reporting post-run in test-run.pl |
73 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.4 |
1
by brian
clean slate |
74 |
|
75 |
#
|
|
76 |
# Bug #5382: 'explain select into outfile' crashes the server
|
|
77 |
#
|
|
78 |
||
79 |
CREATE TABLE t1 (a INT); |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
80 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
81 |
eval EXPLAIN SELECT * INTO OUTFILE '$DRIZZLETEST_VARDIR/tmp/t1.txt' |
|
1
by brian
clean slate |
82 |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' |
83 |
FROM t1; |
|
84 |
DROP TABLE t1; |
|
85 |
||
86 |
# End of 4.1 tests
|
|
87 |
||
88 |
#
|
|
1273.13.32
by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names |
89 |
# Bug#13202 SELECT * INTO OUTFILE ... FROM data_dictionary.schemas now fails
|
1
by brian
clean slate |
90 |
#
|
91 |
disable_query_log; |
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
92 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
93 |
eval SELECT * INTO OUTFILE "$DRIZZLETEST_VARDIR/tmp/outfile-test.4" |
|
1
by brian
clean slate |
94 |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' |
1273.13.32
by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names |
95 |
FROM data_dictionary.schemas LIMIT 0, 5; |
1
by brian
clean slate |
96 |
# enable_query_log;
|
1819.2.2
by patrick crews
Adjustments to tests to deal with the name changes. Also fixed passed/failed reporting post-run in test-run.pl |
97 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.4 |
1
by brian
clean slate |
98 |
|
1273.13.39
by Brian Aker
Remove old schemata plugin. |
99 |
use data_dictionary; |
1
by brian
clean slate |
100 |
# disable_query_log;
|
1878.7.1
by patrick crews
Updated tests to use variable vardir rather than a hard-coded one |
101 |
--replace_result $DRIZZLETEST_VARDIR DRIZZLETEST_VARDIR |
102 |
eval SELECT * INTO OUTFILE "$DRIZZLETEST_VARDIR/tmp/outfile-test.5" |
|
1
by brian
clean slate |
103 |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' |
1273.13.39
by Brian Aker
Remove old schemata plugin. |
104 |
FROM schemas LIMIT 0, 5; |
1
by brian
clean slate |
105 |
enable_query_log; |
1819.2.2
by patrick crews
Adjustments to tests to deal with the name changes. Also fixed passed/failed reporting post-run in test-run.pl |
106 |
--remove_file $DRIZZLETEST_VARDIR/tmp/outfile-test.5 |
1
by brian
clean slate |
107 |
use test; |
108 |
||
109 |
#
|
|
110 |
# Bug#18628 mysql-test-run: security problem
|
|
111 |
#
|
|
112 |
# It should not be possible to write to a file outside of vardir
|
|
113 |
create table t1(a int); |
|
319.1.1
by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_ |
114 |
--replace_result $DRIZZLE_TEST_DIR DRIZZLE_TEST_DIR |
1731.3.1
by Lee Bieber
change tests to use enum values instead of error numbers |
115 |
--error ER_OPTION_PREVENTS_STATEMENT |
319.1.1
by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_ |
116 |
eval select * into outfile "$DRIZZLE_TEST_DIR/outfile-test1" from t1; |
1
by brian
clean slate |
117 |
drop table t1; |